extracting h264 raw video stream from mp4 or flv with ffmpeg generate an invalid stream

放肆的年华 提交于 2019-12-03 06:02:40

To extract a raw video from an MP4 or FLV container you should specify the -bsf:v h264_mp4toannexb or -vbfs h264_mp4toannexb option.

ffmpeg -i test.flv -vcodec copy -an -bsf:v h264_mp4toannexb test.h264

The raw stream without H264 Annex B / NAL cannot be decode by player. With that option ffmpeg perform a simple "mux" of each h264 sample in a NAL unit.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!