分享

Converting H.264 MPEG4 to TS with ffmpeg

 jxwdy123 2010-05-26
Converting H.264 MPEG4 to TS with ffmpeg

When attempting to convert (re-mux) a MPEG4 container H.264 + AAC file to a MPEG2 transport stream I ran in to the following error message using ffmpeg:

[mpegts @ 0x(memory address)]h264 bitstream malformated
av_interleaved_write_frame(): Error while opening file

(The command I used was: ffmpeg -i input_file.m4v -vcodec copy -acodec copy output_file.ts)

To address this I searched google high and low, and finally found this post. The short story is that -vbsf h264_mp4toannexb is needed to convert an H.264 MPEG4 file to MPEG2 transport streams. To verify that your version of ffmpeg supports this filter check the output of ffmpeg -formats.

End result:
ffmpeg -i input_file.m4v -vcodec copy -acodec copy -vbsf h264_mp4toannexb output_file.ts
 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多