Skip to content

Instantly share code, notes, and snippets.

@j6k4m8
Last active January 16, 2022 23:44
Show Gist options
  • Save j6k4m8/95b65a128423d6c7e79878bc5ad137a0 to your computer and use it in GitHub Desktop.
Save j6k4m8/95b65a128423d6c7e79878bc5ad137a0 to your computer and use it in GitHub Desktop.
Stream the AWS DeepLens camera to YouTube Live.
#!/bin/bash
# Stream the AWS DeepLens camera to YouTube Live.
#
# The DeepLens has a great high resolution (semi-fisheyed) camera, and it's great for streaming large rooms
# or serving as a janky security cam.
#
# * The `anullsrc` input sends an empty sound channel; this is because YT otherwise will not stream correctly.
# * The `ultrafast` preset can be replaced with `veryfast` if you find that your DeepLens can keep up with it.
# Otherwise you should stick with `ultrafast` which will encode fast enough that you can stream at 1x speed.
# * Replace the `XXXX...` text with your unique YouTube stream identifier. Note that this should stay secret!!
sudo ffmpeg -f lavfi -i anullsrc -i "/opt/awscam/out/ch1_out.h264" \
-preset ultrafast -f flv 'rtmp://a.rtmp.youtube.com/live2/XXXX-XXXX-XXXX-XXXX-XXXX'
@j6k4m8
Copy link
Author

j6k4m8 commented Jan 16, 2022

sudo ffmpeg -f lavfi -i anullsrc -re -i "/opt/awscam/out/ch1_out.h264" -preset superfast -crf 40 -f flv -r 5 'rtmp://a.rtmp.youtube.com/live2/####'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment