Ticket #1573 (closed enhancement: invalid)
Enhancing -ss option
|Reported by:||burek||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Consider the following example command line:
ffmpeg -ss 00:03:00 -i input -vframes 1 out.jpg
The result will be 1 image frame somewhere around 3rd minute, depending on gop size of the input, at the last found keyframe, but the seeking will be extremely fast.
Now consider this line:
ffmpeg -ss 00:02:30 -i input -ss 00:00:30 -vframes 1 out.jpg
The output will be the exact image frame at the 3rd minute of the input and the seeking will be very fast for the first 2 and a half minutes, following the slow seeking (frame-by-frame) for the next 30 seconds, resulting in the combination of the fast and accurate seeking.
My question is if the -ss input option (before -i) can be enhanced in such a way that it automatically adds another -ss output option (after -i) which will compensate for the difference between the last found keyframe and the user specified seek time.
For example, if the last found keyframe in that input was at 00:02:57, the result should be the same as if the user has typed:
ffmpeg -ss 00:02:57 -i input -ss 00:00:03 -vframes 1 out.jpg
I hope you get my point. The idea is to seek as fast as possible until the last keyframe in the specified interval and then to slowly seek to the precise time point, specified by user, all automatically, without users having to investigate the input to find out the last keyframe's position.