There are occasions when the media produced is unplayable. This is particularly true where the media is accessed over a stream based player and the file is above a certain size and there is insufficient memory/buffer to cache the whole file.
I have discovered that the cause (for MP4 files) is that the Media Header (moov) is placed after the Media Data (mdat).
If the media is modified to place the moov before the mdat then the media is playable.
This, or a similar effect, may also be true for other types of media.
Is is possible to change the behaviour of ffmpeg so that the moov comes before the mdat?
The relevant instruction to ffmpeg is "-movflags faststart".
Thanks for reporting. Can you please provide an example of a site that this happens on?
You could create a new conversion preset for this btw.
Select Configure from the conversion menu and then duplicate Formats > MP4 > MP4 Default and set the "other parameters" field to -movflags faststart.
You could then set it to run automatically or just run it manually when you have a file that is an issue for you.
But please let me know the site this is happening on.
I first noticed it on media from youtube, but when I investigated I found the same problem could happen on media from any site.
The problem is that with the default layout any streaming player is likely to have the same problem once the file goes beyond the player's buffer size. The size varies depending on the resolution and sound quality etc, and also depends on the player, but I have found that somewhere in the region of 30-40MB is the trigger point.
In this case the problem was seen on a linux system where the media was stored on a NAS and accessed through a "shared folder" or cifs to give it the proper name. It occurs on xplayer, VLC, MPV and others although the outcome differs depending on the player; MPV will just close, xplayer gives an error message, VLC plays but without audio. The same file held locally does not cause a problem since the moov data is also local.
My thought was that this change could be made when the recorder is performing the muxing phase.
I have since looked at some pre-recorded mp4 videos from various sites, almost without exception the moov section comes before the mdat section.
Ill make it a muxing option, but in the mean time follow my suggestion to setup a new conversion preset to do the movflags automatically.
188.8.131.52 has a new muxing setting for this. On by default. Settings > Internet Downloads > Advanced > Mux
Brilliant, it's such a pleasure to deal with companies who listen to their users instead of the usual "Well, that's what it does".
Now, about that linux version...
Oh Chris I would love too. Its hard enough keeping up Windows and Mac, plus its a hobby :) Plus you have virtualbox et all. Thanks for your kind words through. I really appreciate it.