my-box-371

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » my-box-371 » Linux » Перекодировка мр3 Теги и Понижение битрейта(не готово)


Перекодировка мр3 Теги и Понижение битрейта(не готово)

Сообщений 1 страница 5 из 5

1

Систематизация информации

как оказалось есть некоторые загвоздки, которые хотелось бы разрешить....

id3v2
A command line id3v2 tag editor
A command-line tool to add, modify, remove, or view ID3v2 tags, as well as
convert or list ID3v1 tags. ID3 tags are commonly embedded in compressed
music files such as MP3 and are the standard way to more fully describe the
work than would normally be allowed by putting the information in the
filename.

eyed3
Display and manipulate id3-tags on the command-line
A command-line editor to add/edit/remove ID3-tags on mp3 files.
It supports version 1.0,1.1,2.3 and 2.4 of the ID3 standard.
Additionally it displays several informations about the file
such as length and bitrate from an MP3 file.

mp3info
An MP3 technical info viewer and ID3 1.x tag editor
MP3Info has an interactive mode (using curses) and a command line mode.
MP3Info can display ID3 tag information as well as various technical aspects
of an MP3 file including playing time, bit-rate, sampling frequency and other
attributes in a pre-defined or user-specifiable output format.

If you prefer GUI you should use mp3info-gtk package.

Скрипт массовой ( пакетной ) перекодировки mp3 c сохранением тегов.

Код:
mkdir low
for i in *.mp3;
do

my_title=`id3info "$i" | grep TIT2 | sed -e "s/=== TIT2 (Title\/songname\/content description): /""/"`;

my_artist=`id3info "$i" | grep TPE1 | sed -e "s/=== TPE1 (Lead performer(s)\/Soloist(s)): /""/"`;

my_album=`id3info "$i" | grep TALB | sed -e "s/=== TALB (Album\/Movie\/Show title): /""/"`;

lame -h -b 112 -m s "$i" low/"$i" --ta "$my_artist" --tt "$my_title" --tl "$my_album"

done

0

2

массовое перекодирование тэгов

mid3iconv

Код:
#!/bin/bash
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -eCP1251 --remove-v1

0

3

конвертирование тегов

FROM_CHARSET=from_charset TO_CHARSET=to_charset ./id3conv.sh file1.mp3 ... fileN.mp3

Перекодирует тэги из “from_charset” в “to_charset”.

Код:
#!/bin/sh
#
# Roman Bogorodskiy <novel+freebsd+org>
#
# To use it, you need:
# 	- iconv
#	- id3tag and id3info (comes with id3lib)
#

FROM_CHARSET=${FROM_CHARSET:="utf-8"}
TO_CHARSET=${TO_CHARSET:="cp1251"}

usage() {
	cat <<EOF
Usage: FROM_CHARSET=from_charset TO_CHARSET=to_charset `basename $0` file1.mp3 ... fileN.mp3

See iconv(1) for supported charsets.
EOF
	exit 0
}

id3conv() {
	echo -n "Converting $1... "
	title=$(id3info $1|grep TIT2|sed -e "s/^[a-zA-Z0-9 =/()]*\:\ //"|iconv -f ${FROM_CHARSET} -t ${TO_CHARSET})
	artist=$(id3info $1|grep TPE1|sed -e "s/^[a-zA-Z0-9 =/()]*\:\ //"|iconv -f ${FROM_CHARSET} -t ${TO_CHARSET})
	album=$(id3info $1|grep TALB|sed -e "s/^[a-zA-Z0-9 =/()]*\:\ //"|iconv -f ${FROM_CHARSET} -t ${TO_CHARSET})
	id3tag -a "${artist}" -A "${album}" -s "${title}" $1 2>&1 > /dev/null
	echo "done"
}

if test $# -lt 1
then
	usage
fi

echo
echo "WARNING! IT CAN DAMAGE YOUR TAGS! YOU'VE BEEN WARNED!"
echo
echo "--| Converting from ${FROM_CHARSET} to ${TO_CHARSET}"
for i in $*; do
	id3conv $i;
done

echo

0

4

Перекодировка mp3 тэгов

Код:
for i in *mp3; do id3tag -s"`id3info "${i}" | iconv -f CP1251 -t KOI8R | grep "=== TIT2" | sed -e 's/^.*: //'`
" "${i}" >  /dev/null && id3tag -a"`id3info "${i}" | iconv -f CP1251 -t KOI8R | grep "=== TPE1" | sed -e 's/^.
*: //'`" "${i}" > /dev/null &&  id3tag -A"`id3info "${i}" | iconv -f CP1251 -t KOI8R | grep "=== TALB" | sed -
e 's/^.*: //'`" "${i}" > /dev/null; done

0

5

ID3 tag options: (by lame man)

--tt title  audio/song title (max 30 chars for version 1 tag)

--ta artist  audio/song artist (max 30 chars for version 1 tag)

--tl album  audio/song album (max 30 chars for version 1 tag)

--ty year  audio/song year of issue (1 to 9999)

--tc comment  user-defined text (max 30 chars for v1 tag, 28 for v1.1)

--tn track  audio/song track number (1 to 255, creates v1.1 tag)

--tg genre  audio/song genre (name or number in list)

--add-id3v2  force addition of version 2 tag

--id3v1-only  add only a version 1 tag

--id3v2-only  add only a version 2 tag

--space-id3v1  pad version 1 tag with spaces instead of nulls

--pad-id3v2  pad version 2 tag with extra 128 bytes

--genre-list  print alphabetically sorted ID3 genre list and exit

--ignore-tag-errors  ignore errors in values passed for tags, use defaults in case an error occurs

0


Вы здесь » my-box-371 » Linux » Перекодировка мр3 Теги и Понижение битрейта(не готово)


создать форум