[FFmpeg-user] -ss before input improperly seeking?

amindfv at mailbox.org amindfv at mailbox.org
Wed Aug 25 21:01:24 EEST 2021


While reproducing a separate issue, I came upon some strange behavior with the -ss flag: it seems to be seeking incorrectly when used as an input option in some cases (including while transcoding and using -accurate_seek). Here's a reproducer:

    wget 'https://0x0.st/-yD3.mp4'  # this host was recommended in the FFmpeg Mailing List FAQ: https://ffmpeg.org/mailing-list-faq.html#Where-can-I-upload-sample-files_003f
    mv -i ./-yD3.mp4 color-frames.mp4
    ffmpeg -r 24 -i color-frames.mp4 -r 24 -ss 0.333 colorout1.mp4
    ffmpeg -ss 0.333 -r 24 -i color-frames.mp4 -r 24 colorout2.mp4 # the same but with -ss moved to be an input option

The first command correctly seeks to 0.333 seconds in. The second clip doesn't - it actually only seeks 1 frame in.

I see the same issue even when explicitly telling it to transcode and using -accurate_seek :

    ffmpeg -ss 0.333 -accurate_seek -r 24 -i color-frames.mp4 -vcodec libx265 -r 24 colorout3.mp4

Is this a bug?

Thanks,
Tom


More information about the ffmpeg-user mailing list