Page 1 of 1

Realtime streaming

Posted: 23 Mar 2011 14:25
by jonathanc
Hello everyone,

I am looking for a way to stream my desktop and transmit it to
a nearby computer (local LAN) with minimal latency. But there is
about a 2~2.2 second delay on the destination.

my computer spec:
Intel i7-950 + nvidia GTX 460 + 6GB ram + Win7 64bit

Code: Select all

vlc screen:// :screen-fps=30 :screen-width=800 :screen-height=600 :sout-transcode-high-priority :sout-transcode-threads=4 :screen-mouse-image=C:\cursor.png :sout=#transcode{vcodec=h264,vb=512,acodec=mp4a,ab=32,channels=1,samplerate=8000} :rtp{dst=***.***.***.***,port=1234,sdp=rtsp://***.***.***.***:8080/test.sdp,access=udp}
vlc 1.1.7 Preferences:
UDP input cache: 50ms
Real RTSP cache: 50ms
Screen input cache: 100ms
UDP stream output cache: 1ms
RTP stream output cache: 1ms
Stream output muxer cache: 50ms
Use GPU acceleration (experimental) : Enable

My CPU loading is about 8%~12% when streaming my desktop,
is there anything I can do to reduce the delay to 1 sec or below? :)

Re: Realtime streaming

Posted: 23 Mar 2011 16:26
by Rémi Denis-Courmont
First you need to decrease buffering on the receiver.

Secondly, you probably need to tune the codec for low latency. In particular, you should turn off any encoding option that involves B-frames.

Re: Realtime streaming

Posted: 24 Mar 2011 15:00
by jonathanc
First you need to decrease buffering on the receiver.

Secondly, you probably need to tune the codec for low latency. In particular, you should turn off any encoding option that involves B-frames.
Thanks for the reply, that helps a lot! :D
I change x264 settings and the latency reduce to about 1.4 sec.
at the receiver side, I embed the rtsp link on a webpage as below

Code: Select all

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" src="rtsp://***.***.***.***:8080/test.sdp" width="800" height="600" id="vlc"></embed>
I tried to use --no-plugins-cache in my streaming batch file, but the latency is still around 1.4 sec. Did i do something wrong?
can I add some parameter on the webpage to control the vlc plug-in buffer(cache) size?

Re: Realtime streaming

Posted: 24 Mar 2011 19:10
by Rémi Denis-Courmont
I don't know how to reduce caching on the web page. In VLC, it's "vlc --rtsp-caching=SOMETHING".

Re: Realtime streaming

Posted: 24 Mar 2011 23:07
by dansus
Use GPU acceleration (experimental) : Enable
What would the Cli cmd be to enable GPU?

Re: Realtime streaming

Posted: 26 Mar 2011 09:53
by privatesam
I've been looking fir the cli call for gnu transcoding for a while now. Would be excellent if someone could provide it here. Thanks in advance.

Re: Realtime streaming

Posted: 21 Dec 2012 12:24
by Tyrion
Hello everyone,

I am new in this. I would like reducing latency. How i can decrease buffering on the receiver?, and how i can tune the codec for low latency?. I don't know the steps.
Where is x264 settings?.

My code is

:sout=#transcode{vcodec=mp1v,vb=4096,scale=1,acodec=mp2a,ab=192,channels=2,samplerate=44100}:duplicate{dst=display{noaudio},dst=rtp{dst=localhost, port=5555,mux=ts}} :sout-all :sout-keep :dshow-size=320x240

But there is about a 2~3 second delay on the dst

Thanks