HeadSpin Documentation
Documentation

Network Requirements and Audio Configuration Options

Overview

In order to properly test the use of video and audio in an application, you need to work on a network with sufficient bandwidth to allow video and audio streaming and data capture. You may also want to modify your streaming configuration's default settings depending on the kind of tests you wish to perform. This document can assist you with understanding the requirements for network bandwidth to perform video/audio testing, as well as understanding of the ways you can modify your configuration to enable mono or stereo audio or configure the audio stream bitrate.

Network requirements

Service Bandwidth per device
iOS video streaming 256 kB/s
Android video streaming 256 kB/s
Android audio streaming 20 kB/s

Audio configuration options

The following audio configuration options are available on a per-device basis in the <code class="dcode">keys/remotecontrol/streaming.yml</code> configuration file:

  • Configure audio stream as mono or stereo
  • Configure audio stream encoding bitrate

Before editing the <code class="dcode">streaming.yml</code> this file you will need to know:

1. The address of the host associated with the device you want to configure, e.g. <code class="dcode">{hostname}</code>

2. The serial number of the device you want to configure, e.g. <code class="dcode">{android-device-serial}</code>. This information is available either in:

  • the "Device ID" column in the "Devices" section for "Remote Control"
device id
  • the remote control interface for the device under the "Info" tab in the "Hardware" card
device serial

Editing and deploying <code class="dcode">streaming.yml</code>

This can either be done with <code class="dcode">push</code> command:

  1. Make desired edits to the file <code class="dcode">keys/remotecontrol/streaming.yml</code>
  2. Deploy using <code class="dcode">push pboxagent</code>

This can also be done directly on the host. Note: future <code class="dcode">push</code> commands may override changes made this way.

  1. Connect to the host associated with the device you're configuring over ssh
  2. Run <code class="dcode">hsenter pboxagent</code>
  3. Make desired edits to the file <code class="dcode">$HEADSPIN_HOME/keys/remotecontrol/streaming.yml</code>
  4. Restart pbox services by running

cd $HEADSPIN_HOME
./start.sh

Mono/stereo configuration

The audio stream can be configured per device as either:

  • stereo, e.g. <code class="dcode">stereo: true</code> (default)
  • mono, e.g. <code class="dcode">stereo: false</code>

Note that this configuration has no effect on bitrate / bandwidth utilization. This means the mono configuration has double the per-channel bitrate than the stereo configuration.

The configuration option must be placed in the correct section of the <code class="dcode">streaming.yml</code> file as follows:


pbox:
  # ...
  {hostname}:
    devices:
      # ...
      {serial}:
        # ...
        stereo: false

Example:


pbox:
  # ...
  {hostname}:
    devices:
      # ...
      {android-device-serial}:
        # ...
        stereo: false

It is also possible to set a per-host default for the <code class="dcode">stereo</code> setting in the <code class="dcode">streaming.yml</code> file as follows:


pbox:
  # ...
  {hostname}:
    stereo_default: false
    devices: {}

Example:


pbox:
  # ...
  {hostname}:
    stereo_default: false
    devices: {}

Bitrate configuration

The audio stream bitrate can be configured per device; the default is <code class="dcode">96000 bits/s</code>.

Note the actual bandwidth used will be at least 25% higher due to networking overhead.

The configuration option must be placed in the correct section of the <code class="dcode">streaming.yml</code> file as follows:


pbox:
  # ...
  {hostname}:
    devices:
      # ...
      {serial}:
        # ...
        bitrate: 96000

Example:


pbox:
  # ...
  {hostname}:
    devices:
      # ...
      {android-device-serial}:
        # ...
        bitrate: 96000

It is also possible to set a per-host default for the <code class="dcode">bitrate</code> setting in the <code class="dcode">streaming.yml</code> file as follows:


pbox:
  # ...
  {hostname}:
    bitrate_default: 96000
    devices: {}

Example:


pbox:
  # ...
  {hostname}:
    bitrate_default: 96000
    devices: {}