
wenn ich versuche, ein Audio in ein Bild (Amplitudenspektrum) umzuwandeln und die Daten an stdout zu senden (es ist in ein Skript eingebettet, sodass ich es nicht auf die Festplatte schreiben muss), schlägt dies fehl
ffmpeg -y -f alaw -ar 8000 -i 282578800275916.8000-audio-pcma -frames:v 1 -filter_complex aformat=channel_layouts=mono,compand,showwavespic=s=183322x15 -f png - 2>> ffmpegDrawErr.log
Ich habe im Protokoll Folgendes gefunden: Das angeforderte Ausgabeformat „png“ ist kein geeignetes Ausgabeformat
Aber wenn ich es direkt in eine Datei ausführe
ffmpeg -y -f alaw -ar 8000 -i 282578800275916.8000-audio-pcma -frames:v 1 -filter_complex aformat=channel_layouts=mono,compand,showwavespic=s=183322x15 out.png 2>> ffmpegDrawErr.log
Es funktioniert perfekt
Antwort1
Für Bildformate gibt es einen generischen Satz von Multiplexern (image2 und image2pipe). Das Format wird mit der Codec-Option festgelegt.
ffmpeg -y -f alaw -ar 8000 -i 282578800275916.8000-audio-pcma -frames:v 1 -filter_complex aformat=channel_layouts=mono,compand,showwavespic=s=183322x15 -c:v png -f image2pipe - 2>> ffmpegDrawErr.log