Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFmpeg video metadata change

Tags:

ffmpeg

I am trying to change the video stream metadata. See (Change This Metadata) below. I can change the title of the movie ok but not any others. What is the ffmpeg line to change this.

This line below changes "Title Of The Movie" only

ffmpeg -i Input.mkv -metadata title="New Title" -c:v copy -c:a copy -c:s copy Output.mkv

Input #0, matroska,webm, from 'Input.mkv':
Metadata:
title           : Title Of The Movie
encoder         : libebml v1.2.3 + libmatroska v1.3.0
creation_time   : 2014-08-02 12:58:30
Duration: 02:15:54.21, start: 0.000000, bitrate: 8177 kb/s
Chapter #0.0: start 0.000000, end 208.666778
Metadata:
  title           : Chapter 01
Chapter #0.1: start 208.666778, end 811.727578
Metadata:
  title           : Chapter 02
Chapter #0.2: start 811.727578, end 1077.868444
Metadata:
  title           : Chapter 03
Chapter #0.3: start 1077.868444, end 1345.302289
Metadata:
  title           : Chapter 04
Chapter #0.4: start 1345.302289, end 2000.415067
Metadata:
  title           : Chapter 05
Chapter #0.5: start 2000.415067, end 2487.276444
Metadata:
  title           : Chapter 06
Chapter #0.6: start 2487.276444, end 3097.302533
Metadata:
  title           : Chapter 07
Chapter #0.7: start 3097.302533, end 3503.958778
Metadata:
  title           : Chapter 08
Chapter #0.8: start 3503.958778, end 4060.347956
Metadata:
  title           : Chapter 09
Chapter #0.9: start 4060.347956, end 4582.202622
Metadata:
  title           : Chapter 10
Chapter #0.10: start 4582.202622, end 5083.078000
Metadata:
  title           : Chapter 11
Chapter #0.11: start 5083.078000, end 5537.698822
Metadata:
  title           : Chapter 12
Chapter #0.12: start 5537.698822, end 5826.612444
Metadata:
  title           : Chapter 13
Chapter #0.13: start 5826.612444, end 6553.088200
Metadata:
  title           : Chapter 14
Chapter #0.14: start 6553.088200, end 6903.730156
Metadata:
  title           : Chapter 15
Chapter #0.15: start 6903.730156, end 7271.055444
Metadata:
  title           : Chapter 16
Chapter #0.16: start 7271.055444, end 7582.241333
Metadata:
  title           : Chapter 17
Chapter #0.17: start 7582.241333, end 8153.937444
Metadata:
  title           : Chapter 18
Chapter #0.18: start 8153.937444, end 8154.208000
Metadata:
  title           : Chapter 19
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
  title           : Change This Metadata
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
  title           : Eng
Stream #0:2(eng): Subtitle: subrip (default)
Metadata:
  title           : Eng
like image 959
Warren Avatar asked Oct 31 '14 02:10

Warren


1 Answers

Ok I have found this which works:

ffmpeg -i Input.mkv -metadata:s:v:0 title="H264 Video" -c:v copy -c:a copy -c:s copy Output.mkv

I think :s:v:0 some of the comments stands for:

:v = Video stream :0 = Use first video stream

like image 69
Warren Avatar answered Sep 23 '22 06:09

Warren