[FFmpeg-trac] #2402(undetermined:new): FFmpeg marks all subtitles in mkv files as default
FFmpeg
trac at avcodec.org
Mon Mar 25 14:58:19 CET 2013
#2402: FFmpeg marks all subtitles in mkv files as default
-------------------------------------+-------------------------------------
Reporter: someuser | Type: defect
Status: new | Priority: minor
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Some related discussion was in ticket #1815.
When creating a Matroska / mkv file with FFmpeg with several subtitle
streams all of them are marked as default and there seems to be no way to
disable setting of the default flag for any of the subtitle streams.
Below is an example with the presumably correct metadata identifier
default-flag=0 in use.
With both subtitles marked as default VLC shows the last subtitle stream
but MPC-HC shows the first one (provided that no subtitle language
preference has been set).
How to reproduce:
{{{
> ./ffmpeg -fflags +genpts -i test.mp4 -i test-en.srt -i test-fr.srt -c:a
copy -c:v copy -c:s copy -metadata:s:s:0 language=eng -metadata:s:s:1
language=fra -metadata:s:s:1 default-flag=0 -map 0:0 -map 0:1 -map 1:0
-map 2:0 test.mkv
ffmpeg version N-51211-ge0e8c20 Copyright (c) 2000-2013 the FFmpeg
developers
built on Mar 22 2013 08:56:38 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-
libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 22.101 / 52. 22.101
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.100 / 3. 48.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.59.106
Duration: 00:00:10.05, start: 0.021333, bitrate: 1257 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
576x324 [SAR 1:1 DAR 16:9], 1132 kb/s, 23.98 fps, 23.98 tbr, 11988 tbn,
47.95 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 119 kb/s
Metadata:
handler_name : SoundHandler
[srt @ 0272d9e0] Estimating duration from bitrate, this may be inaccurate
Input #1, srt, from 'test-en.srt':
Duration: N/A, bitrate: N/A
Stream #1:0: Subtitle: subrip
[srt @ 02861780] Estimating duration from bitrate, this may be inaccurate
Input #2, srt, from 'test-fr.srt':
Duration: N/A, bitrate: N/A
Stream #2:0: Subtitle: subrip
Output #0, matroska, to 'test.mkv':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.0.100
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 576x324
[SAR 1:1 DAR 16:9], q=2-31, 1132 kb/s, 23.98 fps, 1k tbn, 11988 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz,
stereo, 119 kb/s
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Subtitle: subrip
Stream #0:3(fra): Subtitle: subrip
Metadata:
default-flag : 0
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #1:0 -> #0:2 (copy)
Stream #2:0 -> #0:3 (copy)
Press [q] to stop, [?] for help
frame= 241 fps=0.0 q=-1.0 Lsize= 1542kB time=00:00:10.04
bitrate=1256.9kbits/s
video:1389kB audio:146kB subtitle:0 global headers:0kB muxing overhead
0.399761%
> ffprobe -i test.mkv -loglevel 0 -show_streams
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_time_base=125/5994
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=576
height=324
has_b_frames=2
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
pix_fmt=yuv420p
level=40
timecode=N/A
is_avc=1
nal_length_size=4
id=N/A
r_frame_rate=2997/125
avg_frame_rate=2997/125
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:LANGUAGE=und
TAG:HANDLER_NAME=VideoHandler
[/STREAM]
[STREAM]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=fltp
sample_rate=48000
channels=2
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:LANGUAGE=und
TAG:HANDLER_NAME=SoundHandler
[/STREAM]
[STREAM]
index=2
codec_name=subrip
codec_long_name=SubRip subtitle
profile=unknown
codec_type=subtitle
codec_time_base=1/1000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:LANGUAGE=eng
[/STREAM]
[STREAM]
index=3
codec_name=subrip
codec_long_name=SubRip subtitle
profile=unknown
codec_type=subtitle
codec_time_base=1/1000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:LANGUAGE=fra
TAG:DEFAULT-FLAG=0
[/STREAM]
>
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2402>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list