[FFmpeg-user] Some inputs make MP4 output sync incompatible with other applications

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Aug 23 15:33:44 CEST 2013


Francois Visagie <francois.visagie <at> gmail.com> writes:

> This problem seems specific to the MP4 container; when I 
> e.g. mux to an .mpg container the problem doesn't occur. 
> What's also interesting to note is that encoding 
> individual VOBs later in the same titlesets (i.e. which 
> don't have headers)

As said I don't think VOBs have headers.

> also doesn't produce this problem. Both MPC-HC and WMP 
> play all original VOBs fine. Therefore FWIW the problem 
> seems to be in the way that ffmpeg interprets and then 
> recreates header information.
> 
> I'm trying to prevent this MP4 desync for other 
> applications in a way that safely can be left in the 
> batch process also for better-behaved inputs.

(Unrelated to this question and not necessarily true:
I don't think this is generally possible.)

> Specifying different MP4-type formats like ipod, mov, 
> mp4 and psp makes no difference. Through 
> trial-and-error, so far either '-copypts' or the

> now-deprecated '-async 1' prevents desync in other 
> applications.

Why do you think "-async 1" is deprecated? Afair, there 
are several samples that need it.

> Out of sync for other applications:
> 
> ffmpeg -i VTS_01_1.cut.VOB -filter:a 
> aformat=channel_layouts=stereo -c:a libvo_aacenc 
> -c:v libx264 -preset ultrafast -b:v 1000000 zzz.mp4
> 
> In sync for other applications:
> 
> ffmpeg -i VTS_01_1.cut.VOB -filter:a 
> aformat=channel_layouts=stereo -c:a libvo_aacenc 
> -c:v libx264 -preset ultrafast -b:v 1000000 zzz.mpg

(Difficult to see a difference.)
There have been reports that libvo_aacenc produces worse 
results than the native encoder and should not be used.

Carl Eugen



More information about the ffmpeg-user mailing list