[FFmpeg-user] Can I change the image format from `showwavespic` to png?
Moritz Barsnick
barsnick at gmx.net
Fri Mar 10 09:17:02 EET 2023
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 - "
Cheers,
Moritz
More information about the ffmpeg-user
mailing list