ffmpeg : music meta add mka tags.
This commit is contained in:
parent
9ce84b823d
commit
127ea108e0
|
@ -25,7 +25,7 @@ ffmpeg_mux_cover()
|
|||
mkdir out
|
||||
|
||||
for file in *.${format}; do
|
||||
ffmpeg -i "${file}" -i "${cover}" -map 0 -map 0:-v -map 1 -codec copy -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" -disposition:v attached_pic ./out/"${file}" || return 1
|
||||
ffmpeg -i "${file}" -i "${cover}" -map 0 -map 0:-v? -map 1 -codec copy -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" -disposition:v attached_pic ./out/"${file}" || return 1
|
||||
done
|
||||
|
||||
mv out/* .
|
||||
|
@ -48,6 +48,7 @@ ffmpeg_music_meta()
|
|||
local artist="${PWD%/*}"; artist="${artist##*/}"; artist="${artist//_/ }"
|
||||
local album="${PWD##*/}"; album="${album#*_}"; album="${album//_/ }"
|
||||
local year="${PWD##*/}"; year="${year%%_*}"
|
||||
# local total=$(ls *.${format} | wc -l)
|
||||
|
||||
mkdir out
|
||||
|
||||
|
@ -56,7 +57,7 @@ ffmpeg_music_meta()
|
|||
local title="${file#*_}"; title="${title%.*}"; title="${title//_/ }"
|
||||
|
||||
# echo "${artist}; ${album}; ${year}; ${track}; ${title}"
|
||||
ffmpeg -i "${file}" -map 0 -c copy -metadata "artist=${artist}" -metadata "album_artist=${artist}" -metadata "album=${album}" -metadata "date=${year}" -metadata "year=${year}" -metadata "track=${track}" -metadata "title=${title}" ./out/"${file}" || return 1
|
||||
ffmpeg -i "${file}" -map 0 -c copy -metadata "artist=${artist}" -metadata "album_artist=${artist}" -metadata "album=${album}" -metadata "date=${year}" -metadata "year=${year}" -metadata "date_released=${year}" -metadata "track=${track}" -metadata "part_number=${track}" -metadata "title=${title}" ./out/"${file}" || return 1
|
||||
done
|
||||
|
||||
mv out/* .
|
||||
|
|
Reference in a new issue