unifiedstreaming / streaming-load-testing

Load generation tool for evaluation of DASH and HLS video streaming setups
MIT License
50 stars 10 forks source link

WEBM format Support for MPEG-DASH testing #1

Closed abarrak closed 3 years ago

abarrak commented 3 years ago

Hi, Thanks for the great utility.

I couldn't get the tool to test the mpeg dash that are packaged in WEBM format.

<?xml version="1.0" encoding="UTF-8"?>
<MPD
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:mpeg:DASH:schema:MPD:2011"
  xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011"
  type="static"
  mediaPresentationDuration="PT119.819S"
  minBufferTime="PT1S"
  profiles="urn:webm:dash:profile:webm-on-demand:2012">
<Period id="0" start="PT0S" duration="PT119.819S" >
<AdaptationSet id="0" mimeType="video/webm" codecs="vp9" bitstreamSwitching="true" subsegmentAlignment="false" subsegmentStartsWithSAP="1">
<Representation id="0" bandwidth="1380501" width="160" height="90">
<BaseURL>jju5j0qy.mp4_160x90_250k.webm</BaseURL>
<SegmentBase
  indexRange="11696347-11696822">
<Initialization
  range="0-810" />
</SegmentBase>
</Representation>
<Representation id="1" bandwidth="596667" width="320" height="180">
<BaseURL>jju5j0qy.mp4_320x180_500k.webm</BaseURL>
<SegmentBase
  indexRange="7728521-7729094">
<Initialization
  range="0-812" />
</SegmentBase>
</Representation>
<Representation id="2" bandwidth="1149715" width="640" height="360">
<BaseURL>jju5j0qy.mp4_640x360_750k.webm</BaseURL>
<SegmentBase
  indexRange="12974245-12974818">
<Initialization
  range="0-814" />
</SegmentBase>
</Representation>
<Representation id="3" bandwidth="1432284" width="640" height="360">
<BaseURL>jju5j0qy.mp4_640x360_1000k.webm</BaseURL>
<SegmentBase
  indexRange="16540035-16540608">
<Initialization
  range="0-814" />
</SegmentBase>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" mimeType="audio/webm" codecs="vorbis" audioSamplingRate="44100" bitstreamSwitching="true" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Representation id="4" bandwidth="135295">
<BaseURL>jju5j0qy.mp4_audio.webm</BaseURL>
<SegmentBase
  indexRange="1939760-1940254">
<Initialization
  range="0-5067" />
</SegmentBase>
</Representation>
</AdaptationSet>
</Period>
</MPD>
docker run -it \
    -e "HOST_URL=http://core.streaming-thesis.com" \
    -e "MANIFEST_FILE=bcca1497-b558-4588-9f04-c347adf8cb30/manifest/manifest.mpd" \
    -e "mode=vod" \
    -e "play_mode=full_playback" \
    -e "bitrate=random_bitrate" \
    -e "LOCUST_LOCUSTFILE=/load_generator/locustfiles/vod_dash_hls_sequence.py" \
    -e "LOCUST_HEADLESS=true" \
    -e "LOCUST_USERS=50" \
    -e "LOCUST_SPAWN_RATE=5" \
    -e "LOCUST_RUN_TIME=10s" \
    -e "LOCUST_ONLY_SUMMARY=true" \
    -p 8089:8089 \
    unifiedstreaming/load-generator:latest \
    --no-web

The log shows this error:

[2021-04-10 16:08:56,454] 81b05eb1d2ad/INFO/stdout: MPEG-DASH child player running ...
[2021-04-10 16:08:56,454] 81b05eb1d2ad/INFO/stdout: 
[2021-04-10 16:08:56,454] 81b05eb1d2ad/INFO/stdout: http://core.streaming-thesis.com/bcca1497-b558-4588-9f04-c347adf8cb30/manifest/manifest.mpd
[2021-04-10 16:08:56,454] 81b05eb1d2ad/INFO/stdout: 
[2021-04-10 16:08:56,454] 81b05eb1d2ad/INFO/load_generator.common.dash_emulation: Requesting manifest: http://core.streaming-thesis.com/bcca1497-b558-4588-9f04-c347adf8cb30/manifest/manifest.mpd
[2021-04-10 16:08:56,460] 81b05eb1d2ad/INFO/stdout: MPEG-DASH child player running ...
[2021-04-10 16:08:56,460] 81b05eb1d2ad/INFO/stdout: 
[2021-04-10 16:08:56,460] 81b05eb1d2ad/INFO/stdout: http://core.streaming-thesis.com/bcca1497-b558-4588-9f04-c347adf8cb30/manifest/manifest.mpd
[2021-04-10 16:08:56,461] 81b05eb1d2ad/INFO/stdout: 
[2021-04-10 16:08:56,461] 81b05eb1d2ad/INFO/load_generator.common.dash_emulation: Requesting manifest: http://core.streaming-thesis.com/bcca1497-b558-4588-9f04-c347adf8cb30/manifest/manifest.mpd
[2021-04-10 16:08:56,467] 81b05eb1d2ad/INFO/load_generator.common.dash_emulation: Obtained MPD body 
[2021-04-10 16:08:56,469] 81b05eb1d2ad/INFO/stdout: self.mpd_object: <mpegdash.nodes.MPEGDASH object at 0x7f1799cfc7f0>
[2021-04-10 16:08:56,469] 81b05eb1d2ad/INFO/stdout: 
[2021-04-10 16:08:56,469] 81b05eb1d2ad/INFO/load_generator.common.dash_emulation: Dash playback
[2021-04-10 16:08:56,469] 81b05eb1d2ad/INFO/load_generator.common.dash_utils: Preparing timeline...
[2021-04-10 16:08:56,470] 81b05eb1d2ad/ERROR/locust.core: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/locust/core.py", line 403, in run
    self.execute_next_task()
  File "/usr/local/lib/python3.6/site-packages/locust/core.py", line 433, in execute_next_task
    self.execute_task(task["callable"], *task["args"], **task["kwargs"])
  File "/usr/local/lib/python3.6/site-packages/locust/core.py", line 445, in execute_task
    task(self, *args, **kwargs)
  File "/load_generator/common/dash_emulation.py", line 72, in dash_playback
    self.base_url, self.mpd_object
  File "/load_generator/common/dash_utils.py", line 122, in prepare_playlist
    protocol = base_urls[0].base_url_value  # only dash/ is in index 0
TypeError: 'NoneType' object is not subscriptable

Appreciate any feedback on this issue. Thanks

abarrak commented 3 years ago

I wrote a script that generate python methods to request chunks repeatedly. Thankfully, due partial content delivery this was achievable.