[FFmpeg-trac] #10015(ffmpeg:open): [feature request] Set disposition(s) based on language, not the stream specifier
FFmpeg
trac at avcodec.org
Tue Jan 9 06:59:49 EET 2024
#10015: [feature request] Set disposition(s) based on language, not the stream
specifier
-------------------------------------+-------------------------------------
Reporter: chm | Owner: (none)
Type: enhancement | Status: open
Priority: wish | Component: ffmpeg
Version: git-master | Resolution:
Keywords: disposition | Blocked By:
language metadata |
Blocking: | Reproduced by developer: 1
Analyzed by developer: 1 |
-------------------------------------+-------------------------------------
Description changed by chm:
Old description:
> As far as I know, setting a disposition for a stream is only based on
> stream specifier.
>
> {{{
> -disposition:s:0 default
> }}}
>
> For videos with streams of multiple languages, it would be great if we
> can also set a disposition based on the language, regardless of its
> stream specifier number.
>
> {{{
> -disposition:s:m:language:eng default
> }}}
>
> If there are multiple subtitles for the same language, and only want to
> set one as default, forced, or any other output, an additional option
> will be helpful too.
>
> In this example, there are 3 Spanish subtitles, and want to set the 3rd
> Spanish subtitle as the default, maybe something like?
>
> {{{
> -disposition:s:m:language:eng:2 default
> }}}
>
> (with 2 referring to Stream #0:4 (the 3rd Spanish subtitle stream))
>
> {{{
> Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 /
> 0x31637661), yuv420p(progressive), 626x360, 1231 kb/s, 26.20 fps, 26.17
> tbr, 10k tbn (default)
> Metadata:
> handler_name : VideoHandler
> vendor_id : [0][0][0][0]
> Stream #0:1[0x3](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
> mono, fltp, 128 kb/s (default)
> Metadata:
> handler_name : SoundHandler
> vendor_id : [0][0][0][0]
> Stream #0:2[0x4](spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
> (default)
> Metadata:
> handler_name : SubtitleHandler
> Stream #0:3[0x5](spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
> Metadata:
> handler_name : SubtitleHandler
> Stream #0:4[0x6](spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
> Metadata:
> handler_name : SubtitleHandler
> Stream #0:5[0x7](eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
> Metadata:
> handler_name : SubtitleHandler
> Stream #0:6[0x8](fra): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
> Metadata:
> handler_name : SubtitleHandler
> }}}
>
> ----
>
> Reason for request: I have hundreds of videos with multiple subtitles in
> different languages, however a lot of them are default/forced in another
> language and I want to set all of them to default in English WITHOUT
> removing the other languages.
>
> Thank you!
New description:
As far as I know, setting a disposition for a stream is only based on
stream specifier.
{{{
-disposition:s:0 default
}}}
For videos with streams of multiple languages, it would be great if we can
also set a disposition based on the language, regardless of its stream
specifier number.
{{{
-disposition:s:m:language:eng default
}}}
If there are multiple subtitles for the same language, and only want to
set one as default, forced, or any other output, an additional option will
be helpful too.
In this example, there are 3 Spanish subtitles, and want to set the 3rd
Spanish subtitle as the default, maybe something like?
{{{
-disposition:s:m:language:spa:2 default
}}}
(with 2 referring to Stream #0:4 (the 3rd Spanish subtitle stream))
{{{
Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p(progressive), 626x360, 1231 kb/s, 26.20 fps, 26.17
tbr, 10k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x3](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
mono, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:2[0x4](spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
(default)
Metadata:
handler_name : SubtitleHandler
Stream #0:3[0x5](spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
Metadata:
handler_name : SubtitleHandler
Stream #0:4[0x6](spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
Metadata:
handler_name : SubtitleHandler
Stream #0:5[0x7](eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
Metadata:
handler_name : SubtitleHandler
Stream #0:6[0x8](fra): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
Metadata:
handler_name : SubtitleHandler
}}}
----
Reason for request: I have hundreds of videos with multiple subtitles in
different languages, however a lot of them are default/forced in another
language and I want to set all of them to default in English WITHOUT
removing the other languages.
Thank you!
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10015#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list