From: "Konstantin S. Uvarin" <khedin@mail.ru>
To: sp_archer@meta.ua,
ALT Linux Community general discussions
<community@lists.altlinux.org>
Subject: Re: [Comm] Как скопировать теги из одного mp3 в другой?
Date: Thu, 6 Aug 2009 15:19:26 +0400
Message-ID: <200908061519.26467.khedin@mail.ru> (raw)
In-Reply-To: <56743.194.44.242.194.1249495605.metamail@webmail.meta.ua>
On Wednesday 05 August 2009 22:06:45 Olexander Chernetskyy wrote:
> Помогите плиз
> Нужно понизить битрейт файлов в каталоге и не потерять теги.
> Вот всё на что хватило ума:
> ---8<---
> #!/bin/sh
> [ -d 128 ] || mkdir 128
> for i in *[mM][pP]3
> do
> lame -b 128 $i 128/$i
> TAG=`mp3info -p "-t %t -a %a -l %l -y %y -c %c -n %n -g %g" $i`
> # echo $TAG
> # mp3info $TAG 128/$i
> done
Э, так mp3info умеет \n внутри -p. Ну и вот, делаем разбивку на строки и
скармливаем xargs. Должно сработать. Если только там нет пункта lyrics, в
котором как раз могут быть переносы строки.
TAG=`mp3info -p '-t\n%t\n-a\n%a\n-l\n%l\n-y\n%y\n-c\n%c\n-n\n%n\n-g\n%g' "$i"`
# more stuff...
printf %s "$TAG" | xargs -d\\n mp3info 128/"$i"
echo использовать нельзя, т.к. съест переносы
P.S. Похоже, в mp3info баг: если в строке формата указать \x00, то она
обрезается ровно по это место.
--
Konstantin S. Uvarin jabber:lodin@jabber.ru
фигика
next prev parent reply other threads:[~2009-08-06 11:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 18:06 Olexander Chernetskyy
2009-08-05 18:58 ` Dmitry Chistikov
2009-08-05 19:22 ` Max Ivanov
2009-08-06 6:54 ` Dmitry Chistikov
2009-08-06 11:19 ` Konstantin S. Uvarin [this message]
2009-08-06 12:29 ` Dmitry Chistikov
2009-08-07 12:37 ` [Comm] [JT] " Konstantin S. Uvarin
2009-08-07 14:26 ` Dmitry Chistikov
2009-08-06 16:00 ` [Comm] " Olexander Chernetskyy
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=200908061519.26467.khedin@mail.ru \
--to=khedin@mail.ru \
--cc=community@lists.altlinux.org \
--cc=sp_archer@meta.ua \
/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