Version 23 (modified by, 5 years ago) (diff)


VLC DASH Tutorial

Image Map

2. Implement VLC DASH Client on ExoGENI VLAN

2.1 Setup OpenFlow Controllers

  • 2.1.1 Setup the switch and the aggregator

On the Switch Node run

    sudo bash

We have already installed and configured the OVS switch, if you want to take a look at the configuration and understand more look at the output of these commands

ovs-vsctl list-br
ovs-vsctl list-ports br0
ovs-vsctl show br0
ovs-ofctl show br0

2.2 Setup the Apache Server and host DASH Video

In this section, you will be able to install the Apache server on ExoGENI node (VM-3) by logging in and executing the following script.

The first 4 lines of this script install and setup the Apache server. The rest of the script downloads a sample DASH video from and hosts it on the server that you just set up.


apt-get update
apt-get -y install apache2
apt-get -y install apache2-threaded-dev

apache2ctl restart

mkdir /root/DASH_BuckBunny

curl -o /root/

chmod +x /root/

sh /root/

2.3 Install VLC Client

The actual VLC Client which requests the video can be set up using this script. For streaming this video from the Apache server and in order to instrumentize and measure the DASH bit-rate using LabWiki we need to execute the following commands.

This script needs to be executed manually to monitor the progress of VLC Client installation


apt-get install -y --force-yes subversion
echo 'deb /' >> /etc/apt/sources.list.d/oml2.list 
curl -o /root/Release.key
apt-key add - < /root/Release.key  

apt-get -y --force-yes update
apt-get -y --force-yes -f install
apt-get -y --force-yes install oml2

apt-get build-dep -y --force-yes vlc
cd /root/
svn co
cd /root/vlc-2.1.0-git
apt-get install -y --force-yes liboml2-dev checkinstall build-essential cmake libtool automake autoconf git-core ffmpeg libxcb-shm0-dev libxcb-xv0-dev libx11-xcb-dev libcdparanoia-dev libcdio-paranoia-dev libcdio-cdda-dev libqt4-dev qt4-dev-tools qt4-qmake nasm yasm libasm-dev lua5.1

apt-get autoremove

./configure LIBS="-loml2" --enable-run-as-root
make install

2.4 Instrumentize and Measure DASH Bit-Rate using LabWiki

2.4.1 Start the Controller on Switch

  • 3.1.1 Start the controller on switch. An example OpenFlow Controller that assigns incoming TCP connections to alternating paths based on total number of flows (round robin) is already downloaded for you. You can find it (load-balancer.rb) in the home directory on node "Switch".
    trema run /root/load-balancer.rb
    After you started your Load Balancer, you should be able to see the following (Switch id may vary):
      OpenFlow Load Balancer Conltroller Started!
      Switch is Ready! Switch id: 196242264273477

2.4.2 OML Script

defApplication('vlc') do |app|

   app.binary_path = "/usr/local/bin/vlc" 
#   app.path = "/home/cong/work/vlc-2.1.0-git/bin/vlc-static"
   #app.version(2, 1, 0)
   #app.shortDescription = "VLC" 
   app.description = "VLC multimedia player and streamer" 

   app.defProperty("input", "Stream input (e.g. file or network address)", "", 
                   {:type => :string, :dynamic => false})
#   app.defProperty("sout", "Stream output", "--sout", 
#                   {:type => :string, :dynamic => false}) 
   app.defProperty("intf", "Main interface module", "--intf",
                   {:type => :string, :dynamic => false})
#   app.defProperty("extraintf", "Extra interface module(s). Use --extraintf omlstats to enable OML", "--extraintf",
#                   {:type => :string, :dynamic => false})
 #  app.defProperty("mtu", "Specifies the MTU of the network interface", "--mtu",
#                   {:type => :string, :dynamic => false})
#   app.defProperty("quiet", " Deactivates all console messages", "--quiet",
#                   {:type => :boolean, :dynamic => false})
 #  app.defProperty("play-and-exit", "Exit VLC after playing all the items in the input stream list", "--play-and-exit",
 #                  {:type => :boolean, :dynamic => false})

   app.defMeasurement('dashRateAdaptation') do |mp|

   app.defMeasurement('dashDlSession') do |mp|

defProperty('theOne','inside-vlctest','ID sender node')

#defProperty('packetsize', 128, "Packet size (byte) from the sender node")
#defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node")
#defProperty('runtime', 40, "Time in second for the experiment is to run")
defProperty('duration', 100, "Duration of experiment")

defGroup('Sender',property.theOne) do |node|
  node.addApplication("vlc") do |app|
#    app.setProperty('quiet', true)
#    app.setProperty('play-and-exit', false)
    #app.setProperty('intf', 'dummy')
#    app.setProperty('extraintf', 'omlstats')
    app.setProperty('input', '')
#    app.setProperty('mtu', '1200')
    app.measure('dashDlSession', :samples =>1)
    app.measure('dashRateAdaptation', :samples =>1)

onEvent(:ALL_UP_AND_INSTALLED) do |event|
    info "starting"
  after 2 do
    info "All applications started..."
  after 100 do
    info "All applications stopped." 

defGraph 'DashRate1' do |g|'dashRateAdaptation').select {[:oml_seq, :decisionRate_bps]}
  g.caption "Decision Rate."
  g.type 'line_chart3'
  g.mapping :x_axis => :oml_seq, :y_axis => :decisionRate_bps
  g.xaxis :legend => 'time [s]'
  g.yaxis :legend => 'Decision Rate', :ticks => {:format => 's'}

defGraph 'DashRate2' do |g|'dashRateAdaptation').select {[:oml_seq, :empiricalRate_bps]}
  g.caption "Empirical Rate"
  g.type 'line_chart3'
  g.mapping :x_axis => :oml_seq, :y_axis => :empiricalRate_bps
  g.xaxis :legend => 'time [s]'
  g.yaxis :legend => 'Empirical Rate', :ticks => {:format => 's'}

defGraph 'DashRate3' do |g|'dashRateAdaptation').select {[:oml_seq, :buffer_percent]}
  g.caption "VLC Buffer Percentage"
  g.type 'line_chart3'
  g.mapping :x_axis => :oml_seq, :y_axis => :buffer_percent
  g.xaxis :legend => 'time [s]'
  g.yaxis :legend => 'Buffer Percentage [%] ', :ticks => {:format => 's'}

2.4.3 Execute Script

Using OML instrumented VLC, we can visualize the VLC decision bitrate, which is the actual played bitrate; the VLC empirical rate, which is the instantly measured throughput, for deciding the next segment's decision bitrate.

VLC also provides other interesting statistics, such as the buffer size (percentage), each chunk's downloading time, etc. These can also be easily measured and displayed using GIMI tools by modifying the defGraph function towards your interested parameter.

The experiment procedure is as follows:

Load the script vlc.oedl from the Prepare window.

Click and Drag the script Icon over to the Execute panel

Change the property to reflect your slicename, inside-<slicename>

You will see graphs similar to the ones below:

Decision Rate

Empirical Rate

VLC DASH Buffer Percentage

Attachments (6)