[FFmpeg-user] Issue with disposition "forced" for a subtitles stream (mov_tex) in a mp4 container
Andrea Giudiceandrea
andreaerdna at libero.it
Sun Nov 29 15:14:47 EET 2020
Dear all,
I'm using ffmpeg (4.3.1-2020-11-19-full_build-www.gyan.dev) on Windows 7
to mux video, audio and subtitles streams in a mp4 container. I'd like
to force the subtitles stream to be displayed by default, so I use the
"-disposition:s:0 forced" option.
However ffmpeg fails to properly set the "disposition" option for the
subtitles stream to "forced" so I need to manually enable the subtitle
when the video is played by VLC media player 3.0.11.
The exact command is:
ffmpeg -i Video.mp4 -i Audio.mp4 -i Sub.vtt -map 0 -map 1 -map 2
-metadata:s:a:0 language=jpn -metadata:s:s:0 language=ita -c:v copy -c:a
copy -c:s mov_text -disposition:a:0 default -disposition:s:0 forced
Video_Audio_Sub.mp4
The relevant part of the command output for the subtitle stream is:
Stream #0:2(ita): Subtitle: mov_text (tx3g / 0x67337874) (forced)
While the subtitles stream is tagged as "(forced)", in the resulting
muxed video the subtitle stream is only tagged as "default" as reported
by ffprobe and mediainfo and is not automatically displayed in VLC:
ffprobe Video_Audio_Sub.mp4
[...]
Stream #0:2(ita): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
(default)
mediainfo Video_Audio_Sub.mp4
[...]
Text
ID : 3
Format : Timed Text
Muxing mode : sbtl
Codec ID : tx3g
Default : Yes
Forced : No
Is this a bug or did I miss something?
For comparison, using mp4box -add Video_Audio.mp4 -add
Sub.srt:txtflags=0xC0000000 -new Video_Audio_Sub.mp4 the subtitles
stream is correctly recognized as "forced" by mediainfo (and as
"default" by ffprobe) and is automatically displayed in VLC:
mediainfo Video_Audio_Sub.mp4
Text
ID : 3
Format : Timed Text
Codec ID : tx3g
Forced : Yes
Thank you in advance for the help.
Regards.
Andrea
More information about the ffmpeg-user
mailing list