[FFmpeg-user] How to change audio stream offset

Leonard Bogard leonard at kcfchurch.org
Thu Sep 5 17:08:50 CEST 2013


On Thu, Sep 5, 2013 at 12:33 AM, Francois Visagie <
francois.visagie at gmail.com> wrote:

> Hi All,
>
>
>
> I'm getting a few cases where only ffmpeg correctly understand the AV sync
> in its mp4 output, in the sense that other applications play audio too
> early
> wrt. video. I'm trying to correct that after encoding with '-itsoffset' but
> not having much luck. The offset between audio and video remains unchanged.
>
>
>
> I'll be grateful for any suggestions to help fix this.
>
>
>
> Here's the command line as well as console output; in this case audio needs
> to be delayed by 650ms (I assume that '-itsoffset' applies to the next
> specified input file?):
>
>
>
> C:\Users\fvisagie\Videos\My DVDs\MainMovie\Neil Diamond Live at the
> Greek\VIDEO_TS>ffmpeg -i "Neil Diamond Live at the Greek.mp4" -itsoffset
> 00:00:00.650 -i "Ne
>
> il Diamond Live at the Greek.mp4" -map 0:v -map 1:a -c: copy zzz.mp4
>
>
This is a command line I used to shift the audio track in my videos:
ffmpeg -i "Neil Diamond Live at the Greek.mp4" -itsoffset 0.650 -i "Neil
Diamond Live at the Greek.mp4" -map 0:0 -map 1:1 -acodec copy -vcodec copy
"Neil Diamond Live at the Greek (fixed).mp4"


More information about the ffmpeg-user mailing list