ffmpeg - 框架准确截图

时间:2018-01-12 04:51:24

标签: ffmpeg screenshot frame

试图找到一种方法,使用ffmpeg获取帧精确的屏幕截图,而无需重新编码视频。

当我使用时:

ffmpeg -ss -i input -vframes 1 -q:v 2 output.jpg

-ss是hh:mm:ss.ms,无论我如何指定毫秒,使用此命令都不会帧精确。它似乎落在最近的关键帧上(这对我的应用来说不够准确)。

所以,我的问题是:

没有重新编码视频(ergo在输入后指定-ss标志)有没有办法通过ffmpeg提取精确的帧截图?

如果没有,Windows上是否有其他解决方案可以通过命令行来实现?

谢谢!

ffmpeg日志报告第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.

1 个答案:

答案 0 :(得分:0)

在ffmpeg中普遍支持帧精确搜索,但根据https://trac.ffmpeg.org/ticket/5093,它并不总是适用于mpegts / mpegps流(因为ffmpeg估计文件在帧中的位置,但无法处理情况)估计的文件位置太远)。

错误报告中提到了一种对我有效的解决方法:

ffmpeg -ss 3.00 -itsoffset -2 -i input -vframes 1 -q:v 2 output.jpg

-ss之后的值比所需的时间戳记早两秒(由于-itsoffset -2参数)。因此,此命令在时间5.00提取帧

之所以可行,是因为估计的文件位置现在基于较早的两秒,这可以确保文件位置不太远。