Quantcast
Channel: FFmpeg | ニコラボ
Viewing all articles
Browse latest Browse all 311

mp4, mp3 にカバーアートを付ける

$
0
0

カバーアートを付けるとエクスプローラにサムネイルが表示、変更できる。

H.264 だとサムネイルが表示されるが、H.265 だと表示されないのがこれで表示できる。サムネイルは PNG でも可能。
ffmpeg -i movie.mp4 -i thumb.jpg -disposition:v:1 attached_pic -map 0 -map 1 -c copy movie-with-cover.mp4

MP3 の場合。
ffmpeg -i audio.mp3 -i thumb.jpg -disposition:v:1 attached_pic -map 0 -map 1 -c copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" audio-with-cover.mp3

ffmpeg でメタデータを加える | ニコラボ
albumart – How to add album art with ffmpeg? – Stack Overflow

disposition の設定
音声が2つ以上あるときに再生したとき最初に流れる音声を代えられる。ただし MKV コンテナに限る。

2番目の音声を最初に再生するコマンド例。
ffmpeg -i movie.mp4 -map 0:v -map 0:a -c copy -disposition:a:0 0 -disposition:a:1 default output.mkv

ffmpeg Documentation
-disposition[:stream_specifier] value (output,per-stream)
具体的にそれぞれにどのような効果があるのか分からない。

  • default
  • dub
  • original
  • comment
  • lyrics
  • karaoke
  • forced
  • hearing_impaired
  • visual_impaired
  • clean_effects
  • attached_pic
  • captions
  • descriptions
  • dependent
  • metadata

Viewing all articles
Browse latest Browse all 311

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>