ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Владимир Гусев" <vova1971@narod.ru>
To: community@altlinux.ru
Subject: Re: [Comm] из mp3 в.. mp3
Date: Sat, 16 Oct 2004 20:14:26 +0400
Message-ID: <opsfy0qcidou9itb@post.cnt.ru> (raw)
In-Reply-To: <20041016130231.497f0984.Y_V_G@ua.fm>

On Sat, 16 Oct 2004 13:02:31 +0300, Yuriy Gomenyuk <Y_V_G@ua.fm> wrote:

> On Sat, 16 Oct 2004 10:47:33 +0400
> Владимир Гусев <vova1971@narod.ru> wrote:
>
>> On Sat, 16 Oct 2004 13:28:00 +0700, some_x <some_x@inbox.ru> 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 <stdin> 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.
>
>
> Всё получилось...
>
супер! Огромное спасибо за столь подробный ответ!

-- 
С уважением, Владимир Гусев


      reply	other threads:[~2004-10-16 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-16  6:23 Владимир Гусев
2004-10-16  6:28 ` some_x
2004-10-16  6:47   ` Владимир Гусев
2004-10-16  8:05     ` Dolgov OV
2004-10-16 10:02     ` Yuriy Gomenyuk
2004-10-16 16:14       ` Владимир Гусев [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=opsfy0qcidou9itb@post.cnt.ru \
    --to=vova1971@narod.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git