twitchtv / acm-mmsys-2020-grand-challenge

Assets for Twitch's ACM MMSys 2020 Grand Challenge
Apache License 2.0
42 stars 21 forks source link

If you have any questions, or would like help setting up the test env, please file an issue or reach out to 2020-lll-challenge@acmmmsys.org

Assets for Twitch's ACM MMSys 2020 Grand Challenge

This repo contains assets for Twitch's ACM MMSys 2020 Grand Challenge, Adaptation Algorithm for Near-Second Latency. It contains everything you need to build and test low-latency ABR algorithms locally.

Submission and Evaluation

See this document for instructions on how to submit your work, and how it will be evaluated.

What's in the Box

Requirements

How to use

From here you have a few options:

Executing test runs

This option should be used for validating your solution against our network patterns.

This will kick off an automated test, during which network conditions will be emulated. At the end of the run the statistics will be logged. We'll be adding new test runs throughout the challenge.

Reminder: The python server (bash run_server.sh step above) and the dash server (grunt dev step above) must be running!

Configuring Test Runs

There are several network profiles which can be tested against. In order to set a profile, change the network_profile option within the config block in the package.json. The following profiles are currently available:

- PROFILE_CASCADE
- PROFILE_INTRA_CASCADE
- PROFILE_SPIKE
- PROFILE_SLOW_JITTERS
- PROFILE_FAST_JITTERS

You may also add and run your own configs. For examples on how to do so, please use the pattern found in network-patterns.js.

If your computer isn't fast enough to run the normal FFMpeg ladder, change the ffmpeg_profile option in the config block to PROFILE_FAST. Note that this uses a different set of network profiles.

Local development

This option should be used for developing a solution.

To verify everything is working correctly, check that playback of Big Buck Bunny is functioning at the above link. The player should be able to stream smoothly configured down to 0.5s of latency

Local Network Emulation

See https://developers.google.com/web/tools/chrome-devtools/network#throttle on how to simulate network conditions in Chrome. This will be useful for testing your work.

Network Profiles

Help! Things aren't working

Below is a compilation of common issues & how to fix them. If you don't see your problem here, please file an issue and we'll do our best to help.

Access to fetch at 'http://localhost:9001/live/chunk-stream2-00167.m4s' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

If you see an error like this, it means that ffmpeg is struggling to encode quickly enough. Try the following:

$ node run.js
Error: Failed to launch the browser process! spawn /Applications/Google Chrome.app/Contents/MacOS/Google Chrome ENOENT

You need to change your Chrome executable path in run.js:

const CHROME_PATH = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";

Change the path to the location of your Chrome executable.

Important Notes

For the purpose of this challenge, the following cannot be changed:

If you'd like to discuss changing any of the above, please open an issue.

Important links

Kudos

Big thanks to Will Law, the Dash.js team, and the video-dev slack for their help in setting up this low-latency development environment. Kudos to FFLabs for creating the dash server and ffmpeg script.