[FFmpeg-user] -itsoffset doesn't work for mp4/mov files
Elias Fries
coniophora at gmail.com
Tue Oct 30 20:13:56 CET 2012
On Thu, Oct 25, 2012 at 3:14 AM, Xinglong Wu <cakuba at gmail.com> wrote:
> Today, I tried to merge a video and an audio
> stream together into a single file with "-itsoffset" to solve the
> out-of-sync problem. The following command works perfectly for a FLV
> file, and delays the audio stream for 2 seconds,
>
> ffmpeg -y -i mjtest.flv -itsoffset 2 -i mjtest.flv -map 0:v -map 1:a
> -vcodec copy -acodec copy test.flv
>
> however, the exactly same command for mp4 or mov files produces no
> error but I haven't observed any delay in audio stream,
>
> ffmpeg -y -i 720p.mp4 -itsoffset 2 -i 720p.mp4 -map 0:v -map 1:a
> -vcodec copy -acodec copy test.mp4
> ffmpeg -y -i kids.mov -itsoffset 2 -i kids.mov -map 0:v -map 1:a
> -vcodec copy -acodec copy test.mov
>
> You might try the -async command. I tried it once and it was like magic,
I have no idea how an arbitrary command could find the correct sync.
It may have been -async 1 that I used.
Now that is deprecated, and the audio filter asyncts is recommended
instead, but I can't fathom what the equivalent version of that would be.
But it apparently is more powerful.
More information about the ffmpeg-user
mailing list