[FFmpeg-user] Failing to produce a clip with video start offset

Robert Krüger krueger at lesspain.de
Tue Jul 1 22:18:20 CEST 2014


On Tue, Jul 1, 2014 at 8:41 PM, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Friday 2014-06-27 17:15:36 +0200, Robert Krüger wrote:
>> Hi,
>>
>> I am intentionally trying to desync video and audio of an input file
>> by one frame by the following command line (full output is given) but
>> it does not work. The resulting file has a start time of zero for all
>> streams (you can easily check this using ffprobe). I did this
>> successfully for audio by basically the same command line only with
>> the itsoffset applied to the second input file. I assume I am making a
>> stupid mistake somewhere but I don't see it atm.
>>
>> ffmpeg -itsoffset 0.04 -i input.mov -i input.mov -c:v mpeg4 -q 8 -c:a
>> pcm_s16le -t 2 -map 0:0 -map 1:1 -y video_offset_one_frame_2s.mov
>
> Note that ffmpeg by default will remove the initial offset (yes I find
> this quite annoying). You can disable that behavior by using -copyts,
> I'm not sure how it will interact with -itsoffset. -debug_ts will
> provide help debugging the issue.

Thanks! Adding -copyts produces the desired result, i.e. the video
stream offset by one frame. I did not know that and simply was
surprised that it only happens for video and not for audio.


More information about the ffmpeg-user mailing list