From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 16 Oct 2004 20:14:26 +0400 From: =?koi8-r?B?98zBxMnNydIg59XTxdc=?= To: community@altlinux.ru Subject: Re: =?koi8-r?B?W0NvbW1dIMnaIG1wMyDXLi4gbXAz?= References: <4170BF70.9050400@inbox.ru> <20041016130231.497f0984.Y_V_G@ua.fm> Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <20041016130231.497f0984.Y_V_G@ua.fm> User-Agent: Opera M2/7.60 (Linux, build 793) X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Oct 2004 16:13:54 -0000 Archived-At: List-Archive: List-Post: On Sat, 16 Oct 2004 13:02:31 +0300, Yuriy Gomenyuk wrote: > On Sat, 16 Oct 2004 10:47:33 +0400 > Владимир Гусев wrote: > >> On Sat, 16 Oct 2004 13:28:00 +0700, some_x wrote: >> >> > Владимир Гусев wrote: >> > >> >> Здравствуйте! >> >> >> >> Посоветуйте программу для того, чтобы файл *.mp3 переделать в другой >> >> *.mp3 меньшего размера за счет понижения качества звучания (скажем, >> >> вместо 192 kbps и 44 кгц сделать 96 kbps и 22 кгц) >> >> >> > lame? >> может я плохо изучил lame, но там вроде из одного формата в другой. Или >> я >> ошибаюсь? По крайней мере grip c использованием lame не позволил сделать >> такого... > > > Мне кажется - ошибаетесь: > [yuriy@localhost yuriy]$ man lame | grep -A 5 -B 3 downsampl > > --mp3input > Assume the input file is a MP3 file. > Usefull for downsampling from one mp3 to another. As an > exam- > ple, it can be usefull for streaming through an IceCast > server. > If the filename ends in ".mp3" LAME will assume it is > an MP3. > For stdin or MP3 files which do not end in .mp3 you need > to use > this switch. > > -- > > (mo)no > The input will be encoded as a mono signal. If it was a > stereo > signal, it will be downsampled to mono. The downmix is > calcu- > lated as the sum of the left and right channel, attenuated > by 6 > dB. > > -a Mix the stereo input file to mono and encode as mono. > The downmix is calculated as the sum of the left and right > chan- > -- > cat inputfile | lame -r -m m -b 24 -s 22.05 - - > output > > > Streaming mono 44.1 kHz raw pcm, with downsampling to 22.05 kHz: > > cat inputfile | lame -r -m m -b 24 --resample 22.05 - - > > output > > > Из чего делаю вывод, что можно делать то что Вам нужно как из stdin, так > и просто из mp3 файла. > > Проверяем: > > исходный файл: > Playing MPEG stream from track01.cdda.wav.mp3 ... > Bitrate: 192 Kbits/s, Extension value: 0 > Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2 > > 1) делаем сразу из мп3: > > lame track01.cdda.wav.mp3 -s 22.05 -b 96 result.mp3 > Resampling: input 44.1 kHz output 32 kHz > Using polyphase lowpass filter, transition band: 12000 Hz - 12387 Hz > Encoding track01.cdda.wav.mp3 to result.mp3 > Encoding as 32 kHz 96 kbps j-stereo MPEG-1 Layer III (10.7x) qval=2 > Frame | CPU time/estim | REAL time/estim | play/CPU | > ETA > 1652/1654 (100%)| 1:16/ 1:16| 1:17/ 1:18| 0.7761x| > 0:00 > average: 96.0 kbps LR: 201 (12.15%) MS: 1453 (87.85%) > > Как видите - всё выходит (кроме одного - lame не захотел почему то > снижать частоту до 22.05, а "согласился" только до 32, думаю нужно > подобрать необходимые опции...). > > > 2) делаем из стандартного входа (проигрываем тот же исходный мп3 файл): > > > mpg123 -s track01.cdda.wav.mp3 | lame -r -m s --resample 22.05 -b 96 - > result.mp3 > ... > Playing MPEG stream from track01.cdda.wav.mp3 ... > MPEG 1.0 layer III, 192 kbit/s, 44100 Hz stereo > Assuming raw pcm input file > LAME version 3.93 MMX (http://www.mp3dev.org/) > CPU features: i387, MMX (ASM used) > Resampling: input 44.1 kHz output 22.05 kHz > Using polyphase lowpass filter, transition band: 10758 Hz - 11025 Hz > Encoding to result.mp3 > Encoding as 22.05 kHz 96 kbps stereo MPEG-2 Layer III (7.3x) qval=2 > [0:59] Decoding of track01.cdda.wav.mp3 finished. > > > Всё получилось... > супер! Огромное спасибо за столь подробный ответ! -- С уважением, Владимир Гусев