Opened 13 months ago

Closed 13 months ago

Last modified 12 months ago

#8921 closed defect (invalid)

Cannot force png format for file wihout extension

Reported by: aalexgabi Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

This works

% ffmpeg -i sunglasses.png /tmp/sungasses.png

But this does not

% ffmpeg -i sunglasses.png -f png /tmp/sunglasses
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, png_pipe, from 'sunglasses.png':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: png, rgba(pc), 1330x880 [SAR 2835:2835 DAR 133:88], 25 tbr, 25 tbn, 25 tbc
[NULL @ 0x55a7caca4180] Requested output format 'png' is not a suitable output format
/tmp/sunglasses: Invalid argument

Change History (5)

comment:1 by aalexgabi, 13 months ago

Seems that using apng format works:

% ffmpeg -v error -i sunglasses.png /tmp/sunglasses.png
% ffmpeg -v error -i sunglasses.png -f apng /tmp/sunglasses    
% diff /tmp/sunglasses.png /tmp/sunglasses
% echo $?
0

But I get this warning:

[apng @ 0x5563feb241c0] Only a single frame so saving as a normal PNG.

Last edited 13 months ago by aalexgabi (previous) (diff)

comment:2 by Nicolas George, 13 months ago

The format is image2, png is the codec:

ffmpeg ... -f image2 -c png /tmp/sunglasses

comment:3 by Carl Eugen Hoyos, 13 months ago

Keywords: png format removed
Priority: importantnormal
Resolution: invalid
Status: newclosed

comment:4 by aalexgabi, 12 months ago

@Cigares It makes sense now. It is however confusing that image2 is specified as format when in fact it's a muxer.

comment:5 by Gyan, 12 months ago

There's both an image2 demuxer and a muxer.

Note: See TracTickets for help on using tickets.