Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Registered User
Join Date: Sep 2002
Location: Italy
Posts: 190
|
Using ffmpeg to capture frame by number
I need to capture several video frames as .png from .mkv files in an automated way, starting from the frame numbers.
I use the following .bat file (windows) which extracts e.g. 4 frames from a .mkv with yuv video. Code:
set "f1=12345" set "f2=55555" set "f3=111111" set "f4=141414" ffmpeg -y -bitexact -i "myvideo.mkv" -map 0:v -vf "select='eq(n,%f1%)+eq(n,%f2%)+eq(n,%f3%)+eq(n,%f4%)'" -fps_mode passthrough -sws_flags accurate_rnd+full_chroma_int -bitexact "im_%%d.png" Is there a way to do that in a fast way without calculating the exact timestamp of the frames? If needed I can also switch to another command-line windows utility, as long as it is well tested and the yuv-->rgb conversion is accurate. Thanks HG |
|
|
|
| Tags |
| ffmpeg, frames |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|