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

ID : 274497

viewed : 44

Tags : videoyoutubeffmpegh.264video





Top 2 Answer for youtube - extracting h264 raw video stream from mp4 or flv with ffmpeg generate an invalid stream

vote vote

95

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.

vote vote

83

Top 3 video Explaining youtube - extracting h264 raw video stream from mp4 or flv with ffmpeg generate an invalid stream







Related QUESTION?