Page 1 of 1
vlc part of desktop streaming to <host>:<port> via UDP
Posted: 27 Apr 2013 00:20
by Aubin
With VLC, I wish to stream a portion of the desktop and send it to another host on a local area network.
The capture seems to work, I see a correct portion of the desktop into the VLC server:
Wireshark running in promiscuous mode on the client shows that nothing is sent by the server (filter is ip.src==192.168.1.31 && udp.port==2416).
Here are my batch files:
Server.bat
Code: Select all
vlc -vvv screen:// :screen-fps=25 :screen-top=12 :screen-left=4 :screen-width=320 :screen-height=200
--sout=#transcode{acodec=none}:duplicate{dst=std{access=udp{ttl=1},dst=192.168.1.7:2416},dst=display} --sout-keep
Client.bat
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 01:53
by ibstars
Try using 2 versions of vlc players, that way u define the client and the server. With one player is a bit confusing.
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 07:59
by Rémi Denis-Courmont
Look at the VLC logs. Most probably missing a muxer.
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 09:58
by Aubin
@IBstars: I've edited my post to clarify the usage: two instances of VLC are launched and two batch files are used, client and server.
@Rémi Denis-Courmont: They're no log in binaries directory, where are they?
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 14:13
by ibstars
I have managed to do what you are looking for but it differs from your idea.
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 15:13
by ibstars
Ok this works, only to show you what i did. You can experiment with it.
Open vlc, go to Tools + Preferences + show settings all + stream output. On stream output paste this
Code: Select all
#transcode{vb=450,width=480,vcodec=h264,deinterlace,samplerate=44100}:duplicate{dst=std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=/mediaplayer/stream.flv},dst=none}
And click save.
Now go to media , open network stream + captured devices, on capture node select desktop, and click play.
To be able to view the stream , you need wamp server.
Once you install the wamp server, you can access your stream by typing this
http://localhost:8080/mediaplayer/stream.flv
This works on local network, but for the outside world you need the domain name and port 80, 8080 to be port forwarded so they can see it and the index page with the embed code.The embed is preety easy!!
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 15:56
by Aubin
No, this is not the solution I expect.
I wish to use UDP, not a web server, I want to keep it simple.
One send UDP datagrams, other receives it, that's all.
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 16:30
by ibstars
No, this is not the solution I expect.
I wish to use UDP, not a web server, I want to keep it simple.
One send UDP datagrams, other receives it, that's all.
So you want this to be on local network only.
Re: vlc part of desktop streaming to <host>:<port>
Posted: 27 Apr 2013 17:12
by Aubin
Yes, LAN only.
Re: vlc part of desktop streaming to <host>:<port> via UDP
Posted: 27 Apr 2013 20:44
by Aubin
Finally, after a lot of tests, I've discovered I need an encoder for screen source:
vlcServer.bat
Code: Select all
@start /MIN "" "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" ^
-vvv screen:// :screen-fps=5 :screen-top=545 :screen-left=232 :screen-width=250 :screen-height=120 ^
--sout=#transcode{vcodec=h264,acodec=none}:rtp{dst=192.168.1.31,port=5004,mux=ts,ttl=1} :sout-keep
vlcClient.bat
Code: Select all
@start /MIN "" "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" rtp://:5004
As you can see, the encoder used is H264 for the video, none for the audio.
And now, I've a performance issue... because the observed frame rate is very, very, low!
Re: vlc part of desktop streaming to <host>:<port> via UDP
Posted: 27 Apr 2013 23:11
by ibstars
Remove the fps.
Re: vlc part of desktop streaming to <host>:<port> via UDP
Posted: 27 Apr 2013 23:36
by Aubin
Without ":screen-fps=24 " nothing is displayed, with ":screen-fps=24 ", the video is pretty good but a 3s latency is observed.
Re: vlc part of desktop streaming to <host>:<port> via UDP
Posted: 28 Apr 2013 00:21
by ibstars
Ignore this
Re: vlc part of desktop streaming to <host>:<port> via UDP
Posted: 28 Apr 2013 00:50
by ibstars
Your code is ok.
Latency will always exist!
By the way, i used port 1234.
Re: vlc part of desktop streaming to <host>:<port> via UDP
Posted: 28 Apr 2013 18:21
by ibstars
@Aubin - I was just wondering, is it possible to get the audio out.
I mean while I'm streaming a part of my desktop can i play another video on and stream the sound and video together as part of the desktop.