Opened 3 years ago

Last modified 3 years ago

#9018 new defect

Issue with disposition "forced" for a subtitles stream (mov_tex) in a mp4 container

Reported by: Andrea Giudiceandrea Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Using ffmpeg ( on Windows 7 to mux video, audio and subtitles streams in a mp4 container, I use the "-disposition:s:0 forced" option in order to force the subtitles stream to be automatically displayed.

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 command output, the subtitle stream is only tagged as "default" in the resulting muxed video 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
ID : 3
Format : Timed Text
Muxing mode : sbtl
Codec ID : tx3g
Default : Yes
Forced : No

For comparison, using mp4box -add Video_Audio.mp4 -add -new Video_Audio_Sub.mp4 the subtitles stream is correctly recognized as "forced" by mediainfo (and incorrectly only as "default" by ffprobe) and it is automatically displayed in VLC:

mediainfo Video_Audio_Sub.mp4
ID : 3
Format : Timed Text
Codec ID : tx3g
Forced : Yes

Change History (1)

comment:1 by Andrea Giudiceandrea, 3 years ago

Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.