I tried googling a way to set the language of a subtitle stream with ffmpeg and found the -slang option. So I tried the following command but immediately receive an error:
The option
-metadata:s:1 language=eng
sets metadata language to eng
on the stream id 1 (which is, in typical cases, the first audio stream). Whereas the option
-metadata:s:s:0 language=eng
sets the metadata language to eng
on the first subtitle stream.
From ffmpeg manpage:
-metadata[:metadata_specifier] key=value (output,per-metadata)
Set a metadata key/value pair.An optional
metadata_specifier
may be given to set metadata on streams or chapters. See "-map_metadata" documentation for details.s[:stream_spec]
per-stream metadata.stream_spec
is a stream specifier as described in the Stream specifiers chapter. In an input metadata specifier, the first matching stream is copied from. In an output metadata specifier, all matching streams are copied to.
And finally from the chapter of stream specifiers, we see
Possible forms of stream specifiers are:
stream_index
Matches the stream with this index. E.g. "-threads:1 4" would set the thread count for the second stream to 4.
stream_type[:stream_index]
stream_type
is one of: 'v' for video, 'a' for audio, 's' for subtitle, 'd' for data and 't' for attachments. Ifstream_index
is given, then matches stream numberstream_index
of this type. Otherwise matches all streams of this type.