Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-13 Thread Long Wind
but lame isn't available in etch main

I give up.

Thanks anyway!

On Mon, Apr 13, 2009 at 5:09 AM, Bob Cox  wrote:
> On Mon, Apr 13, 2009 at 08:18:51 +1000, Adrian Levi (adrian.l...@gmail.com) 
> wrote:
>
>> 2009/4/13 Long Wind :
>> > Thank Bob, but your command does not work.
>> >
>> > Below is output of your command:
>>
>> > Output #0, mp2, to 'real128.mp3':
>> >  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 128000 kb/s
>> > Stream mapping:
>> >  Stream #0.0 -> #0.0
>> > [mp2 @ 0xb7ec5f08]bitrate 128000 is not allowed in mp2
>> > Error while opening codec for output stream #0.0 - maybe incorrect
>> > parameters such as bit_rate, rate, width or height
>>
>> Perhaps look for a switch in the man page to force output to mp3
>> rather than mp2?
>
> Indeed.  Note the '--enable-libmp3lame' below:
>
> $ ffmpeg -ab 128000 -i testfile-320kbps.mp3 testfile-128kbps.mp3
>
> FFmpeg version SVN-r18242, Copyright (c) 2000-2009 Fabrice Bellard, et
> al.
>  configuration: --prefix=/usr --extra-cflags=-Wall -g -fPIC -DPIC
> --cc=ccache cc --libdir=${prefix}/lib --shlibdir=${prefix}/lib
> --bindir=${prefix}/bin --incdir=${prefix}/include/ffmpeg --enable-shared
> --enable-libmp3lame --enable-gpl --enable-libfaad
> --mandir=${prefix}/share/man --enable-libvorbis --enable-pthreads
> --enable-libfaac --enable-libxvid --enable-postproc --enable-libamr-nb
> --enable-libamr-wb --enable-x11grab --enable-libgsm --enable-libx264
> --enable-libtheora --enable-libdc1394 --enable-nonfree
> --disable-stripping --enable-avfilter --enable-libdirac
> --disable-decoder=libdirac --enable-libschroedinger
> --disable-encoder=libschroedinger --enable-libspeex
> --enable-avfilter-lavf --disable-mmx --disable-altivec --disable-armv5te
> --disable-armv6 --disable-vis
>  libavutil 50. 2. 0 / 50. 2. 0
>  libavcodec52.22. 3 / 52.22. 3
>  libavformat   52.32. 0 / 52.32. 0
>  libavdevice   52. 1. 0 / 52. 1. 0
>  libavfilter0. 5. 0 /  0. 5. 0
>  libswscale 0. 7. 1 /  0. 7. 1
>  libpostproc   51. 2. 0 / 51. 2. 0
>  built on Mar 30 2009 10:47:04, gcc: 4.3.3
> Input #0, mp3, from 'testfile-320kbps.mp3':
>  Duration: 00:00:39.49, start: 0.00, bitrate: 320 kb/s
>Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 320 kb/s
> Output #0, mp3, to 'testfile-128kbps.mp3':
>Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, s16, 128 kb/s
> Stream mapping:
>  Stream #0.0 -> #0.0
> Press [q] to stop encoding
> size= 618kB time=39.55 bitrate= 128.0kbits/s
> video:0kB audio:618kB global headers:0kB muxing overhead 0.005057%
>
> $ ls -la | grep testfile
> -rw-r--r--  1 bob  bob  632822 2009-04-13 10:00 testfile-128kbps.mp3
> -rw-r--r--  1 bob  bob 1580929 2009-04-13 09:59 testfile-320kbps.mp3
>
> BUT - as noted elsewhere in this thread, simply using the 'lame' command
> is easier.  I have just tried:
>
> lame testfile-320kbps.mp3 testfile-128kbps.mp3
>
> and it worked exactly the same (but was a bit quicker).
>
> --
> Bob Cox.  Stoke Gifford, near Bristol, UK.
> Please reply to the list only.  Do NOT send copies directly to me.
> Debian on the NSLU2: http://bobcox.com/slug/
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
>
>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-13 Thread Adrian Levi
2009/4/13 Bob Cox :
> On Mon, Apr 13, 2009 at 08:18:51 +1000, Adrian Levi (adrian.l...@gmail.com) 
> wrote:

> Indeed.  Note the '--enable-libmp3lame' below:

Seems as if the OP's ffmpeg was not compiled with that option set.
OP's reply to you below.

