From 349eea6ea65d4f5947520a7a70e76479ab04d2c4 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Sun, 27 Jan 2013 16:37:22 +0100 Subject: [PATCH] Shell: audio transcoder with tag parameters. --- .shell.d/funs_transcode | 326 +++++++++++++++++++++++++++++----------- 1 file changed, 239 insertions(+), 87 deletions(-) diff --git a/.shell.d/funs_transcode b/.shell.d/funs_transcode index 2cecb672..035abd49 100644 --- a/.shell.d/funs_transcode +++ b/.shell.d/funs_transcode @@ -80,11 +80,7 @@ tc_text_2utf8 () ## You can easily set output folder to current folder with TC_AUDIO_DEST=".". TC_AUDIO_DEST="/media/data1/Musics/" -## OGG quality ranges from -1 to 10. If TC_AUDIO_QUAL is 0, bitrate will be set -## automatically according to the source. -TC_AUDIO_QUAL=0 - -## OGG values. +## OGG quality ranges from -1 to 10. ## -q-1 45 kbit/s ## -q0 64 kbit/s ## -q1 80 kbit/s @@ -99,11 +95,10 @@ TC_AUDIO_QUAL=0 ## -q10 500 kbit/s ## Artists: we use same value for artist and album_artist. +## Genres: since this is not universal by nature, we do not put a genre in tags. +## Composer: not universal neither, we prefer ARTIST over COMPOSER, so COMPOSER will be empty. -## Genres: since this is not universal by nature, we do not put a genre in tags, -## except for Classical and Soundtrack. -TC_AUDIO_GENRE="" - +## TODO: implement. ## Check for # MP3 CBR # In-tag Covers @@ -113,17 +108,9 @@ tc_audio_scan() echo "void" } -## TEST: move png,jpg and name $ALBUM - Cover.$EXT. if multiple png,jpg, append counter. TEST. -## TEST: tr some chars like ยด to '. TEST. -## TEST: remove useless tags. TEST. -## TEST: dynamic quality. If aac or OGG, do not reencode. If FLAC or WavPack, reencode -q9. TEST. -## TEST: remove cover from tags. TEST. -## TEST: case checking. handle roman numerals. Handle initials. Handle exception list. TEST. -## TEST: if dest exist, append date. - -## TODO: Empty composer field. ## TODO: cover resolution check. Should be > 100x100. Above <1000x1000 should give a warning. ## TODO: extract cover from tags if checksum does not match any from current folder. +## TODO: Empty composer field. ## TODO: tag parameters. # -a artist @@ -141,6 +128,125 @@ tc_audio_scan() ## should leave the only covers you want to keep in the working folder. tc_audio_transcode() { + _printhelp () + { + cat <