video - Emulation prevention bytes in MP4 -


h.264 defines sequence of 2 0 bytes should escaped adding '3' byte after 2 0 bytes ("emulation prevention").

is escaping rule correct mp4 file format?

the question followed results of debugging ffmpeg. i've tried open following file:

https://www.dropbox.com/s/vrdy8z96pohh7ah/live_video_fragment_1.mp4?dl=0

vlc plays ffmpeg not. ffmpeg shows lot of error, first 1 (with log level debug):

avc: consumed 41 bytes instead of 796 

debugging ffmpeg shows tries parse moof box within h.264 decoder , fails on https://github.com/ffmpeg/ffmpeg/blob/master/libavcodec/h264.c#l312

when parsing 4 bytes preceding traf box (which indicates size), understands "0 0 3" bytes emulation prevention bytes , parsing gets out of order because of this.

so, wrong behavior of ffmpeg (which should not understand emulation prevention)? or file contains error , bytes should escaped?

is escaping rule correct mp4 file format?

escaping enabled h264 content in mp4, should enabled h264 portions inside mp4 container. given traf box part of mp4 container format, not of h264 nal units, should not unescaped. i'd file bug ffmpeg.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -