0

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 High@L3.1

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 ID changes from avc3 (isom/avc1/iso4/avc3/iso6/dash) to avc3 (avc3/iso2/avc1/mp41)
  • slightly different length
  • slightly different bitrate
  • other Writing library

According to ffprobe the differences are:

  • compatible_brands changes from isomavc1iso4avc3iso6dash to avc3iso2avc1mp41
  • minor_version changes from 1 to 512

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)?

Thanks!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.