I have a webapp that plays a video through the MediaSource API. The codec is set to
video/mp4; codecs="avc1.42401f" and I cannot change that.
I'm able to play the following file https://github.com/chromium/chromium/blob/master/media/test/data/bear-1280x720-v_frag-avc3.mp4
According to ffprobe and mediainfo, this an avc3 encoded file with the format profile set to
I've undertaken many attempts to recreate the file using ffmpeg. For example, this is my last attempt (it even takes the original fragment as the input file):
ffmpeg -i bear.mp4 -c:v libx264 -profile:v high -level:v 3.1 -tag:v avc3 -brand avc3 -an bear7.mp4
According mediainfo, the 2 files are nearly identical. The only differences are:
Codec IDchanges from
- slightly different length
- slightly different bitrate
- other Writing library
According to ffprobe the differences are:
There's also another I have which plays perfectly, here mediainfo spits out the following:
Complete name : part0.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 (isom/iso2/avc1/mp41/iso5) File size : 36.5 KiB Duration : 28 ms Overall bit rate : 10.7 Mb/s Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 1 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 1 frame Codec ID : avc1 Codec ID/Info : Advanced Video Coding
I'm a bit stuck as to what else I can try... Can someone help or explain how these Codec IDs work (because that's the only difference I'm seeing right now)?