On Linux you can do something like this:
(bash)
ffmpeg -i foo.mp3 -f wav - | opusenc --bitrate 64 - bar.opus
This is neat, because it means you don't have to write the WAV data to disk before passing it to opus, so the encoding happens on the fly in memory instead.
I have both ffmpeg
and opusenc
installed on Windows, and since Powershell has pipes I expected to be able to do something similar, so I'm trying this:
(PS)
> ffmpeg -y -i .\foo.mp3 -f wav - | .\opusenc.exe --bitrate 64 - bar.opus
What I'm expecting to happen: ffmpeg should be piping wav audio directly to opusenc for encoding
What happens instead: it seems to only run ffmpeg without passing the data on to opusenc, indicated by constant RAM growth of the PS process and no output from opusenc.