videojs / mpd-parser

https://videojs.github.io/mpd-parser/
Other
79 stars 54 forks source link

Cannot handle multiple languages and subtitles #77

Closed EyMaddis closed 3 years ago

EyMaddis commented 5 years ago

This is a duplication of the following issue: https://github.com/videojs/http-streaming/issues/645

A playlist like this is not properly parsed:


    <AdaptationSet mimeType="text/vtt" lang="de">
      <Role schemeIdUri="urn:mpeg:dash:role" value="subtitle"/>
      <Label>Deutsch</Label>
      <Representation id="4" bandwidth="256">
        <BaseURL>dashcaption_de_dash.mpd</BaseURL>
      </Representation>
    </AdaptationSet>
    <AdaptationSet mimeType="text/vtt" lang="de">
      <Role schemeIdUri="urn:mpeg:dash:role" value="subtitle"/>
      <Label>Forced</Label>
      <Representation id="5" bandwidth="256">
        <BaseURL>dashcaption_forced_dash.mpd</BaseURL>
      </Representation>
    </AdaptationSet>```

only the first `de` will be available in the result.

I think this boils down to [this line](https://github.com/videojs/mpd-parser/blob/12387495d2fe472eab2fdd7d0c7f1b4bbc22c7cb/src/toM3u8.js#L181).

**The same applies to audio tracks.**
LienLotus commented 4 years ago

I have same issue with audio tracks

gkatsev commented 4 years ago

Another example file from #95 https://github.com/videojs/mpd-parser/files/4449794/manifest.txt