2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

動画ファイルの撮影日を維持しながら圧縮する方法

Posted at

FFmpegでは、動画ファイルの撮影日を維持しながら圧縮するために、 -map_metadata オプションを使用することができます。以下は、撮影日を維持したまま動画ファイルを圧縮するための例です。

ffmpeg -i input.mp4 -c:v libx264 -crf 23 -c:a copy -map_metadata 0 output.mp4

この例では、入力ファイル input.mp4 を H.264 でエンコードして、音声はそのままコピーし、撮影日を維持するように -map_metadata オプションを使用しています。また、出力ファイル名は output.mp4 となっています。

なお、 -map_metadata オプションの引数には、元のメタデータを持つストリームのインデックスを指定する必要があります。この例では、 0 を指定していますが、元のファイルによっては、異なるインデックスを指定する必要がある場合がありますので、注意してください。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?