Reputation: 1057
I am recording input microphone from a web page with WebRTC and process it through SoX.
Problem is, Firefox recordings are in Opus Audio format (according to VLC media informations), in an Ogg container, and SoX doesn't like it :
/opt/local/bin/sox FAIL formats: can't open input file `/Users/[...]/public/audio/7a0d13a501.ogg': Input not an Ogg Vorbis audio stream
Is there a way to make it work with SoX? Or should I use another command-line audio tool?
Upvotes: 10
Views: 13840
Reputation: 9
sox -t opus file.ogg out.wav works fine and not sure why opus is not part of the build on debian.
https://github.com/chirlu/sox/blob/master/INSTALL
Don't trust the distro build yourself as sox rox :)
Upvotes: 0
Reputation: 1
You can just specify -t opus
when running sox
sox -t opus file.ogg out.wav
Upvotes: 0
Reputation: 1057
I ended up doing this (either works, don't know which is the fastest):
opusdec --force-wav file.ogg - | sox - file.mp3
or
sox "|opusdec --force-wav file.ogg -" file.mp3
Upvotes: 16