在有些场景下,其实只需要转封装,不需要转码, 大概步骤如下: 1. 打开输入的formatcontext 2. 打开输出文件 3. 打开输出的formatcontext 4. 写文件头 5. 复制codec信息 6. 读取输入frame 7. 写输出frame 8. 写文件尾 9. 关闭输出文件 代码如下:
点击(此处)折叠或打开
本文分享自 作者个人站点/博客 前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!