From: "Andrey Liakhovets" <liakh@dol.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] Как с помощью sox создать файл тишины?
Date: Tue, 01 Jun 2010 10:26:38 +0400
Message-ID: <web-836669223@cgp.dol.ru> (raw)
In-Reply-To: <59082.195.230.140.18.1275337935.metamail@webmail.meta.ua>
On Mon, 31 May 2010 23:32:15 +0300 (EEST) "Olexander Chernetskyy" wrote:
...
>[dvd-slideshow] Creating silence audio file for 0:0:40.000
>sox: invalid option -- w
>sox: SoX v14.3.0
>sox FAIL sox: invalid option
>
>Ему нужно создатиь 40 секунд тишины и на этом он обламывается.
>Нашел я в скрипте эту строку:
>sox -t raw -s -w -c 2 -r $audio_sample_rate /dev/zero -w -s -c 2 -r
>$audio_sample_rate "$tmpdir"/audio1_$i_padded.raw trim "0" "$song_end_hms"
>
>Если подставить значения переменных то приблизительно будет так:
>sox -t raw -s -w -c 2 -r 48000 /dev/zero -w -s -c 2 -r 48000 out.raw trim
>"0" "0:0:40.000"
...
В ALT Linux 4.0 это нормально работает.
Там sox-13.0.0-alt2, и в его man'е сказано, что
"... -b/-w/-l/-d ... are ... aliases for -1/-2/-4/-8 ...".
Очевидно, в более поздних версиях это изменилось, но -2 остался.
Так что заменяем в этой строчке все -w на -2 и -- везде работает.
(Кстати, эта команда просто делает файл из 40*48000*2*2 нулей,
т.е. можно и так:
$ dd if=/dev/zero of=out.raw bs=48000 count=$((40*2*2))
Фактически, sox здесь нужен для правильного вычисления
$audio_sample_rate * $song_end_hms).
Андрей Ляховец
next prev parent reply other threads:[~2010-06-01 6:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 20:32 Olexander Chernetskyy
2010-06-01 6:26 ` Andrey Liakhovets [this message]
2010-06-01 17:48 ` [Comm] update kernel и звуковые драйверы Калинин Максим
2010-06-01 17:51 ` Andrey Rahmatullin
2010-06-01 18:11 ` Калинин Максим
2010-06-01 18:44 ` Motsyo Gennadi aka Drool
2010-06-01 18:52 ` Калинин Максим
2010-06-01 18:56 ` Motsyo Gennadi aka Drool
2010-06-01 20:16 ` Хихин Руслан
2010-06-01 20:24 ` Motsyo Gennadi aka Drool
2010-06-02 6:39 ` Калинин Максим
2010-06-02 11:03 ` Motsyo Gennadi aka Drool
2010-06-03 13:32 ` Калинин Максим
2010-06-03 13:46 ` Andrii Dobrovol`s`kii
2010-06-03 13:48 ` Andrey Rahmatullin
2010-06-03 14:13 ` Калинин Максим
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=web-836669223@cgp.dol.ru \
--to=liakh@dol.ru \
--cc=community@lists.altlinux.org \
/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