GithubHelp home page GithubHelp logo

haitian2du / adaptive-bitrate-streaming Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ntsliyang/adaptive-bitrate-streaming

0.0 0.0 0.0 111.49 MB

DeeCamp 2019 Team 19

DIGITAL Command Language 6.50% CSS 1.28% JavaScript 65.40% HTML 6.59% Shell 0.01% Java 15.89% Makefile 0.01% Python 4.13% C++ 0.21%

adaptive-bitrate-streaming's Introduction

Quality-aware Media Streaming Optimization (based on Pensieve)[slide]

Table of Contents

Objectives

  • Recreate the real-world experiments
  • Customize the adaptation algorithms for different needs (smooth, balanced, high-quality)
  • Optimize the current ABR algorithm (based on RL) so that it could be applied in HLS (HTTP Live Streaming) (desired ABR algorithm could enable the video to have smooth playback while retaining a much smaller buffer level than playback environment)
  • Gather a much larger dataset (FCC, Belgium, Oboe, Waterloo Streaming QoE Dataset)

Setup

Apache Server

Linux

Installation & Basic Setup

  • update package local index
sudo apt update
  • install apache2
sudo apt install apache2
  • start server
sudo service start apache2
  • test that the server is working properly by entering localhost:80 in the browser and it should show the apache default webpage.

Change Port Number

  • use vim to open ports.conf
vim /etc/apache2/ports.conf
  • Change Listen 80 to Listen [port number]
  • restart the server
sudo service restart apache2
  • test that the server is working properly by entering localhost:[port number] in the browser and it should show the apache default webpage.

Windows

Installation & Basic Setup

Mac

Installation & Basic Setup

  • stop running (older) Apache server and remove it
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
brew install httpd
  • start server
sudo brew services start httpd
  • test that the server is working properly by entering localhost:8080 in the browser and it should show the apache default webpage.

Change Port Number

  • use vim to open httpd.conf
vim /etc/apache2/httpd.conf
  • change Listen 8080 to Listen [port number]
  • test that the server is working properly by entering localhost:[port number] in the browser and it should show the apache default webpage.

Chromedriver & Selenium

  • Detailed steps are provided in setup.py
  • make sure that Google Chrome is already installed before doing the following installation and setup.
  • check Google Chrome version
  • download corresponding chromedriver and put it under abr_browser_dir/

Addition of 9-level quality video

In addition to 6-level quality video already provided under video_server, we have added the other 9-level quality video. The manifest can be downloaded here

https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd

and video segments can be downloaded here

https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.zip

The following table shows corresponding changes.

Item Description 6-level Quality Video File Name 9-level Quality Video File Name
get video sizes sim/get_video_sizes.py sim/get_video_sizes_bbb_30fps.py
video sizes sim/video_size_[index] (index ranges from 0 to 5) sim/video_size_bbb_30fps_[index] (index ranges from 0 to 9)
simulation folder sim sim_bbb_30fps
server folder rl_server/ rl_server_bbb_30fps/

Version Changes compared to original pensieve

  • As pensieve is originally written in Python 2.7, the following changes are mainly migrations to Python 3.7.
    • add parantheses around print statements
    • all the open commands are changed from wb (or rb) to w (or r)
  • Under rl_server/ and rl_server_bbb_30fps/, programs used to build backend server for transfer of state information include
File Name Supported Algorithm
dash_server_original.py
mpc_server.py MPC
robust_mpc_server.py robustMPC
rl_server_no_training.py A3C (RL)
simple_server.py
  • The following changes should be applied in all files above
Location Original Current
first two lines from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import SocketServer
from http.server import BaseHTTPRequestHandler, HTTPServer
import socketserver
server_address ('localhost', port) ('', port)
self.wfile.write [string] [srting].encode()

Additional changes compared to original pensieve (especially on frontend)

  • In order to adapt to various needs of users (smooth, high-quality, balanced), we add a vertical slider that can change 3 different reward schemes in-time.

  • we refurbished the frontend for comparison between RL algorithms and traditional algorithms. Below are the screenshots.

  • As we need to simultaneously play two videos, we need to start two servers for file transfer. Therefore, we need to change port number. In this case, we used BOLA for comparison, and hence we change simple_server to port 8334 and change the port number in dash.all.min.js correspondingly.

  • Caution: it is preferred (and a better practice) that JavaScript changes should be first made in original source files and then use grunt dist to update dash.all.min.js. But for simplicity and convenience, we have directly updated the changes in dash.all.min.js.

Real-world experiments

  • set up the server
  • copy web application files to Apache Server Document Root folder
cp -r dash.js/ /usr/local/var/www/
  • restart server
sudo brew services start httpd
  • run RL server
python rl_server_bbb_30fps/rl_server_no_training.py
  • run simple server
python rl_server_bbb_30fps/simple_sever.py
  • launch reference client by localhost:[port number]/dash.js/samples/dash-if-reference-player/deecamp.html

Training Results

  • The following are training results from original pensieve.

6-level quality video of 120-130k epochs

All of 3 reward schemes show very high instability, and this is partially reflected in the frequent changes of bitrates by the video client.

Future Work

Dependency

  • Python 3.7
  • Tensorflow 1.9

Reference

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.