Forum Discussion

AmanPunj's avatar
AmanPunj
Binge Watcher
3 years ago

RoRegex Dash Manifest VideoQuality Extraction


I need to extract Video quality from Dash manifest string.

For Example:- 

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"minBufferTime="PT1.5S">
<ProgramInformation>
<Title>6332da63a8c9108ea_dash_smil.smil</Title>
</ProgramInformation>
<Location></Location>
<Period id="0" start="PT0S">
<AdaptationSet id="0" mimeType="video/mp4" segmentAlignment="true" frameRate="30" startWithSAP="1"group="1" par="16:9" maxWidth="1280" maxHeight="720" subsegmentAlignment="true"subsegmentStartsWithSAP="1">
<Representation id="p0va0r1000000" bandwidth="1000000" width="426" height="240" codecs="avc1.4d4015"sar="1:1">
<BaseURL>426x240/</BaseURL>
</Representation>
<Representation id="p0va0r1500000" bandwidth="1500000" width="640" height="360" codecs="avc1.4d401e"sar="1:1">
<BaseURL>640x360/</BaseURL>
</Representation>
<Representation id="p0va0r2500000" bandwidth="2500000" width="854" height="480" codecs="avc1.4d401f"sar="1:1">
<BaseURL>854x480/</BaseURL>
</Representation>
<Representation id="p0va0r5000000" bandwidth="5000000" width="1280" height="720" codecs="avc1.4d401f"sar="1:1">
<BaseURL>1280x720/</BaseURL>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1" group="2" lang="eng"subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
<Representation id="p0aa0r48000" bandwidth="48000" codecs="mp4a.40.2" audioSamplingRate="48000">
<BaseURL>48000_eng_1/</BaseURL>
</Representation>
<Representation id="p0aa0r96000" bandwidth="96000" codecs="mp4a.40.2" audioSamplingRate="48000">
<BaseURL>96000_eng_1/</BaseURL>
</Representation>
<Representation id="p0aa0r128000" bandwidth="128000" codecs="mp4a.40.2" audioSamplingRate="48000">
<BaseURL>128000_eng_1/</BaseURL>
</Representation>
</AdaptationSet>
</Period>
</MPD>
  • renojim's avatar
    renojim
    Community Streaming Expert

    What part of that are you referring to as the "Video quality"?  The bandwidth?  The size?

    • AmanPunj's avatar
      AmanPunj
      Binge Watcher

      I was referring to the bandwidth.This issue I resolved using XmlElement. 

      I created objects using Xmlelement node from this dash content and fetched the bandwidth attributes.