====== ffmpeg - Encoding - Set Language ======
FFMPeg uses the [[https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes|ISO 639-2]] codes.
----
===== Set language on a stream =====
-metadata:s:1 language=eng
**NOTE:** Sets metadata language to eng on the stream id 1 (which is, in typical cases, the first audio stream).
----
===== Set language on first subtitle stream =====
-metadata:s:s:0 language=eng
**NOTE:** Sets the metadata language to eng on the first subtitle stream.
----
===== Set language for specific streams =====
-map 0:v \
-map 0:1 -metadata:s:a:0 language=zxx \
-map 0:2 -metadata:s:a:1 language=eng \
-map 0:3 -metadata:s:a:2 language=fra \
-map 0:4 -metadata:s:a:3 language=kin
**NOTE:** The standard includes some codes for special situations:
* mis, for "uncoded languages";
* mul, for "multiple languages";
* qaa-qtz, a range reserved for local use.
* und, for "undetermined";
* zxx, for "no linguistic content, not applicable";
----
===== Set language as Unknown =====
ffmpeg -i in.mkv -map 0:a -metadata:s:a:0 language="und" -metadata:s:a:0 title="Just Music" out.mkv
**NOTE:** **und** stands for Undetermined.
The standard includes some codes for special situations:
* mis, for "uncoded languages";
* mul, for "multiple languages";
* qaa-qtz, a range reserved for local use.
* und, for "undetermined";
* zxx, for "no linguistic content, not applicable";
----
===== References =====
https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes