Stream Video from Raspberry Pi Camera to YouTube Live

Learn how to easily stream video from your Raspberry Pi to YouTube live in Python in a few simple steps. By the end of this video, you will be able to have a publicly viewable live stream with a simple hardware setup.
Before reading the remainder, be sure to subscribe and support the channel if you have not!
Subscribe:
Support:
Step 1-) Library Setup
Run the following commands in a terminal on Raspberry Pi
sudo apt install python3-picamera ffmpeg
Step 2-) Code Setup
Now that you have the libraries you can go ahead and create a Python file and substitute this code.
https://github.com/shillehbean/youtube-p2/blob/main/stream_yt.py
The only thing you need to do is substitute your streaming key, which you can get from YouTube when you start a live stream.
Conclusion:
That should be all you need to stream to YouTube live! Hope you got it working. If you did, please subscribe to the channel or consider donating at the buymeacoffee link above. Thanks.

Create a free account to access full content.

All access to code and resources on ShillehTek.

Signup Now

Already a member? Sign In

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.