I've got an audio CD, obviously it's stereo. I want to get monoaural mp3's or wav's with just the left (or right) channel of every cd track.
What's the fastest and easiest way to do it?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You can indeed do this with the
sox command-line audio processing tool. To select a single channel from an input file (for demonstration purposes, I use a wave file) and write it to a new wave file, the
remix effect is used:
sox stereo_inputfile.wav leftchannel.wav remix 1 sox stereo_inputfile.wav rightchannel.wav remix 2
If you want to know more, this website lists a number of practical examples on how to use
sox for a number of tasks.
Here comes a bash-solution for multiple files within one folder.
To split all files of one folder into the other folders for the left and for the right channel you can do it like this:
for i in /run/dir/* do sox "$i" ""/run/l_channel/"$(basename "$i")" remix 1 sox "$i" ""/run/r_channel/"$(basename "$i")" remix 2 done
Note: I tried this successfully under Manjaro Linux, but probably this works under Ubuntu, too.
ffmpeg is always your friend.
Stereo -> Mono with L Channel
ffmpeg -i input.mp3 -filter:a 'pan=mono|FC=FL' output.mp3
Stereo -> Mono with R Channel (just replaced
ffmpeg -i input.mp3 -filter:a 'pan=mono|FC=FR' output.mp3
See pan - Audio Filters - FFmpeg Filters Documentation for the detail.
Use audacity. Extract/rip the audio files from the CD using any program you like. Then import the stereo audio file in audacity. Use the "split stereo track" Track Control Panel, located on the left side of the track. This will break it down to two separate tracks. Then for each track open the Track Control Panel again and select mono to convert each single channel track to mono.