I am streaming video and audio from my web cam/microphone over UDP. When I view the stream (even on the same machine) there is a delay of about 4 seconds. I have tried setting the UDP Cache setting to 0, or 1 but it doesn't seem to help. I have tried reducing the video and audio bit-rates, using mono sound and reducing the sample-rate all to no avail.
Does anyone have any ideas how I could reduce the delay, to something better suited to for a video conference, i.e < 1 second?
Is there a setting I can apply to the viewer/streamer that can help?
Thanks,
Marc
Try this.
#!/bin/sh
ETH=eth0
cvlc --miface=$ETH v4l2:///dev/video0 :input-slave=alsa://hw:0,0 :sout=#transcode{vcodec=h264,venc=x264{preset=ultrafast,tune=zerolatency,intra-refresh,lookahead=10,keyint=15},scale=auto,acodec=mpga,ab=128}:rtp{dst=224.10.0.1,port=5004,mux=ts} :sout-keep >/dev/null 2>/dev/null &
vlc1=$!
vlc --miface=$ETH rtp://224.10.0.1 >/dev/null 2>/dev/null &
vlc2=$!
wait $vlc2
kill -9 $vlc1
I've 2 seconds delay with 720p webcam, it produce about 2.5Mbit/s trafic and load for one core ~30%.
If you are using rtsp protocol to stream to video/audio, you can adjust the delay at
tools->preferences->all->input/codecs->demuxers->RTP/RTSP->caching value
tools->preferences->all->input/codecs->demuxers->RTP->RTP de-jitter buffer length
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With