[FFmpeg-user] ISO mp4 Major Brand field non-compliant

Owl Owl whootandahalf at gmail.com
Mon Oct 24 05:04:40 EEST 2016


Folks,

I've been attempting to stream videos that I have created with ffmpeg to my
chromecast using a local webserver. The process is very simple:

1) Encode the video with ffmpeg into an mp4 container
2) Start webserver hosting that file
3) Tell chromecast to play said video

It had been failing for quite a while, but the "BigBuckBunny" example was
working perfectly. Investigating further, I discovered that there is a
Major and Minor brand field in the header of the mp4 and, as it turns out,
ffmpeg inserts "isom" as the major brand and "512" as the minor.

I discovered the following bug report from about 9 months ago:
https://trac.ffmpeg.org/ticket/5178?cversion=0&cnum_hist=15

Sadly, it appears that that report has been ignored. It's unclear to me
reading through the comments the reason for "needs_more_info" being the
status. If nothing else, the fact that it's ISO non-compliant, and for no
good reason that I can tell, should be enough.

The MP4Box workaround command mentioned in that bug tracker worked for me
to correct ffmpeg's mistake. However, the "-brand" option did not work, nor
should either of those options be required to obtain a playable mp4 from
ffmpeg.

Steps to reproduce the problem:
1) Download BigBuckBunny:
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
2) Setup http server locally (python3 -m http.server)
3) Tell chromecast to play from your local copy (however you wish to do
this)
4) Notice that it plays correctly.
5) Simply use ffmpeg to copy BigBuckBunny to a new file (ffmpeg -i
BigBuckBunny.mp4 -c copy BigBuckBunny_2.mp4)
6) Attempt to play BigBuckBunny_2.mp4

Expected Results:
I would expect BigBuckBunny_2.mp4 to be able to play the same as the
original since all we're doing is copying.

Actual Results:
Chromecast refuses to play this file because the major/minor brands don't
make sense to it.

Recommendations:
Update ffmpeg to be compliant with the ISO Specifications.

Best,

Mike


More information about the ffmpeg-user mailing list