[FFmpeg-user] Can I change the image format from `showwavespic` to png?

Marcin Borkowski mbork at mbork.pl
Fri Apr 7 17:19:40 EEST 2023

On 2023-03-10, at 08:17, Moritz Barsnick <barsnick at gmx.net> wrote:

> Hi Marcin,
> On Fri, Mar 10, 2023 at 06:04:15 +0100, Marcin Borkowski wrote:
>> I use the `showwavespic` filter to get an image of the waveform.
>> However, the default image format is jpg, and the only way I found I can
>> change it is by providing a suitable extension of the output file.
> Filters don't have codecs - they output raw frames, the rest of the
> encoding chain determines the codec.
>> Trouble is, I need the output to be stdout.
> From your previous thread, I'm guessing you're using "-f image2 -".
> The help for the image2 format says:
> Muxer image2 [image2 sequence]:
>     Common extensions: bmp,dpx,exr,jls,jpeg,jpg,jxl,ljpg,pam,pbm,pcx,pfm,pgm,pgmyuv,phm,png,ppm,sgi,tga,tif,tiff,jp2,j2c,j2k,xwd,sun,ras,rs,im1,im8,im24,sunras,vbn,xbm,xface,pix,y,avif,qoi.
>     Default video codec: mjpeg.
> That's where the jpg codec comes from. So what you need to do is to
> give an explicit image codec to use.
>> Is it possible to output png to stdout?
> All you need to do is to add "-c:v png" as an output option, i.e.
> "-c:v png -f image2 - "

Thanks a lot!  Where can I find this in the docs (so that I don't have
to ask simple questions again and again)?


Marcin Borkowski

More information about the ffmpeg-user mailing list