Giter Site home page Giter Site logo

bob's Introduction

A Hybrid Bandwidth Prediction for RTC Systems (Cite this Paper)

Code for paper titled: "BoB: Bandwidth Prediction for Real-Time Communications Using Heuristic and Reinforcement Learning", IEEE TMM.

Challenge-Example

This repository is an example about the submission of challenge https://2021.acmmmsys.org/rtc_challenge.php. Its zip package(https://github.com/OpenNetLab/Challenge-Example/archive/refs/heads/master.zip) can be directly uploaded as a bandwidth estimator to OpenNetLab platform for this challenge.

Challenge Manual

You need to design and implement a python class Estimator in the file, BandwidthEstimator.py, that is the interface to predict the bandwidth for AlphaRTC https://github.com/OpenNetLab/AlphaRTC#pyinfer.

class Estimator(object):
    def report_states(self, stats: dict):
        '''
        stats is a dict with the following items
        {
            "send_time_ms": uint,
            "arrival_time_ms": uint,
            "payload_type": int,
            "sequence_number": uint,
            "ssrc": int,
            "padding_length": uint,
            "header_length": uint,
            "payload_size": uint
        }
        '''
        pass

    def get_estimated_bandwidth(self)->int:
        return int(1e6) # 1Mbps

Notes

  1. The report_states will be called by AlphaRTC core process and to tell the estimator RTC packets information with partial metadata above mentioned.
  2. The get_estimated_bandwidth will also be called by AlphaRTC core process to fetch the predicted bandwidth by your estimator.
  3. The two interfaces will be called in one thread and maybe get some side-effect if they take a long time to return.
  4. The calling frequency of report_states is per RTC packet.
  5. The calling frequency of get_estimated_bandwidth is about 200 milliseconds.
  6. You can use any built-in library of python 3.6.9 or third-parties libraries we pre-installed in Challenge-Environment.

Submission Verification

# Pull the docker image of challenge environment
docker pull opennetlab.azurecr.io/challenge-env

# Download the configuration and test media
wget https://raw.githubusercontent.com/OpenNetLab/AlphaRTC/main/examples/peerconnection/serverless/corpus/receiver_pyinfer.json -O receiver_pyinfer.json
wget https://raw.githubusercontent.com/OpenNetLab/AlphaRTC/main/examples/peerconnection/serverless/corpus/sender_pyinfer.json -O sender_pyinfer.json
mkdir testmedia
wget https://github.com/OpenNetLab/AlphaRTC/raw/main/examples/peerconnection/serverless/corpus/testmedia/test.wav -O testmedia/test.wav
wget https://raw.githubusercontent.com/OpenNetLab/AlphaRTC/main/examples/peerconnection/serverless/corpus/testmedia/test.yuv -O testmedia/test.yuv

# Run your example
docker run -d --rm -v `pwd`:/app -w /app --name alphartc_pyinfer opennetlab.azurecr.io/challenge-env peerconnection_serverless receiver_pyinfer.json
docker exec alphartc_pyinfer peerconnection_serverless sender_pyinfer.json

If the outvideo.yuv and outaudio.wav are generated at the current folder, it means your bandwidth estimator has connected to AlphaRTC successfully.

The experiments that we run in the paper

  • First build the environment in environment folder by make all
  • run ./run_with_tc in the parent folder.

After the test runs are finished, it will create a results_{$date}_{$model} folder where $date will be the time the experiment is run. and for bob, $model will be bob, for heuristic, it will be heuristic. In each separate result folder all logs of each run will be stored. The script initially makes 5 runs for each model. The test content also needs to be placed in testmedia folder, currently there is a dummy content inside this folder (test.yuv and test.wav).

bob's People

Contributors

akousdn avatar makcay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.