[H-GEN] Resampling MP3's

Stephen Thorne stephen.thorne at gmail.com
Thu Sep 29 20:32:25 EDT 2005


On 30/09/05, Harry Phillips <harry at tux.com.au> wrote:
> I have a new LG u8360 phone, it's a cool little thing that can take the
> microSD memory (also known as transflash). It can play MP3's and I have
> a 32M card and headphones.
>
> The problem is most of my MP3/OGG's are encoded at 192k, which makes it
> hard to fit more than 4-5 songs on the 32M card.
>
> I have been using k3b to burn the music to a CD-RW, then use grip to rip
> them at 64k reducing the whole album to ~22M and allowing me to fit it
> onto my card.
>
> I have read the man pages of lame and a few other MP3 tools and I have
> searched but not figured out how to resample the MP3's/OGG's at a lower
> rate. There is plenty of info on how to rip CD's but nothing on how to
> resample an MP3/OGG to a lower rate MP3.
>
> Does anyone understand the lame man page better than I do and knows how
> to do what I want?

Using gstreamer, the following works:

gst-launch-0.8 filesrc location=$infile ! spider ! rawvorbisenc
max-bitrate=80000 ! oggmux ! filesink location=$outfile.ogg

Quick gst-launch reference:
  - gst-launch is like 'bash' for gstreamer
  - ! is more or less the equivilent of the unix |.
  - 'spider' is a 'just figure out the audio format and decode it' plugin,
  - 'rawvorbisenc' is for encoding vorbis data,
  - 'oggmux' is for putting it into an ogg container,
  - filesrc and filesink have obvious uses.
  - gst-inspect is the tool you use for figuring out what the options
are for each of these plugins. i.e.
     gst-inspect | grep mp3
     gst-inspect rawvorbisenc | less

--
Stephen Thorne
Development Engineer




More information about the General mailing list