What's New in TinyPilot's May 2022 Update

The May release of TinyPilot adds experimental support for H264, a faster and more performant format for video streaming.

H264 video over WebRTC

TinyPilot has always used the MJPEG format to stream the display from your target computer back to your browser. MJPEG is a simple format, but it consumes a large amount of bandwidth.

Our May releases of TinyPilot Pro and TinyPilot Community offer experimental support for H264, a newer, high-performance video format with several benefits over MJPEG.

H264 has lower latency, so you'll notice that your mouse movements will feel snappier as you control your remote computer through TinyPilot.

H264 offers lower latency, which makes TinyPilot faster and more responsive.

H264 also uses network bandwidth more efficiently, so picture quality will be higher while placing less load on the network. You'll especially benefit from H264 if you access your TinyPilot over the Internet.

The demo below shows TinyPilot using the default MJPEG format and then switching to H264 compression. The bandwidth drops from 21 Mbps to less than 5 Mbps without any loss in video quality:

Encoding video with H264 instead of MJPEG drastically reduces TinyPilot's network bandwidth.

Enabling H264 video

We're still polishing the H264 feature, so it's not yet available through the web UI. If you'd like to try it out, you can enable it on your device through the command-line.


To enable H264, SSH into your TinyPilot device, and run the following commands:

echo 'ustreamer_h264_sink: tinypilot::ustreamer::h264
ustreamer_h264_sink_mode: 777
ustreamer_h264_sink_rm: yes
ustreamer_compile_janus_plugin: yes
tinypilot_install_janus: yes' | sudo tee --append /home/tinypilot/settings.yml && \
  for package in libnice10 libsrtp2-1 libwebsockets16; do
    sudo apt-get remove --yes "${package}" || true
  done && \
  if [[ -f /opt/tinypilot/VERSION ]]; then \
    sudo mv /opt/tinypilot/VERSION /tmp/tinypilot-version
  fi && \
  sudo /opt/tinypilot-privileged/update && \
  sudo apt-get autoremove --yes && \
  if [[ ! -f /opt/tinypilot/VERSION ]]; then \
    sudo mv /tmp/tinypilot-version /opt/tinypilot/VERSION
  fi && \
  sudo reboot

Note: Enabling H264 for the first time currently takes about 20 minutes. We know this is painfully slow, and we're working on it.

To serve video over WebRTC, we're using the open-source Janus server. Janus has no official binary package, so we're compiling it from source on the TinyPilot device.

We're in the process of building a pre-compiled binary package for Janus, which will drastically speed up the installation.

Tuning bandwidth with H264

By default, TinyPilot targets 5000 kbps of network bandwidth for streaming video. If you'd like to optimize this value for your network, you can choose a new target with the following commands:

TARGET_BITRATE_KBPS=3000 # Change to any target bitrate

sudo sed --in-place \
  "s/--h264-sink-rm.*$/--h264-sink-rm --h264-bitrate ${TARGET_BITRATE_KBPS} \\\/g" \
  /lib/systemd/system/ustreamer.service && \
  sudo systemctl daemon-reload && \
  sudo service ustreamer restart

We're working on a friendly web UI for this setting so that you can tune the streaming bandwidth from your browser the way you currently can with MJPEG.

Turning off H264

If you try out H264 and decide it's not for you, no problem. You can disable H264 and go back to MJPEG with the following commands:

sudo sed --in-place '/^ustreamer_h264_sink:/d' "${TINYPILOT_SETTINGS}" && \
  sudo sed --in-place '/^ustreamer_h264_sink_mode:/d' "${TINYPILOT_SETTINGS}" && \
  sudo sed --in-place '/^ustreamer_h264_sink_rm:/d' "${TINYPILOT_SETTINGS}" && \
  sudo sed --in-place '/^ustreamer_compile_janus_plugin:/d' "${TINYPILOT_SETTINGS}" && \
  sudo sed --in-place '/^tinypilot_install_janus:/d' "${TINYPILOT_SETTINGS}" && \
  sudo systemctl disable janus && \
  sudo service janus stop && \
  if [[ -f /opt/tinypilot/VERSION ]]; then \
    sudo mv /opt/tinypilot/VERSION /tmp/tinypilot-version
  fi && \
  sudo /opt/tinypilot-privileged/update && \
  if [[ ! -f /opt/tinypilot/VERSION ]]; then \
    sudo mv /tmp/tinypilot-version /opt/tinypilot/VERSION
  fi && \
  sudo reboot

Reporting bugs and feedback

The best way to report bugs you find with the H264 feature is by creating an issue on TinyPilot's public Github.

If you're not a Github user, you can report bugs in the TinyPilot help forums.

Full changelog

For the full list of changes in TinyPilot Pro 2.4.1, see the changelog.

Updating to the latest version

You can update to the latest version of TinyPilot by clicking System > Update in the navigation bar:

The update button is located in the navbar under System


Special thanks to Maxim Devaev for his extensive work adding H264 support to uStreamer, which paved the way for this feature.

Written by Michael Lynch, TinyPilot Founder and CEO