2009/4/13 Long Wind :
> Thank Bob, but your command does not work.
>
> Below is output of your command:
>
> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
>  configuration:  --enable-gpl --enable-pp --enable-pthreads
> --enable-vorbis --enable-libogg --enable-a52 --enable-dts
> --enable-libgsm --enable-dc1394 --disable-debug --enable-shared
> --prefix=/usr
>  libavutil version: 0d.49.0.0
>  libavcodec version: 0d.51.11.0
>  libavformat version: 0d.50.5.0
>  built on Mar 26 2007 15:50:40, gcc: 4.1.2 20061115 (prerelease)
> (Debian 4.1.1-21)
> Input #0, mp3, from 'real.mp3':
>  Duration: 00:04:48.3, start: 0.00, bitrate: 112 kb/s
>  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 112 kb/s
> Output #0, mp2, to 'real128.mp3':
>  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 128000 kb/s
> Stream mapping:
>  Stream #0.0 -> #0.0
> [mp2 @ 0xb7ec5f08]bitrate 128000 is not allowed in mp2
> Error while opening codec for output stream #0.0 - maybe incorrect
> parameters such as bit_rate, rate, width or height
-- 
24x7x365 != 24x7x52 Stupid or bad maths?
 hm. I've lost a machine.. literally _lost_. it responds to
ping, it works completely, I just can't figure out where in my
apartment it is.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-13 Thread Bob Cox
On Mon, Apr 13, 2009 at 08:18:51 +1000, Adrian Levi (adrian.l...@gmail.com) 
wrote: 

> 2009/4/13 Long Wind :
> > Thank Bob, but your command does not work.
> >
> > Below is output of your command:
> 
> > Output #0, mp2, to 'real128.mp3':
> >  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 128000 kb/s
> > Stream mapping:
> >  Stream #0.0 -> #0.0
> > [mp2 @ 0xb7ec5f08]bitrate 128000 is not allowed in mp2
> > Error while opening codec for output stream #0.0 - maybe incorrect
> > parameters such as bit_rate, rate, width or height
> 
> Perhaps look for a switch in the man page to force output to mp3
> rather than mp2?

Indeed.  Note the '--enable-libmp3lame' below:

$ ffmpeg -ab 128000 -i testfile-320kbps.mp3 testfile-128kbps.mp3

FFmpeg version SVN-r18242, Copyright (c) 2000-2009 Fabrice Bellard, et
al.
  configuration: --prefix=/usr --extra-cflags=-Wall -g -fPIC -DPIC
--cc=ccache cc --libdir=${prefix}/lib --shlibdir=${prefix}/lib
--bindir=${prefix}/bin --incdir=${prefix}/include/ffmpeg --enable-shared
--enable-libmp3lame --enable-gpl --enable-libfaad
--mandir=${prefix}/share/man --enable-libvorbis --enable-pthreads
--enable-libfaac --enable-libxvid --enable-postproc --enable-libamr-nb
--enable-libamr-wb --enable-x11grab --enable-libgsm --enable-libx264
--enable-libtheora --enable-libdc1394 --enable-nonfree
--disable-stripping --enable-avfilter --enable-libdirac
--disable-decoder=libdirac --enable-libschroedinger
--disable-encoder=libschroedinger --enable-libspeex
--enable-avfilter-lavf --disable-mmx --disable-altivec --disable-armv5te
--disable-armv6 --disable-vis
  libavutil 50. 2. 0 / 50. 2. 0
  libavcodec52.22. 3 / 52.22. 3
  libavformat   52.32. 0 / 52.32. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter0. 5. 0 /  0. 5. 0
  libswscale 0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar 30 2009 10:47:04, gcc: 4.3.3
Input #0, mp3, from 'testfile-320kbps.mp3':
  Duration: 00:00:39.49, start: 0.00, bitrate: 320 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 320 kb/s
Output #0, mp3, to 'testfile-128kbps.mp3':
Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size= 618kB time=39.55 bitrate= 128.0kbits/s
video:0kB audio:618kB global headers:0kB muxing overhead 0.005057%

$ ls -la | grep testfile
-rw-r--r--  1 bob  bob  632822 2009-04-13 10:00 testfile-128kbps.mp3
-rw-r--r--  1 bob  bob 1580929 2009-04-13 09:59 testfile-320kbps.mp3

BUT - as noted elsewhere in this thread, simply using the 'lame' command
is easier.  I have just tried:

lame testfile-320kbps.mp3 testfile-128kbps.mp3

and it worked exactly the same (but was a bit quicker).

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Please reply to the list only.  Do NOT send copies directly to me.
Debian on the NSLU2: http://bobcox.com/slug/


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-12 Thread Manon Metten
Hi,

On Sun, Apr 12, 2009 at 3:05 PM, Long Wind  wrote:
> I have a cell phone
> it can't play some mp3
> maybe it supports only 128K
> So I want to convert hight quality mp3 to 128K
> Which package in etch?

