We are trying to test IMSC1 Image Profile subtitles delivered using DASH. We can make simple test streams that can be played in dash.js correctly, but only if they're limited to one subtitle sample per DASH segment.
Does dash.js support multiple subtitle instances in the same segment, in different display regions, possibly overlapping in time?
So for example, a subtitle in the bottom left from 3.0 to 5.0 seconds, and another in the top right from 4.0 to 6.0 seconds. Both are in the same 3-second segment.
If this is supported, how should they be encoded? We've tried putting two subtitle instances into separate sub-samples, or separate entries in the subs box, or separate trun boxes in the same track, none of which work.
Thanks for your help.
Yes, this is possible in IMSC. Just put them both in the same document, targeted at different regions. For example something a bit like:
<div region="bottomLeft" begin="00:00:03" end="00:00:05" smpte:backgroundImage="image1.png"/>
<div region="topRight" begin="00:00:04" end="00:00:06" smpte:backgroundImage="image2.png"/>
(assuming you've created your region elements appropriately in /tt/head/layout)
If you want them separately in two different subtitle streams each independently viewable/hideable, that's another question that I can't answer easily.
Thanks for your help. I've managed to get this working now, although in my media the PNG data is embedded in the mdat box rather than being referenced as a separate file. (I did it this way because that's how the sample IMSC Image Profile subtitles were formatted, when I first looked at this.)
Most helpful comment
Thanks for your help. I've managed to get this working now, although in my media the PNG data is embedded in the
mdatbox rather than being referenced as a separate file. (I did it this way because that's how the sample IMSC Image Profile subtitles were formatted, when I first looked at this.)