This transcodes the entire .mp3 to a .wav
mpg123 -w output.wav input.mp3
Is there any way I can transcode a portion from the 10 second mark to the 20 second mark at a 44100hz?
Install SoX along with MP3 format support from the terminal with
sudo apt-get install sox libfmt-sox-mp3
You can then perform the transcoding you require via this command:
sox -V3 input.mp3 -r 44100 output.wav trim 0:10 0:10
-roption, inserted before the output file name, indicates that you want to resample the output to 44100 Hz.
trimoption, inserted after the output file name, indicates that you want to transcode only the portion beginning at 0 minutes and 10 seconds (first
0:10), for a length of 10 seconds from that point (second
-V3is optional and simply tells
soxto display the input/output parameters and transcoding progress for your information.