snapshot from videfile: incorrect position

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

snapshot from videfile: incorrect position

scenator
Hello,

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 C:\Users\Frank\AppData\Roaming\Snapshot.jpg

result: the extracted frame ist a frame round about half a second before 437,96.

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,
  Frank
 
Reply | Threaded
Open this post in threaded view
|

Re: snapshot from videfile: incorrect position

René Calles
Hi,

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.

Bests,
René
Am 4. April 2014 bei 05:34:56, scenator ([hidden email]) schrieb:

Hello,  

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  
C:\Users\Frank\AppData\Roaming\Snapshot.jpg  

result: the extracted frame ist a frame round about half a second before  
437,96.  

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,  
Frank  




--  
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  
[hidden email]  
http://ffmpeg.org/mailman/listinfo/ffmpeg-user 
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: snapshot from videfile: incorrect position

scenator
In reply to this post by scenator
Hello again,

yes I know, that -ss **after** -i is more precisious than **before** -i, but then there is no fastforward and I have to wait this 437.96 seconds (7 minutes!!)- thererfore this is no solution for me.

I thought, when I go fast forward to 435.96 and then the last 1.75 sec seeking the wanted position with "normal play" would deliver me th accurate position.

Any other ideas??
Best regards,
  Frank