Realtime streaming

About encoding, codec settings, muxers and filter usage
jonathanc
New Cone
New Cone
Posts: 2
Joined: 23 Mar 2011 13:42

Realtime streaming

Postby jonathanc » 23 Mar 2011 14:25

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? :)

Rémi Denis-Courmont
Developer
Developer
Posts: 15215
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Realtime streaming

Postby Rémi Denis-Courmont » 23 Mar 2011 16:26

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jonathanc
New Cone
New Cone
Posts: 2
Joined: 23 Mar 2011 13:42

Re: Realtime streaming

Postby jonathanc » 24 Mar 2011 15:00

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15215
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Realtime streaming

Postby Rémi Denis-Courmont » 24 Mar 2011 19:10

I don't know how to reduce caching on the web page. In VLC, it's "vlc --rtsp-caching=SOMETHING".
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

dansus
New Cone
New Cone
Posts: 7
Joined: 22 Mar 2011 06:01

Re: Realtime streaming

Postby dansus » 24 Mar 2011 23:07

Use GPU acceleration (experimental) : Enable
What would the Cli cmd be to enable GPU?

privatesam
New Cone
New Cone
Posts: 1
Joined: 26 Mar 2011 09:49

Re: Realtime streaming

Postby privatesam » 26 Mar 2011 09:53

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.

Tyrion
New Cone
New Cone
Posts: 2
Joined: 12 Jul 2012 13:06

Re: Realtime streaming

Postby Tyrion » 21 Dec 2012 12:24

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


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests