mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-17 18:58:58 +01:00
feat: Use ffmpeg for cover art on non mpeg-4 containers instead of mp4art from deprecated mp4v2-utils package
Closes: https://github.com/KrumpetPirate/AAXtoMP3/issues/203
This commit is contained in:
parent
be8473ffba
commit
c103d4899b
24
AAXtoMP3
24
AAXtoMP3
@ -968,7 +968,29 @@ do
|
||||
|
||||
if [ -f "${cover_file}" ]; then
|
||||
log "Adding cover art"
|
||||
mp4art --add "${cover_file}" "${output_file}"
|
||||
# FFMGEP does not support MPEG-4 containers fully #
|
||||
if [ "${container}" == "mp4" ] ; then
|
||||
mp4art --add "${cover_file}" "${output_file}"
|
||||
# FFMPEG for everything else #
|
||||
else
|
||||
# Create temporary output file name - ensure extention matches previous appropriate output file to keep ffmpeg happy
|
||||
cover_output_file="${output_file%.*}.cover.${output_file##*.}"
|
||||
# Copy audio stream from current output, and video stream from cover file, setting appropriate metadata
|
||||
</dev/null "$FFMPEG" -loglevel quiet \
|
||||
-nostats \
|
||||
-i "${output_file}" \
|
||||
-i "${cover_file}" \
|
||||
-map 0:a:0 \
|
||||
-map 1:v:0 \
|
||||
-acodec copy \
|
||||
-vcodec copy \
|
||||
-id3v2_version 3 \
|
||||
-metadata:s:v title="Album cover" \
|
||||
-metadata:s:v comment="Cover (front)" \
|
||||
"${cover_output_file}"
|
||||
# Replace original output file with version including cover
|
||||
mv "${cover_output_file}" "${output_file}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# -----
|
||||
|
@ -220,13 +220,17 @@ brew install findutils
|
||||
```
|
||||
|
||||
#### mp4art/mp4chaps
|
||||
_Note: This is an optional dependency._
|
||||
_Note: This is an optional dependency, required for adding cover art to m4a and b4b files only._
|
||||
|
||||
__Ubuntu, Linux Mint, Debian__
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install mp4v2-utils
|
||||
```
|
||||
|
||||
On Debian and Ubuntu the mp4v2-utils package has been deprecated and removed, as the upsteam project is no longer maintained.
|
||||
The package was removed in Debian Buster, and Ubuntu Focal [ 20.04 ].
|
||||
|
||||
__CentOS, RHEL & Fedora__
|
||||
```
|
||||
# CentOS/RHEL and Fedora users make sure that you have enabled atrpms repository in system. Let’s begin installing FFmpeg as per your operating system.
|
||||
|
Loading…
Reference in New Issue
Block a user