我在哪里可以找到一个C / C ++的FFmpeg广泛的教程? [英] Where can I find a C/C++ FFmpeg extensive tutorial?

查看:338
本文介绍了我在哪里可以找到一个C / C ++的FFmpeg广泛的教程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用的ffmpeg(在C库格式)更多的部件拆分的视频,他们重新组合和连接code中的最终结果。基本的东西。但它很难找到关于此文档或提示。我应该在哪里查找/求​​教?

I want to use ffmpeg (in its c library form) to split a video in more parts, recompose them and encode the final result. Something basic. But it's very difficult to find documentation or hints about this. Where should I look/ask for advice?

推荐答案

您可以通过FFmpeg的项目维护的命令行实用程序源学到很多东西。

You can learn a great deal from the source of the command-line utilities maintained by the FFmpeg project.

ffplay.c 的main()会告诉你如何得到初始化库。 stream_component_open()演示匹配codeCS到流媒体,和 get_video_frame()显示了如何去codeA数据包并获得其PTS(presentation时间戳)。您需要使用正确计时您的分裂。

In ffplay.c, the main() will show you how to get the library initialized. stream_component_open() demonstrates matching codecs to streams in the media, and get_video_frame() shows how to decode a packet and get its PTS (presentation time stamp). You'll need that to time your splits correctly.

这应该让你开始去code面。在EN code面,看的 ffmpeg.c 。这是更大的,比ffplay更复杂,但编码帧的过程中几乎反映解码,所以一旦你有解码的工作,应该更有意义的过程。

That should get you started on the decode side. On the encode side, look at ffmpeg.c. It's larger and more complicated than ffplay, but the process of encoding a frame nearly mirrors the process of decoding it, so once you have decoding working, it should make more sense.

这篇关于我在哪里可以找到一个C / C ++的FFmpeg广泛的教程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