I saw somebody use "-metadata:s:v:0" in their commandline for FFMPEG, rather than the much simpler "-metadata" commandline switch. In this context, what does :s, :v, and :0 mean? I was under the impression that the only valid selectors for commands were :a (for audio), :v (for video), and :d (for data, usually subtitles). I'm not familiar with how the selectors are being used in this metadata command.
+ Reply to Thread
Results 1 to 8 of 8
It is telling FFMPEG which metadata to use, in this case track 0 of the video. Bear in mind each file type has different allowable metadata designator:
Generally to add NEW metadata:
location : Rome, Italy
camera type : SONY
camera mode : movie
weather : rainy
In it's simplest form, we can use the command:
ffmpeg -i videoname.avi -metadata location="Rome, Italy" -metadata "camera type"="SONY" -metadata "camera mode"=movie -metadata weather="rainy" videoname.wmv
UPDATE: This page has tons of information on Metadata:
Last edited by Budman1; 15th May 2015 at 01:54.
Ok, so I guess that :0 after the :v means the first video stream (if the MP4 file had multiple streams). My MP4 file has only one video stream, so :0 would be unnecessary for me. But what does the :s mean BEFORE the :v ? I don't need :s before the :v after -c (for codec selection), so what is the purpose of having :s before the :v after -metadata (for metadata selection. Please explain.
The :s part indicates which stream to use for or apply the metadata. Seems redundant since you also have the stream type selectors available. It probably just exists to make it easier for the code to handle complex -map_metadata options.
Last edited by zing269; 15th May 2015 at 07:59. Reason: fix emoticon
FFMPEG manual that covers stuff like this?