3 ms·
No it is possible, but the -ss needs to be after the -i not before: https://ffmpeg.org/ffmpeg.html#Main-options https://ffmpeg.org/ffmpeg.html#Main-options >
by cm2187 7y ago
No it is possible, but the -ss needs to be after the -i not before:
https://ffmpeg.org/ffmpeg.html#Main-options https://ffmpeg.org/ffmpeg.html#Main-options
> -ss position (input/output)
> When used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved.
> When used as an output option (before an output url), decodes but discards input until the timestamps reach position.
It is much slower when used an output option, and I don't really know what it does when you do stream copy, but I suspect it leaves the whole segment with some sort of offset instruction. I often get artefacts when I play it back on vlc, so I try to avoid that option (unless I am re-encoding).
- bscphil 7y agoIt's slower when used as an output option because it only has an effect on ffmpeg's output; that is, ffmpeg literally has to decode the whole stream up to that point because it doesn't know it can seek. I believe this has no effect on whether or not you can cut precisely - if transcoding is not enabled, even if ffmpeg is sticking the frames before the first keyframe in the output file, they're effectively garbage from the point of view of the decoder (which might explain why you see artifacts in some players).