0

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.

1
  • Whether someone will use PS or CMD in Windows 10 to run CLI commands with piping is a complete coin flip. Yes, it's a PS issue but the person asking the question will not know that when asking.
    – pzkpfw
    Dec 6, 2020 at 18:05

1 Answer 1

0

Use the regular cmd.exe instead of Powershell. The exact same command works in cmd, but does not in PS:

> ffmpeg -y -i .\foo.mp3 -f wav - | .\opusenc.exe --bitrate 64 - bar.opus

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .