making wav sample of a big mp3
I need to make a 15-second WAV sample from a 3-minute mp3 file that I have. Does anyone know an easy way to do this?
(I thought the simplest way to do this would be to play the mp3 in one xterm and use brec in another, but this doesn't work -- it would if I'd install paudio, the package that adds a /proc/audio device. It's a sweet idea -- could this become a standard part of the kernel package?)
Quoted 2 lines · Michael Stutz
I need to make a 15-second WAV sample from a 3-minute mp3 file that I have. Does anyone know an easy way to do this?
This is how I do it (improvements welcome!):
dd if=<input.mp3> of=tmp.mp3 count=X [where X = 14.2 * number-of-seconds-desired]
mpg123 -s tmp.mp3 > tmp.raw
sox -r44100 -s -w -c2 tmp.raw sample.wav
Out of curiosity, I tried this, and just got noise with "play sample.wav"
Quoted 8 lines
This is how I do it (improvements welcome!):
dd if=<input.mp3> of=tmp.mp3 count=X [where X = 14.2 * number-of-seconds-des ired]
mpg123 -s tmp.mp3 > tmp.raw
sox -r44100 -s -w -c2 tmp.raw sample.wav
Quoted 1 line · Thomas C Sobczynski
Out of curiosity, I tried this, and just got noise with "play sample.wav"
Was is a mono mp3? If so, use "-c1" instead of "-c2" on the last line..
Quoted 10 lines
Quoted 9 lines
This is how I do it (improvements welcome!):
dd if=<input.mp3> of=tmp.mp3 count=X [where X = 14.2 * number-of-seconds-des ired]
mpg123 -s tmp.mp3 > tmp.raw
sox -r44100 -s -w -c2 tmp.raw sample.wav
Quoted 2 lines
Was is a mono mp3? If so, use "-c1" instead of "-c2" on the last line..
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
Quoted 3 lines · Michael Stutz
I need to make a 15-second WAV sample from a 3-minute mp3 file that I have. Does anyone know an easy way to do this?
[this does not belong in linux-sound...]
mpg123 --help shows:
...
-k n skip first n frames [0] -n n decode only n frames [all]
Use these options with -s to grab the output; the no. of frames /s will depend on the mp3, but a bit of trial and error should work OK.
-- Christopher Reed, Selwyn College, Cambridge --
E-Mail: [email protected] WWW: http://dura.sel.cam.ac.uk/ [~cr212/] r2 T1 cSEL dCS hEn/Chi A4 S+ C*$+++L/UdP W+++ y# a VTsj (Cantab) 1.0
"Offer me solutions, offer me alternatives and I decline"
Quoted 6 lines · Chris Reed
Quoted 2 lines · Michael Stutz
I need to make a 15-second WAV sample from a 3-minute mp3 file that I have. Does anyone know an easy way to do this?
[this does not belong in linux-sound...]
Why?