I want to use libopus
to augment my audio using this decoder.
I can use it like this:
ffmpeg -i input.wav -c:a libopus -b:a 5.5k -ar 8000 output_550.ogg
ffmpeg -i output_550.ogg -ar 8000 output_550_ogg.wav
But I can't convert directly to wav
- I get errors like these:
[wav @ 0x7fa9ac808800] opus codec not supported in WAVE format
Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented
Error initializing output stream 0:0 --
How could I combine these to to get wav with a single command?
You can use two ffmpeg instances, piping the output of the first to the second.
ffmpeg -i input.wav -c:a libopus -b:a 5.5k -ar 8000 -f nut - | ffmpeg -f nut -i - output_550_ogg.wav
That's closer to what I want, but it should be possible to do that with one ffmpeg istance.
If you want the audio to undergo processing by libopus and yet be output as PCM, it's not possible to do it in one instance.