I'm working on an interface to view my camera through a semi-public web interface with pan, zoom and preset controls, and I've gotten it down to about a 3 or 4 second delay, but I'm curious if anyone has figured out a way to get less than that?
I'm streaming through YouTube Live using their "ultra low latency" setting, and have my camera resolution (sub stream 2) lowered to 720p.
The 3 or 4 second delay makes panning and zooming pretty awkward, though the presets work well and the PZ can then fine tune.
I have a feeling it's not possible to get less than this but thought I'd see if anyone has any interesting tricks.
Incidentally here's the ffmpeg command I'm using to send my stream to YouTube Live:
The last part of that RTMP url (je86-3cmm-sk1u-6ubs) comes from your YouTube live dashboard (link).
And note that I'm broadcasting substream 2, which is the "subtype=2" in that URL. Change to 0 if broadcasting your main stream.
One thing I'm wondering about is that "-f flv" part of the commandline, which is re-encoding to FLV format of all things. If I set that to -f h264 it doesn't seem to work. Maybe that's slowing things down, and responsible for the significant loss in quality?
Anyway a bit more info here.
I'm streaming through YouTube Live using their "ultra low latency" setting, and have my camera resolution (sub stream 2) lowered to 720p.
The 3 or 4 second delay makes panning and zooming pretty awkward, though the presets work well and the PZ can then fine tune.
I have a feeling it's not possible to get less than this but thought I'd see if anyone has any interesting tricks.
Incidentally here's the ffmpeg command I'm using to send my stream to YouTube Live:
Code:
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i "rtsp://admin:password@192.168.5.220:554/cam/realmonitor?channel=1&subtype=2" -tune zerolatency -vcodec libx264 -t 12:00:00 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/je86-3cmm-sk1u-6ubs
The last part of that RTMP url (je86-3cmm-sk1u-6ubs) comes from your YouTube live dashboard (link).
And note that I'm broadcasting substream 2, which is the "subtype=2" in that URL. Change to 0 if broadcasting your main stream.
One thing I'm wondering about is that "-f flv" part of the commandline, which is re-encoding to FLV format of all things. If I set that to -f h264 it doesn't seem to work. Maybe that's slowing things down, and responsible for the significant loss in quality?
Anyway a bit more info here.
Last edited: