Streaming a substream to YouTube Live

Shbek1

n3wb
Joined
Feb 7, 2017
Messages
7
Reaction score
2
Hey, I'm hoping someone can help me out with this or point me in the right direction. Sorry in advance, this will be a bit long.

I have an hdw4231em-as pointed at an aquarium that I'd like to live stream on YouTube. To do this I need to encode the rtsp stream to rtmp, then point that at YouTube. I have this working fine with the mainstream via FFMPEG with the following code in a .bat:

Code:
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp://USERNAME:PASSWORD@CAMIP:554 -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/YOUTUBELIVEKEY
Unfortunately I have a data cap, and I don't want to dedicate a huge hunk of my monthly data to a 24/7 10fps 1080p stream. I also don't want to lower my video stream to Blue Iris, so I'd like to use a substream. Substream 2 is enabled and I tried adding on to the rtsp bit of code with:

Code:
rtsp://USERNAME:PASSWORD@CAMIP:554/cam/realmonitor?channel=1&subtype=2
This fails on FFMPEG. I think something with the '&' is causing problems - it adds a space on the command window. It does work fine on Blue Iris and VLC, so I know the substream is properly set up and working. Is there a way of pointing to the substream without an '&' symbol?

Any idea on how I can get this working?
I'd be open to trying other programs (preferably free). I've also tried OBS Studio, but I couldn't get the stream to show any rtsp stream despite screen broadcasting working fine.
 
Last edited:

cb8

Getting comfortable
Joined
Jan 16, 2017
Messages
111
Reaction score
64
Try putting quotes around the URL. Ampersand is used to invoke multiple commands from a single line and needs to be quotes or escaped.
 
Top