Reputation: 146
trying to find a way to take frame accurate screenshots with ffmpeg WITHOUT re-encoding the video.
When I use:
ffmpeg -ss -i input -vframes 1 -q:v 2 output.jpg
with -ss being hh:mm:ss.ms, not matter how I specify the milliseconds, it is never frame accurate with this command. it seems to be landing on the nearest keyframe (which is not accurate enough for my application).
So, my question is:
Without re-encoding the video (ergo specifying -ss flag AFTER the input) is there any way to pull frame accurate screenshots via ffmpeg ?
If not, is there another solution on Windows that would allow that via command line ?
Thanks !
ffmpeg log report part 1:
ffmpeg started on 2018-01-22 at 02:52:59
Report written to "ffmpeg-20180122-025259.log"
Command line:
"D:\\ffmpeg-3.4.1-win64-static\\bin\\ffmpeg.exe" -ss 1:31:25.9885 -i "V:\\Test\\BDMV\\STREAM\\00000.m2ts" -vframes 1 -q:v 2 -report output.jpg
ffmpeg version N-89674-g57d0c24132 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 8.100 / 7. 8.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Splitting the commandline.
Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '1:31:25.9885'.
Reading option '-i' ... matched as input url with argument 'V:\Test\BDMV\STREAM\00000.m2ts'.
Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'.
Reading option '-q:v' ... matched as option 'q' (use fixed quality scale (VBR)) with argument '2'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option 'output.jpg' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url V:\Test\BDMV\STREAM\00000.m2ts.
Applying option ss (set the start time offset) with argument 1:31:25.9885.
Successfully parsed a group of options.
Opening an input file: V:\Test\BDMV\STREAM\00000.m2ts.
[NULL @ 000001e53135a680] Opening 'V:\Test\BDMV\STREAM\00000.m2ts' for reading
[file @ 000001e53135b740] Setting default whitelist 'file,crypto'
[mpegts @ 000001e53135a680] Format mpegts probed with size=2048 and score=50
[mpegts @ 000001e53135a680] stream=0 stream_type=1b pid=1011 prog_reg_desc=HDMV
[mpegts @ 000001e53135a680] stream=1 stream_type=86 pid=1100 prog_reg_desc=HDMV
[mpegts @ 000001e53135a680] stream=2 stream_type=90 pid=1200 prog_reg_desc=HDMV
[mpegts @ 000001e53135a680] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:3
[mpegts @ 000001e53135a680] parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid.
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 9, nal_ref_idc: 0
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 7, nal_ref_idc: 3
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 6, nal_ref_idc: 0
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 6, nal_ref_idc: 0
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 5, nal_ref_idc: 3
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 5, nal_ref_idc: 3
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 5, nal_ref_idc: 3
[AVBSFContext @ 000001e5313b4380] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 000001e53135c940] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 000001e53135c940] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 000001e53135c940] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 000001e53135c940] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 000001e53135c940] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 000001e53135c940] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 000001e53135c940] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] Format yuv420p chosen by get_format().
[h264 @ 000001e53135c940] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 000001e53135c940] no picture
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[h264 @ 000001e53135c940] ct_type:0 pic_struct:0
[mpegts @ 000001e53135a680] max_analyze_duration 7000000 reached at 7008000 microseconds st:1
[mpegts @ 000001e53135a680] rfps: 23.916667 0.014415
[mpegts @ 000001e53135a680] rfps: 23.916667 0.014415
[mpegts @ 000001e53135a680] rfps: 24.000000 0.002352
[mpegts @ 000001e53135a680] rfps: 24.000000 0.007275
[mpegts @ 000001e53135a680] rfps: 48.000000 0.009407
[mpegts @ 000001e53135a680] rfps: 48.000000 0.013337
[mpegts @ 000001e53135a680] rfps: 23.976024 0.000000
[mpegts @ 000001e53135a680] rfps: 23.976024 0.000000
[mpegts @ 000001e53135a680] rfps: 47.952048 0.000000
[mpegts @ 000001e53135a680] rfps: 47.952048 0.000000
[mpegts @ 000001e53135a680] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 000001e53135a680] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001e53135a680] After avformat_find_stream_info() pos: 0 bytes read:2494608 seeks:2 frames:828
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] nal_unit_type: 7, nal_ref_idc: 3
[NULL @ 000001e53135c940] nal_unit_type: 8, nal_ref_idc: 3
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
[NULL @ 000001e53135c940] ct_type:0 pic_struct:0
Input #0, mpegts, from 'V:\Test\BDMV\STREAM\00000.m2ts':
Duration: 01:39:08.15, start: 600.000000, bitrate: 25263 kb/s
Program 1
Stream #0:0[0x1011], 169, 1/90000: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0x1100], 659, 1/90000: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, stereo, s16p
Stream #0:2[0x1200], 0, 1/90000: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Successfully opened the file.
Upvotes: 0
Views: 2173
Reputation: 596
There is generic support for frame accurate seeking in ffmpeg, but according to https://trac.ffmpeg.org/ticket/5093 it doesn't always work with mpegts / mpegps streams (because ffmpeg estimates the file position with the frame but doesn't handle the case where the estimated file position is too far).
The bug report mentions a workaround that works for me:
ffmpeg -ss 3.00 -itsoffset -2 -i input -vframes 1 -q:v 2 output.jpg
The value after -ss
is two seconds before the required timestamp (because of the -itsoffset -2
argument). So this command extracts the frame at time 5.00
This works because the estimated file position is now based on the two second earlier time, which makes sure the file position isn't too far.
Upvotes: 1