Does anyone LiveStream their camera on youtube?

I have been looking for a RPi 4 Model B - 8GB RAM. I have the 4B with 4 gig and a 3B+ with 1 gig. Both are on my desk. I use the 4B for running a ADS-B receiver and the 3B+ is running CumulusMX for my weather station. I need one more, for just general screwing around with. When they finally get back in stock, I'll probably snag 2 of them, provided they are a decent price.

I am trying to miniaturize my computer collection. I run a MAC Mini M1 for my main desktop computer, I run a Lenovo M710Q Think Centre mini for Blue Iris and my CAD Software, I have a Dell Optiplex 3040 mini I run my Ham Radio software on and use another Dell Optiplex 3040 mini for use with my entertainment center in the mancave. My home built NAS is still running on a Dell Optiplex 780. It is beginning to get tired after 8 years, 24/7 running. Trying to figure out how to miniaturize that. May have to go spend some money and get a Synology NAS. I already have way too many computers running in my man cave, what's a couple of more?? :idk: :thumb:
 
@TonyR I've noticed that your livestream stopped and you started a new one again. Did you see specific notifications in YouTube Studio (stream status).
 
  • Like
Reactions: TonyR
@TonyR I've noticed that your livestream stopped and you started a new one again. Did you see specific notifications in YouTube Studio (stream status).
It's up again.
Was trying to quit vMix and use OBS, went back to vMix, live back up @ 0848 CT.
To be continued...have doc appt in 1 hour. :cool:
 
  • Like
Reactions: looney2ns
I have a 3B sitting doing nothing, giving me ideas here!
 
My stream died today, but was a personal record.....72 hours and 41 minutes. I've started a new session, let's see if I can top the PR :)
 
Edit: after testing with Synology Surveillance Station, I now started to rest with rtmp directly to YouTube. That seems to work fine also and I’m curious how long the livestream stays online.

I also tried OBS Studio, but I couldn’t get it running. Someone know how to set it up with a Dahua cam? I followed a couple of tutorials on the internet but that didn’t work out for me.
 
I know this is a year-old thread, but are there more recent threads specifically regarding streaming to YT via RTMP either directly from a camera, via OBS or from a customized RPi?

I have a Hikvision camera which streams to TY via OBS which manages to stay up for months, but I'd like to ditch the windows computer at some point and go direct from a new camera, or maybe go the raspberry route. I spent some time trying to get ffmpeg working on a raspberry but was not able to get it to work.

I'm hoping to deploy a new camera in a new location soon and want to figure out my options.
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.
 
  • Like
Reactions: looney2ns
I know this is a year-old thread, but are there more recent threads specifically regarding streaming to YT via RTMP either directly from a camera, via OBS or from a customized RPi?

I have a Hikvision camera which streams to TY via OBS which manages to stay up for months, but I'd like to ditch the windows computer at some point and go direct from a new camera, or maybe go the raspberry route. I spent some time trying to get ffmpeg working on a raspberry but was not able to get it to work.

I'm hoping to deploy a new camera in a new location soon and want to figure out my options.
After several tests and attempts to livestream continuously using my Synology NAS and Dahua cams, I ran into solution. At least, I hope so...

I am testing it right now and for those who ran into the same problem, maybe this will resolve the problem of streams that stop after a certain time:

 
Last edited:
  • Like
Reactions: bigredfish
That is true. But. If the stream is off for 15 minutes or so, it will not come back. I'm not sure of the exact time limit.

If your OBS is installed on a Linux machine and you are into command line operations, you can use a YouTube utility called "youtube-dl" to check the status of the stream. Then using the results, you can automatically restart the YouTube livestream.

Here is the command to get you started.

sudo pip3 install youtube-dl

youtube-dl -F 'htttps:/www.youtube.com/watch?v=YOUR_VIDEO_ID'

Replace YOUR_VIDEO_ID with the actual video ID of the live stream. If the live stream is active, this command will list available formats for the video. If the stream is not active, it will return an error.

Or, another approach is to monitor the bandwidth used by your ethernet connection. You can do that using a Linux utility called ifstat.

sudo apt-get install ifstat

#!/bin/bash

# Monitor eth0 and execute a script if bandwidth falls below 100bps

# Path to the restart script
RESTART_SCRIPT="/home/pi/scripts/restart.sh"

log_debug() {
echo "[DEBUG] $(date '+%Y-%m-%d %H:%M:%S') - $1"
}

log_debug "Starting bandwidth monitor for eth0."

while true; do
read RX TX <<< $(ifstat -i eth0 1 1 | awk 'NR==3 {print $1, $2}')

log_debug "Current bandwidth - RX: ${RX}bps, TX: ${TX}bps"

if (( $(echo "$RX < 100" | bc -l) )) || (( $(echo "$TX < 100" | bc -l) )); then
log_debug "Bandwidth below threshold. Executing restart script."
bash "$RESTART_SCRIPT"
log_debug "Restart script executed."
break
else
log_debug "Bandwidth is above the threshold."
fi

sleep 5
done

In this example the script monitors eth0 and if the bandwidth goes below 100 bps the script runs another bash script called restart.sh. The restart script kills the existing stream and restarts a new one.
 
Unbelievable, this is so frustrating....the stream did end again and I'm about tog give it up. Unfortunately I don't have a Linux machine, other than mij Synology NAS.

Now I even can't use RTMP straight from my Dahua cam anymore, which worked fine before. I used this setup guide for it but none of my cameras are able to stream directly to YouTube anymore. Anyone else experiencing problems?

 
One thing I noticed in the video, he said you need "P2P" enabled. You do not.
 
One thing I noticed in the video, he said you need "P2P" enabled. You do not.
I left that option disabled too, no need for enabling it.

It looks like YouTube changed something, because I can use VLC player to watch the camera live via rtsp. Using the settings with rtmp don't work anymore, typical.
 
I have one Dahua 4K camera that I use the built in RTMP YouTube encoder. It is still running.


I am also running this livestream on a Dahua 4k camera with the built in RTMP YouTube encoder, and works really well. I believe the longest continuous stretch (being online) has been close to a month, it only came down due to a power outage (very common in our area and prolonged) UPS ran out of juice.
  • I am currently researching on how to run it from OBS as I am in need of adding "stream sponsors" is RTSP the only way?
  • Ultimately I think running FFmpeg on a Raspberry Pi might be the best option; the question is if I go this route, how do I go from FFmpeg >OBS > YT?
  • I would also like to add a weather widget like on this stream Side note, I wonder how they can accomplish the uptime on this stream for over 3+ years

TIA for sharing your expertise on this matter!!!