Opened 8 months ago

Last modified 8 months ago

#10933 new defect

Command line argument -ss 0 for .jpeg producing to ouput

Reported by: Jozef Chutka Owned by:
Priority: normal Component: undetermined
Version: 6.1 Keywords: mjpeg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Jozef Chutka)

Using ffmpeg 6.1.1, the following command produces no output:

ffmpeg -ss 0 -i img.jpg -y tmp.jpeg
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, image2, from 'img.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 885 kb/s
  Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 128x85 [SAR 72:72 DAR 128:85], 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[vost#0:0/mjpeg @ 0x147904c90] No filtered frames for output stream, trying to initialize anyway.
Output #0, image2, to 'tmp.jpeg':
  Metadata:
    encoder         : Lavf60.16.100
  Stream #0:0: Video: mjpeg, yuvj420p(pc, progressive), 128x85 [SAR 72:72 DAR 128:85], q=2-31, 200 kb/s, 25 fps, 25 tbn
    Metadata:
      encoder         : Lavc60.31.102 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[out#0/image2 @ 0x147904080] video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[out#0/image2 @ 0x147904080] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used)
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=N/A bitrate=N/A speed=N/A   

The problem seems to be the -ss 0 argument.

Following commands however work and produces the expected output:

ffmpeg -i img.jpg -y tmp.jpeg # no -ss
ffmpeg -ss 0 -f mjpeg -i img.jpg -y tmp.jpeg # explicit format
ffmpeg -ss 0 -f image2 -i img.jpg -y tmp.jpeg # explicit format
ffmpeg -ss 0 -f jpeg_pipe -i img.jpg -y tmp.jpeg # explicit format
ffmpeg -ss 0 -i img.webp -y tmp.jpeg # webp input
ffmpeg -ss 0 -i img.png -y tmp.jpeg # png input

Attachments (1)

img.jpg (4.3 KB ) - added by Jozef Chutka 8 months ago.

Download all attachments as: .zip

Change History (2)

by Jozef Chutka, 8 months ago

Attachment: img.jpg added

comment:1 by Jozef Chutka, 8 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.