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?
command linemp3software-recommendationsound
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?
Best Answer
Transcoding only a portion of an MP3 file to WAV and resampling it to a different rate
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:
-r
option, inserted before the output file name, indicates that you want to resample the output to 44100 Hz.trim
option, inserted after the output file name, indicates that you want to transcode only the portion beginning at 0 minutes and 10 seconds (first0:10
), for a length of 10 seconds from that point (second0:10
).-V3
is optional and simply tellssox
to display the input/output parameters and transcoding progress for your information.