Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitle asset loading problem #207

Closed
JamesTharakan opened this issue Jul 25, 2024 · 5 comments
Closed

Subtitle asset loading problem #207

JamesTharakan opened this issue Jul 25, 2024 · 5 comments

Comments

@JamesTharakan
Copy link

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
Copy link
Contributor

tobbee commented Jul 26, 2024

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
Copy link
Author

text_init
Update the text_init.mp4

@JamesTharakan
Copy link
Author

JamesTharakan commented Jul 26, 2024

$ 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
Copy link
Contributor

tobbee commented Jul 28, 2024

I looked at the file with mp4ff-info and it works fine. The root problem with stpp size mismatch goes back to Eyevinn/mp4ff#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
Copy link
Author

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

@tobbee tobbee closed this as completed Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants