Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8053 closed defect (invalid)

`-sseof 0`, "-sseof value must be negative; aborting"

Reported by: gdgsdg123 Owned by:
Priority: minor Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Build from: https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20190731-42a2edc-win64-static.zip

C:\>ffmpeg -sseof 0 -i "!TEMP.avi" -frames 1 -compression_level 10 -pred mixed -pix_fmt rgb24 -sws_flags spline+accurate_rnd+full_chroma_int "PNG.png"
ffmpeg version N-94431-g42a2edcc1d Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190716
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 32.100 / 56. 32.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 30.100 / 58. 30.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
-sseof value must be negative; aborting


Well... in the doc:

-sseof position (input)
Like the -ss option but relative to the "end of file". That is negative values are earlier in the file, 0 is at EOF.


Failed to see the point of preventing -sseof 0 though...

Change History (2)

comment:1 by Gyan, 5 years ago

Component: undeterminedffmpeg
Resolution: invalid
Status: newclosed
Type: enhancementdefect

ffmpeg will always demux/decode frames forward in time. -sseof 0 would seek to EOF and, by definition, there are no frames at or beyond EOF. The last frame is one frame duration earlier than EOF.

The typical way to export only this last frame to image is to make use of the update option of the image muxer.

C:\>ffmpeg -sseof -1 -i "!TEMP.avi" -compression_level 10 -pred mixed -pix_fmt rgb24 -sws_flags spline+accurate_rnd+full_chroma_int -update 1 "PNG.png"
Last edited 5 years ago by Gyan (previous) (diff)

in reply to:  1 comment:2 by gdgsdg123, 5 years ago

Replying to Gyan:

The typical way to export only this last frame to image is to make use of the update option of the image muxer.

C:\>ffmpeg -sseof -1 -i "!TEMP.avi" -compression_level 10 -pred mixed -pix_fmt rgb24 -sws_flags spline+accurate_rnd+full_chroma_int -update 1 "PNG.png"


Sounds like a bad idea... (the encoding could be painfully slow)

21.15.2 Options

update
If set to 1, the filename will always be interpreted as just a filename, not a pattern, and the corresponding file will be continuously overwritten with new images. Default value is 0.


And does it still work if the input has a framerate of < 1 FPS?..
This would be what will happen...

ffmpeg -sseof -0.000001 -i "!TEMP.avi" -frames 1 -compression_level 10 -pred mixed -pix_fmt rgb24 -sws_flags spline+accurate_rnd+full_chroma_int "PNG.png"

FFmpeg complains:
"Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)"

Last edited 5 years ago by gdgsdg123 (previous) (diff)
Note: See TracTickets for help on using tickets.