'How can one pipe the audio waveform image out of ffmpeg into an image display command/application? [closed]

These two commands, when used in succession, produce a .png file of the inputted audio waveform.

ffmpeg -i audioFile.mp3 -filter_complex "showwavespic=s=640x120" -frames:v 1 imageFile.png
qlmanage -p imageFile.png

But I have not succeeded in piping the image from the first to the second. Simply using "|" between them did not work.

ffmpeg -i audioFile.mp3 -filter_complex "showwavespic=s=640x120" -frames:v 1 |
qlmanage -p

Error:

Filter showwavespic has an unconnected output

Sounds pretty fundamental!

Please, how can what I am trying to do be achieved?



Solution 1:[1]

To make FFmpeg to output its output to pipe, you need to instruct it explicitly like this:

ffmpeg -i audioFile.mp3 -filter_complex "showwavespic=s=640x120" \
       -frames:v 1 -c:v png -f image2pipe -

Disclaimer: I do not know if qlmanage can accept the piped image.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kesh