instead of connecting to the DeepLens with HDMI micro cable, monitor, keyboard, mouse
Credit for this excellent idea goes to Ernie Kim. Thank you!
Instructions without ssh
The standard AWS DeepLens instructions recommend connecting the device to a monitor, keyboard, and mouse. The instructions provide information on how to view the video streams in this mode:
If you are connected to the DeepLens using a monitor, you can view the unprocessed device stream (raw camera video before being processed by the model) using this command on the DeepLens device:
mplayer –demuxer lavf /opt/awscam/out/ch1_out.h264
If you are connected to the DeepLens using a monitor, you can view the project stream (video after being processed by the model on the DeepLens) using this command on the DeepLens device:
mplayer –demuxer lavf -lavfdopts format=mjpeg:probesize=32 /tmp/results.mjpeg
Instructions with ssh
You can also view the DeepLens video streams over ssh, without having a monitor connected to the device. To make this possible, you need to enable ssh access on your DeepLens. This is available as a checkbox option in the initial setup of the device. I’m working to get instructions on how to enable ssh access afterwards and will update once this is available.
To view the video streams over ssh, we take the same
options above and the same source stream files, but send the stream
over ssh, and feed the result to the stdin of an
running on the local system, presumably a laptop.
All of the following commands are run on your local laptop (not on the DeepLens device).
You need to know the IP address of your DeepLens device on your local network:
ip_address=[IP ADDRESS OF DeepLens]
You will need to install the
mplayer software on your local
laptop. This varies with your OS, but for Ubuntu:
sudo apt-get install mplayer
You can view the unprocessed device stream (raw camera video before being processed by the model) over ssh using the command:
ssh aws_cam@$ip_address cat /opt/awscam/out/ch1_out.h264 | mplayer –demuxer lavf -cache 8092 -
You can view the project stream (video after being processed by the model on the DeepLens) over ssh with the command:
ssh aws_cam@$ip_address cat /tmp/\*results.mjpeg | mplayer –demuxer lavf -cache 8092 -lavfdopts format=mjpeg:probesize=32 -
Note: The AWS Lambda function running in Greengrass on the AWS
DeepLens can send the processed video anywhere it wants. Some of the
samples that Amazon provides send to
/tmp/results.mjpg, some send to
/tmp/ssd_results.mjpeg, and some don’t write processed video
anywhere. If you are unsure, perhaps find and read the AWS Lambda
function code on the device or in the AWS Lambda web console.
Benefits of using ssh to view the video streams include:
You don’t need to have an extra monitor, keyboard, mouse, and micro-HDMI adapter cable.
You don’t need to locate the DeepLens close to a monitor, keyboard, mouse.
You don’t need to be physically close to the DeepLens when you are viewing the video streams.
For those of us sitting on a couch with a laptop, a DeepLens across the room, and no extra micro-HDMI cable, this is great news!
To protect the security of your sensitive DeepLens video feeds: