DEV Community

Matias Kreder
Matias Kreder

Posted on

How to stream video from the DeepRacer camera

Intro

I have been working on several projects that require individuals to get access to the DeepRacer camera.

  • At UADE University, students needed access to the camera for some assignments.
  • At a conference called Nerdearla, the video streaming team would like access to the car's camera to stream from it.

After hacking around with the car a little and with some hints from David Smith from AWS, I came up with the following process. I'm documenting it here for anyone needing it and a future version of me.

Backup Configuration Files

mkdir -p /home/deepracer/backup
cp /opt/aws/deepracer/lib/device_console/static/bundle.js /home/deepracer/backup/
cp /etc/nginx/sites-enabled/default /home/deepracer/backup/site-config

Enter fullscreen mode Exit fullscreen mode

Perform Configuration Changes

sudo sed -i "s/isVideoPlaying\: true/isVideoPlaying\: false/" /opt/aws/deepracer/lib/device_console/static/bundle.js
sudo sed -i "s/auth_request \/auth;/#auth_request \/auth;/" /etc/nginx/sites-enabled/default
systemctl restart nginx
Enter fullscreen mode Exit fullscreen mode

Accessing The Car Camera

The URL to access the car camera is:

https://CAR_IP/route?topic=/camera_pkg/display_mjpeg&width=480&height=360

Please consider that this change disabled authentication on the ROS backend on the car, so make sure to do this only when you are working in an isolated network you trust.

Image description

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay