Google TV

Bandwidth Flow Testing on Google TV

Joel Aguila - Google TV Developer Relations

OVERVIEW

As media playback content is optimized to play on different platforms (Apps, Browsers, Mobile Devices, Tablets and Media Centers). New evolving technology and protocols emerge along with the need for testing practices to test such media content. HLS technology has the ability to break down a video stream into small segments and encoded each segment with variable data rates which in turn completely diminishes the need for buffering, this means from a User point of view that the quality of the video being streamed will increase or decrease depending on the data flow coming in. HLS isn't supported by on all platforms. It is supported by iOS and Android >= 3.0, but not supported on IE9 or Chrome. Encoding requires MPEG2TS with MPEG4-AVC(h.264) and AAC as the video and audio codecs, the ts stream needs to be segmented with a tool like this one.

The following will guide you to an open sourced test environment where media extensive apps and services can be tested in a precise and friendly manner

REQUIREMENTS

Hardware:

  • Workstation able to run a Virtual Machine (Windows, OSX, Ubuntu, Fedora, etc...
  • 2 Ethernet Ports (Internal NIC Cards or External USB Adapter)
  • Internet Access

Software:

SETUP

  • 1. Setup a Virtual Machine with the default settings except for the following:
  • OS: Linux / Other Linux
  • Memory: 1024 MB

  • 2a. Modify the VM's Network and Boot Priority Settings

Adapter 1:

  • Check box - Enable Network Adapter
  • Attached to: Bridged Adapter
  • Name: Ethernet Port 1 (Port where internet access feeds through)
  • Adapter Type: Intel Pro/1000 MT Server>
  • Mac Address: Delete last 2 digits and replace with “00”

Adapter 2:

  • Check box - Enable Network Adapter
  • Attached to: Bridged Adapter
  • Name: Ethernet Port 2 (Port where test machine will be attached to)
  • Adapter Type: Intel Pro/1000 MT Server
  • Mac Address: Delete last 2 digits and replace with “01”

2b. Boot Image:

3. Start, Install and Configure pfSense VM:

  • boot pfSense as default>

  • Type “i” to install when prompted

  • Install with default settings

  • When finished installing. Shutdown the VM and unmount ISO image used to install

  • Start the VM, boot pfSense as default, skip install prompt and continue onto configuring Traffic Shaping Ports (Pay attention to Mac Addresses)

  • Type “n” to skip VLAN setup, and specify WAN (meaning the port where internet feeds through as previously specified with Mac Address set to last 2 digits with “00”). On picture below should be “em1”

  • Same with LAN, it should be the port to where your test machine should go. Mac Address with last 2 digits of “01” which should be “em0”

    skip the Optional 1 interface setup by pressing ENTER and proceed by typing “y”>

  • When LAN interface has been assigned an IP you are all done

4. Access Web GUI and configure Bandwidth Limiters

  • On your test box type 192.168.1.1 on the default internet browser and use username: “admin” and pass: “pfsense” to access the configuration panel

Note: You have to log-in into pfSense on your test machine (Google TV Box) first before login  from your development box, this will make  it  easier to control the limiter settings on pfSense when testing on your Test Box

  • Go to - Firewall Traffic Shaper (as seen above), select the Limiter tab and create “Download” and “Upload” limiters (as seen below), set Download 5MB;and Upload;to 3MB, Make sure to have the Enable Checkbox checked

  • Depending on the OS you are using on your test machine. The exact IP address is needed to be obtained to target the bandwidth flow (Ex: on my test machine my IP is 192.168.1.142)

  • Go to - Firewall > Rules, select “LAN” tab and create a rule specific to the IP address you are testing, click on the far top-right thumbnail with the + sign to add (on picture below rule has been already created)

  • Within the rule specify
  • Protocol: TCP/UDP>
  • Source: (Type your Text box's IP)
  • Type - Single host or alias
  • Address - <your test machine IP>
  • Advanced Features - IN/OUT:
  • Set “upload” limiter for IN
  • Set “download” limiter for OUT

  • Save, and Apply changes as appropiate

5. At this point you should be easily able to control the amount of bandwidth going to your test machine by modifying and applying changes to the limiters (upload/download) under Firewall > Traffic Shaper > Limiter tab.

Note: In order to access pfSense GUI from your Development Box make sure that the following are checked:

  • Disable WiFi/Bluetooth on Text Box
  • Disable WiFi/Bluetooth on Development Box
  • Login into Test Box first before loging to Development Box

6. Testing Bandwidth Flow

  • On your test machine, open a browser and go to - http://www.speedtest.net/
  • Your bandwidth should hover close to the limiters (upload/download) previously setup
  • Example below set to 5MB download / 3MB upload

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.