Changes between Initial Version and Version 2 of Ticket #2336

Mar 7, 2013, 11:48:58 PM (5 years ago)

(Iiuc, you are reporting two independent issues, please don't do that, it makes following tickets impossible, open one ticket per problem.)

The sample you uploaded starts with a keyframe, the next keyframe is the eighth frame, so seeking a very small amount of time will seek to the eighth frame, this is the only way seeking can work if you need the complete frame, you can use -flags2 showall if you want to seek exactly to the given time and don't care about keyframes (this is what MPlayer does for performance reasons). Move -ss in front of the output file to get a completely different behaviour that imo cannot really be called "seeking", instead it decodes all frames until the specified time.

Regarding your second problem, I have to guess (missing information) but I suspect you are choosing an output container that only supports constant frame rate. To achieve constant frame rate for the given sample, the first frame has to be duplicated, use -vsync 0 to avoid this.


  • Ticket #2336

    • Property Keywords h264 added
    • Property Status changed from new to closed
    • Property Resolution changed from to invalid
  • Ticket #2336 – Description

    initial v2  
    33Please check the output for the attached small sample file for the two command lines (file is 25 FPS AFAIK it is a PsF file): 
    55ffmpeg -ss 0.04 -i gh2-50i-psf.mts -vframes 1 frame-2-ss.jpg 
    66ffmpeg version N-50443-g454c5d1 Copyright (c) 2000-2013 the FFmpeg developers 
    6060frame=    8 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.32 bitrate=N/A dup=1 drop=0     
    6161video:1031kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.002084%  
    6363Two things seem to be wrong: The seeking (-ss) does not produce the correct frame  (it's equivalent to the 8th frame of the second command) and if just dumping frames, it seems the first frame is duplicated.