[FFmpeg-trac] #8416(avformat:new): disposition option ignored when muxing hls from a web url and srt subtitle file together in an mkv container
FFmpeg
trac at avcodec.org
Tue Dec 10 05:29:35 EET 2019
#8416: disposition option ignored when muxing hls from a web url and srt subtitle
file together in an mkv container
-------------------------------------+-------------------------------------
Reporter: bgx90 | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: 4.2 | Resolution:
Keywords: disposition | Blocked By:
mkv |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by bgx90):
Yes, the Matroska muxer will set all tracks of a type to default when no
track has the default flag explicitly set to 0 or 1 via the disposition
option. However, The option used in #8173(ticket) is
{{{-disposition[:stream_specifier] 0}}} which does not do the same thing
as the option {{{-disposition:s -default}}} which is what I am using.
{{{-disposition:s -default}}} explicitly sets the default flag to 0
(false); {{{-disposition[:stream_specifier] 0}}} removes the dispositions
entirely.
If I have an mkv file (input.mkv) with a single subtitle stream and that
subtitle stream is marked as default, I can create a new mkv with the
subtitle stream not marked as default with this command:
{{{% ffmpeg -i input.mkv -codec copy -disposition:s -default
no_default_subtitles.mkv}}}
However, when I mux a local mkv and a local subtitle file together, I can
successfully create a new mkv with no default subtitle whether or not I
include {{{-disposition:s -default}}}. I would have expected that
{{{-disposition:s -default}}} would be required in this case to prevent
the subtitle stream from being flagged as default. This behavior seems
strange, but is not a problem for me.
The problem I am having is that when I try to mux streams coming from a
web url in TS segments with the local subtitle file the subtitle track
gets flagged as default even though I include the option {{{-disposition:s
-default}}}.
In short, the question is why do both of these commands result in mkv
files that do not mark the subtitle stream as default
{{{% ffmpeg -i some_local_video_file.mkv -i some_local_subtitles.srt
-vcodec copy -acodec copy -scodec srt -metadata:s:s:0 language=eng
no_default_subtitles.mkv}}}
{{{% ffmpeg -i some_local_video_file.mkv -i some_local_subtitles.srt
-vcodec copy -acodec copy -scodec srt -disposition:s -default
-metadata:s:s:0 language=eng no_default_subtitles.mkv}}}
while this command results in an mkv file that marks the subtitle stream
as default even thought the default flag is explicitly set to 0 (false) by
the disposition option and the only difference is that the audio and video
streams are being downloaded from a web url in TS packets instead of
coming from a local mkv file like in the two commands above
{{{% ffmpeg -i 'http://some_video_site/somevideo.m3u8' -i
local_subtitles_file.srt -vcodec copy -acodec copy -scodec srt
-disposition:s -default -metadata:s:s:0 language=eng output.mkv}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8416#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list