Opened 2 years ago

Last modified 2 years ago

#9839 open defect

Dash mpd subtitle incorrect container

Reported by: Solaris Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: dash dashencoder DASH webvtt
Cc: Solaris Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I am trying to convert mkv file with multiple audio/sub streams to mpeg-dash. As per the example in the wiki , I am able to create adaptation sets for video and audio but unable to include subtitles.
Expected: ffmpeg will convert srt subs to webvtt and include it in mpd as text/vtt
But ffmpeg is trying to use mp4 container for webvtt and thus throw a error

[dash @ 000001ea163eb3c0] No bit rate set for stream 4
[dash @ 000001ea163eb3c0] Opening 'outNull/init-stream4.m4s' for writing
[mp4 @ 000001ea1f32eb00] Could not find tag for codec webvtt in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:3 --

How to reproduce:

% ffmpeg -y -i input.mkv -map 0:0 -map 0:1 -map 0:2 -map 0:0 -map 0:3 -c:v:0 libx264 -c:a:0 aac -c:a:1 libopus -c:v:1 libvpx-vp9 -c:s:0 webvtt  -b:v:0 800k -s:v:0 1280x720 -use_timeline 1 -use_template 1 -window_size 5 -adaptation_sets "id=0,streams=0,3 id=1,streams=1 id=2,streams=2 id=3,streams=4" -f dash outNull/out.mpd
ffmpeg version : ffmpeg version 2022-07-18-git-cb22d5ea3c-full_build-www.gyan.dev

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (3)

comment:1 by Solaris, 2 years ago

Status: newopen

comment:2 by Solaris, 2 years ago

What is the correct way to include subtitles/captions for dash ?

Tried forcing container to webm with following:

ffmpeg -re -y -i input.mkv -map 0:0 -map 0:1 -map 0:2 -map 0:3 \
-c:v:0 libvpx-vp9 -c:a:0 libopus -c:a:1 libopus -c:s:0 webvtt  \
-b:v:0 800k -s:v:0 1280x720 \
-use_timeline 1 -use_template 1 \
-dash_segment_type webm -window_size 5 -adaptation_sets "id=0,streams=0 id=1,streams=1 id=2,streams=2 id=3,streams=3" \
-f dash outNull/out.mpd

Result: AdaptationSet 3 which should be type text is included as type audio with no codec and thus no caption in player

comment:3 by Solaris, 2 years ago

Component: undeterminedffmpeg
Note: See TracTickets for help on using tickets.