[FFmpeg-user] Interlaced avi h264 to mp4

Andrew Berg bahamutzero8825 at gmail.com
Tue Jul 5 15:01:27 CEST 2011


On 2011.07.05 07:26 AM, pssturges wrote:
> My original encoding of these avi's definitely has some issues. As I said
> they play fine, but it's definately causing problems for me now. Every tool
> I use, says they are 29.97 fps. XBMC plays them @ 25 fps and the audio stays
> in sync. If I remux them at 25fps sync varies anything up to a few seconds.
> If I mux them at 29.97 sync is WAY out. After demuxing the streams, closer
> examination shows that the duration of the streams can be anything up to 6
> seconds different. I tried doing calculations based on the total number of
> frames of the video and also the duration of the audio to come up with a new
> framerate figure and muxed using that. Audio would be in sync for parts but
> not others.
Sounds like they're 25fps and there are glitches that throw sync off.
Demux it with tsMuxeR (or load the raw video stream with it), making
sure "Add picture timing info" and "Continually insert SPS/PPS" are
checked (I'm not sure where you can get tsMuxeR if you don't already
have it, though; the official website has no links to it anymore). I
always run my newly encoded video streams through it just in case there
were glitches in the source since it has fixed sync issues on several
occasions.
> If the flag is held in the stream not the container, then it seems mp4box is
> setting it and ffmpeg is not (at least with the command as I have it). 
AFAIK, MP4Box does not alter the video stream in any way (and it
certainly does not touch this flag).


More information about the ffmpeg-user mailing list