Иван Лох wrote:

On Tue, Feb 08, 2005 at 05:19:01PM +0200, Nikita Salnikov-Tarnovski wrote:


Добрый вечер.
Не подскажете, как разрезать один большой wav файл на маленькие wav файлы, использую cue файл? У меня есть образ Аудио



#!/usr/bin/perl -w my ($cue)=grep /\.cue$/, @ARGV; my ($wav)=grep /\.wav$/, @ARGV; my ($title, $author, @tracks, @indexes, @titles, @authors); open CUE, "<$cue"; while(<CUE>){ push @authors,$author if ($author)=/^\s*PERFORMER\s+\"(.*)\"\s*$/; push @tracks, $track if ($track)=/^\s*TRACK\s+(\d+)\s+AUDIO\s*$/; push @indexes, $i if ($i)=/^\s*INDEX\s+\d+\s+(\d{2}:\d{2}):\d{2}\s*$/; push @titles, $t if ($t)=/^\s*TITLE\s+\"(.*)\"\s*$/; } shift @indexes; $_=join(" ",@indexes); `wavsplit $wav $_`; my ($base)=$wav=~/(.*)\.wav$/; $album=shift @titles; $author=shift @authors; foreach(<$base/*.wav>){ $title=shift @titles; $author=shift @authors; my ($file)=/\/(\d+)\.wav$/; $file.=".mp3"; print "lame --preset extreme --tt $title --ta $author --tl $album --tg 32 $_ $file\n" ; `lame --preset extreme --tt \"$title\" --ta \"$author\" --tl \"$album\" --tg 32 $_ $file\n` }



Большое спасибо :) lame на flac я смогу и сам заменить ;)

Nikem.


-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Ответить