I would recommend lame; it's in the multimedia repository
(http://www.debian-multimedia.org/).

As the default bitrate is 128k, the command line would be:
  lame --mp3input in.mp3 out.mp3

You might also consider CBR (constant bitrate), as some players cannot
handle VBR (variable bitrate) properly. In that case the command line
would be:

  lame --cbr --mp3input in.mp3 out.mp3

However, when transcoding, there's a caveat: all mp3 tags (ie: album,
song title, artist, etc.) are lost in the process. So maybe you could
write a script that first extracts all tags (mpgtx can read id3v1 &
id3v2 tags) and then uses them in the transcoding process.

  lame --mp3input --add-id3v2 --tt  --ta  --tl 
--ty  in.mp3 out.mp3

Manon.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-12 Thread Adrian Levi
2009/4/13 Long Wind :
> Thank Bob, but your command does not work.
>
> Below is output of your command:

> Output #0, mp2, to 'real128.mp3':
>  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 128000 kb/s
> Stream mapping:
>  Stream #0.0 -> #0.0
> [mp2 @ 0xb7ec5f08]bitrate 128000 is not allowed in mp2
> Error while opening codec for output stream #0.0 - maybe incorrect
> parameters such as bit_rate, rate, width or height

Perhaps look for a switch in the man page to force output to mp3
rather than mp2?

Adrian

-- 
24x7x365 != 24x7x52 Stupid or bad maths?
 hm. I've lost a machine.. literally _lost_. it responds to
ping, it works completely, I just can't figure out where in my
apartment it is.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-12 Thread Long Wind
Thank Bob, but your command does not work.

Below is output of your command:

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-gpl --enable-pp --enable-pthreads
--enable-vorbis --enable-libogg --enable-a52 --enable-dts
--enable-libgsm --enable-dc1394 --disable-debug --enable-shared
--prefix=/usr
  libavutil version: 0d.49.0.0
  libavcodec version: 0d.51.11.0
  libavformat version: 0d.50.5.0
  built on Mar 26 2007 15:50:40, gcc: 4.1.2 20061115 (prerelease)
(Debian 4.1.1-21)
Input #0, mp3, from 'real.mp3':
  Duration: 00:04:48.3, start: 0.00, bitrate: 112 kb/s
  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 112 kb/s
Output #0, mp2, to 'real128.mp3':
  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 128000 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
[mp2 @ 0xb7ec5f08]bitrate 128000 is not allowed in mp2
Error while opening codec for output stream #0.0 - maybe incorrect
parameters such as bit_rate, rate, width or height




On Sun, Apr 12, 2009 at 1:35 PM, Bob Cox  wrote:
> On Sun, Apr 12, 2009 at 09:05:49 -0400, Long Wind (longwind2...@gmail.com) 
> wrote:
>
>> I have a cell phone
>> it can't play some mp3
>> maybe it supports only 128K
>> So I want to convert hight quality mp3 to 128K
>> Which package in etch?
>> mplayer maybe, but can you tell me all the command options?
>> Thanks!
>
> ffmpeg -ab 128000 -i high_quality.mp3 lower_quality.mp3
>
> --
> Bob Cox.  Stoke Gifford, near Bristol, UK.
> Please reply to the list only.  Do NOT send copies directly to me.
> Debian on the NSLU2: http://bobcox.com/slug/
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
>
>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-12 Thread Stefan Monnier
> So I want to convert high quality mp3 to 128K
> Which package in etch?

Not sure about MP3, but at least for Ogg `sox' works fine for such tasks
and it does support MP3.


Stefan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-12 Thread Bob Cox
On Sun, Apr 12, 2009 at 09:05:49 -0400, Long Wind (longwind2...@gmail.com) 
wrote: 

> I have a cell phone
> it can't play some mp3
> maybe it supports only 128K
> So I want to convert hight quality mp3 to 128K
> Which package in etch?
> mplayer maybe, but can you tell me all the command options?
> Thanks!

ffmpeg -ab 128000 -i high_quality.mp3 lower_quality.mp3

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Please reply to the list only.  Do NOT send copies directly to me.
Debian on the NSLU2: http://bobcox.com/slug/


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-12 Thread Nelson Castillo
On Sun, Apr 12, 2009 at 8:05 AM, Long Wind  wrote:
> I have a cell phone
> it can't play some mp3
> maybe it supports only 128K
> So I want to convert hight quality mp3 to 128K
> Which package in etch?
> mplayer maybe, but can you tell me all the command options?
> Thanks!

You can also convert them to WAV an then back to MP3. I would use
LAME. This document might be overkill for what you need but the
information you need is there (you need to find the correct LAME
options).

http://wiki.freaks-unidos.net/mp3-encode

I wonder if your player supports variable bit rate... If not I guess
the options "-b 128 --cbr" must be present.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



which package in etch can convert high-quality mp3 to low quality mp3?

2009-04-12 Thread Long Wind
I have a cell phone
it can't play some mp3
maybe it supports only 128K
So I want to convert hight quality mp3 to 128K
Which package in etch?
mplayer maybe, but can you tell me all the command options?
Thanks!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org