[FFmpeg-user] snapshot from videfile: incorrect position

René Calles me at renecalles.de
Fri Apr 4 07:08:02 CEST 2014


as far as i know using -ss **before** the -i input, FFmpeg will fast forward without decoding the frames. When it reaches the Timestamp you are seeking to it will choose the next Keyframe (I-Frame) by a principle called nearest neighbor.

It seems the frame at 435.96 is no Keyframe while the frame at 525,16 is a keyframe.

So, for more accurate seeking it is preferred to use -ss argument **after** -i input.

Am 4. April 2014 bei 05:34:56, scenator (info at scenator.de) schrieb:


I hope, it is quite simple for you...  

I want to take a snapshot from sec. 437,960212.  

Therefore, I have to go fastforward to 435.96 (2Sec. before snapshot),  
then play 2.00 Seconds and take my snapshot  

So I call:  
C:\ProgramData\ffmpeg.exe -ss 435.96 -i "d:\Temp\STOP!1~1.M2T" -y -s  
1920x1080 -ss 00:00:02.00 -vframes 1  

result: the extracted frame ist a frame round about half a second before  

So I tried some combinations like:  
-ss 435.96 -i "d:\Temp\STOP!1~1.M2T" -y -s 1920x1080 -ss 00:00:01.75... ->  
got closer to 437,96..  
-ss 435.96 -i "d:\Temp\STOP!1~1.M2T" -y -s 1920x1080 -ss 00:00:01.70... ->  
exactely the wished frame 437,96.  

But another target-position eg. 525,16:  
-ss 00:00:01.80 is exactely the wished frame, etc.  

So could you please explain, how to find out the exact target frame?  

Best regards in advantage,  

View this message in context: http://ffmpeg-users.933282.n4.nabble.com/snapshot-from-videfile-incorrect-position-tp4664637.html  
Sent from the FFmpeg-users mailing list archive at Nabble.com.  
ffmpeg-user mailing list  
ffmpeg-user at ffmpeg.org  

More information about the ffmpeg-user mailing list