Dash-Industry-Forum / livesim2

DASH Live Source Simulator v2 in Go
Other
36 stars 5 forks source link

Subtitle asset loading problem #207

Closed JamesTharakan closed 1 month ago

JamesTharakan commented 1 month ago

The subtitle in vtt format is packaged with shakaPackager, below is the generated mpd segment. When loading in livesim2 we are getting the below error message.

   <AdaptationSet id="2" contentType="text" lang="en" segmentAlignment="true">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
      <Representation id="2" bandwidth="990" codecs="stpp" mimeType="application/mp4">
      </Representation>
        <SegmentTemplate timescale="1000" initialization="subtitles_1/text_init.mp4" media="subtitles_1/$Number$.m4s" startNumber="1">
        </SegmentTemplate>    
    </AdaptationSet>

level=WARN msg="Asset loading problem. Skipping" asset=11/manifest.mpd err="getRep: addRegExpAndInit: decode init: decode box moov: decode box trak: decode box mdia: decode box minf: decode box stbl: decode box stsd: child stpp size mismatch in stsd: 44 - 43"

tobbee commented 1 month ago

Hi @JamesTharakan,

livesim2 does not yet support wvtt subtitles. Issue #46 is about adding support for sources with wvtt segments. However, your content is not VTT but STPP (TTML) according to the manifest.

stpp should be supported. I suspect this is an issue about a zero-byte end character in a utf8list in the stpp box as decoded by mp4ff. Could you upload the init segment of the asset as an attachment? Ideally with a non-mp4 file extension like ".init" to avoid having Github convert the link into a player link.

JamesTharakan commented 1 month ago

text_init Update the text_init.mp4

JamesTharakan commented 1 month ago

$ MP4Box -info 1.m4s [iso file] Movie fragment but no moov (yet) - possibly broken parsing! File is a segment - 1 movie fragments - Brand mp41 (version 0): Fragment #1 size 377 (moof 104) {TKID 1 TFDT 0}


$ MP4Box -info text_init.mp4 Movie Info - 1 track - TimeScale 1000 Duration 00:00:00.000 Fragmented: yes - duration 02:09:52.000 0 fragments - 0 SegmentIndexes Progressive (moov before mdat) Major Brand mp41 - version 0 - compatible brands: iso8 isom mp41 dash cmfc Created: GMT Fri Jul 26 06:24:55 2024

Movie Meta type: "ID32" - 0 resource item(s)

Track 1 Info - ID 1 - TimeScale 1000 Media Duration 00:00:00.000 Track flags: Enabled In Movie In Preview Media Language: English (eng) Media Samples: 0 Fragmented track: 0 samples - Media Duration 00:00:00.000 Fragment sample defaults: duration 8000 size 0 stsd 1 sync 1 padding 0 degradation_priority 0 Media Type: subt:stpp XML Subtitle Stream - namespace http://www.w3.org/ns/ttml Size 0 x 0 - Translation X=0 Y=0 - Layer 0 RFC6381 Codec Parameters: stpp.ttml All samples are sync Max sample duration: 0 / 1000


$ mp4dump 1.m4s [styp] size=8+28 [sidx] size=12+32 reference_ID = 1 timescale = 1000 earliest_presentation_time = 0 first_offset = 0 [moof] size=8+96 [mfhd] size=12+4 sequence number = 1 [traf] size=8+72 [tfhd] size=12+20, flags=2003a track ID = 1 sample description index = 1 default sample duration = 8000 default sample size = 185 default sample flags = 0 [tfdt] size=12+8, version=1 base media decode time = 0 [trun] size=12+8, flags=1 sample count = 1 data offset


$ mp4info 1.m4s No movie found in the file

tobbee commented 1 month ago

I looked at the file with mp4ff-info and it works fine. The root problem with stpp size mismatch goes back to https://github.com/Eyevinn/mp4ff/issues/228

It was solved in v0.43 of mp4ff which was included in livesim2 v1.3.0. Which version of livesim2 do you use?

JamesTharakan commented 1 month ago

Thanks, once I took the latest version, problem is solved.