mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-18 03:08:57 +01:00
Embedded cover art to (chapter) MP3's
This commit is contained in:
parent
15abb34c0e
commit
1ac66d1a94
10
AAXtoMP3
10
AAXtoMP3
@ -83,6 +83,10 @@ do
|
|||||||
|
|
||||||
debug "Created ${full_file_path}."
|
debug "Created ${full_file_path}."
|
||||||
|
|
||||||
|
cover_path="${output_directory}/cover.jpg"
|
||||||
|
debug "Extracting cover into ${cover_path}..."
|
||||||
|
</dev/null ffmpeg -loglevel error -activation_bytes "${auth_code}" -i "${path}" -an -codec:v copy "${cover_path}"
|
||||||
|
|
||||||
if [ "${mode}" == "chaptered" ]; then
|
if [ "${mode}" == "chaptered" ]; then
|
||||||
chaptercount=$($GREP -Pc "Chapter.*start.*end" $metadata_file)
|
chaptercount=$($GREP -Pc "Chapter.*start.*end" $metadata_file)
|
||||||
debug "Extracting ${chaptercount} chapter files from ${full_file_path}..."
|
debug "Extracting ${chaptercount} chapter files from ${full_file_path}..."
|
||||||
@ -95,7 +99,8 @@ do
|
|||||||
read -r -u9 _
|
read -r -u9 _
|
||||||
read -r -u9 _ _ chapter
|
read -r -u9 _ _ chapter
|
||||||
chapter_file="${output_directory}/${title} - $(printf %0${#chaptercount}d $chapternum) ${chapter}.${extension}"
|
chapter_file="${output_directory}/${title} - $(printf %0${#chaptercount}d $chapternum) ${chapter}.${extension}"
|
||||||
</dev/null ffmpeg -loglevel error -stats -i "${full_file_path}" -ss "${start%?}" -to "${end}" -codec:a copy -metadata track="${chapter}" "${chapter_file}"
|
</dev/null ffmpeg -loglevel error -stats -i "${full_file_path}" -i "${cover_path}" -ss "${start%?}" -to "${end}" -c copy -map 0:0 -map 1:0 -id3v2_version 3 \
|
||||||
|
-metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" -metadata track="${chapter}" "${chapter_file}"
|
||||||
chapternum=$((chapternum + 1 ))
|
chapternum=$((chapternum + 1 ))
|
||||||
fi
|
fi
|
||||||
done 9< "$metadata_file"
|
done 9< "$metadata_file"
|
||||||
@ -103,9 +108,6 @@ do
|
|||||||
debug "Done creating chapters. Chaptered files contained in ${output_directory}."
|
debug "Done creating chapters. Chaptered files contained in ${output_directory}."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cover_path="${output_directory}/cover.jpg"
|
|
||||||
debug "Extracting cover into ${cover_path}..."
|
|
||||||
</dev/null ffmpeg -loglevel error -activation_bytes "${auth_code}" -i "${path}" -an -codec:v copy "${cover_path}"
|
|
||||||
debug "Done."
|
debug "Done."
|
||||||
rm "${metadata_file}"
|
rm "${metadata_file}"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user