[FFmpeg-user] Reducing seek time when start time offset (-ss) is large
krueger at lesspain.de
Mon Aug 13 14:52:12 CEST 2012
On Mon, Aug 13, 2012 at 12:06 PM, Nicolas George
<nicolas.george at normalesup.org> wrote:
> Le sextidi 26 thermidor, an CCXX, Robert Krüger a écrit :
>> in my case the requirement was frame-accurate seeking and I am still
>> getting different (less reliable) results with -ss as an input option
>> depending on container format and probably other specifics of the
>> video stream.
> You are right, -ss as input option is less accurate, as it is, apart from
> bugs and misfeatures, limited to keyframes.
> But your wording makes me wonder if you did not miss part of my message: I
> did not suggest to use -ss as input option but to use it BOTH as input and
> output option: the input option causes ffmpeg to seek to the keyframe
> immediately before the target time and the output option causes it to skip
> the frame to the exact target time.
> With formats that have valid timestamps at seek points, it should be
> frame-accurate, although it seems to be only frame-accurate±1, and I need to
> find time to examine why.
> Note that MPEG-PS is rather a crappy format, especially for seeking, which
> explains Michael Bradshaw's problems.
> Nicolas George
sorry for not being precise enough in my response. yes, I did
understand your suggestion. My immediate thought was that it could not
do anything as the default value of the variable you set using -ss 0
as an output option already is zero but then I did not write that,
because I realized so much in the code had changed since I last looked
at it and wanted to first understand how the current code works (e.g.
at first glance I didn't find any seek call in ffmpeg.c, which
surprised me). that's part of what I meant by more research needed.
More information about the ffmpeg-user