mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-18 03:08:57 +01:00
faster chapter splitting
Since there is an issue with this fix when applied on flac option, the changes dont take effect on flac. For more information have a look in KrumpetPirate/AAXtoMP3 issue #142.
This commit is contained in:
parent
440c6302fb
commit
c4c5470b6b
21
AAXtoMP3
21
AAXtoMP3
@ -542,14 +542,18 @@ do
|
|||||||
chapter_title="${title}-$(printf %0${#chaptercount}d $chapternum) ${chapter}"
|
chapter_title="${title}-$(printf %0${#chaptercount}d $chapternum) ${chapter}"
|
||||||
chapter_file="${output_directory}/${chapter_title}.${extension}"
|
chapter_file="${output_directory}/${chapter_title}.${extension}"
|
||||||
|
|
||||||
# the ID3 tags must only be specified for *.mp3 files,
|
# Since the .aax file allready got converted we can use
|
||||||
# the other container formats come with their own
|
# -acodec copy, which is much faster than a reencodation.
|
||||||
# tagging mechanisms.
|
# Since there is an issue when using copy on flac, where
|
||||||
id3_version_param=""
|
# the duration of the chapters gets shown as if they where
|
||||||
if test "${extension}" = "mp3"; then
|
# as long as the whole audiobook.
|
||||||
id3_version_param="-id3v2_version 3"
|
chapter_codec=""
|
||||||
|
if test "${extension}" = "flac"; then
|
||||||
|
chapter_codec="-acodec flac "${compression_level_param}""
|
||||||
|
else
|
||||||
|
chapter_codec="-acodec copy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Big Long chapter debug
|
# Big Long chapter debug
|
||||||
debug_vars "Chapter Variables:" cover_file chapter_start chapter_end id3_version_param chapternum chapter_title chapter_file
|
debug_vars "Chapter Variables:" cover_file chapter_start chapter_end id3_version_param chapternum chapter_title chapter_file
|
||||||
if [ "$((${continueAt} > ${chapternum}))" = "0" ]; then
|
if [ "$((${continueAt} > ${chapternum}))" = "0" ]; then
|
||||||
@ -564,8 +568,7 @@ do
|
|||||||
-i "${cover_file}" \
|
-i "${cover_file}" \
|
||||||
-map 0:0 \
|
-map 0:0 \
|
||||||
-map 1:0 \
|
-map 1:0 \
|
||||||
-acodec "${codec}" ${id3_version_param} \
|
${chapter_codec} \
|
||||||
${compression_level_param} \
|
|
||||||
-metadata:s:v title="Album cover" \
|
-metadata:s:v title="Album cover" \
|
||||||
-metadata:s:v comment="Cover (Front)" \
|
-metadata:s:v comment="Cover (Front)" \
|
||||||
-metadata track="${chapternum}" \
|
-metadata track="${chapternum}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user