vlc part of desktop streaming to <host>:<port> via UDP

About encoding, codec settings, muxers and filter usage
Aubin
New Cone
New Cone
Posts: 6
Joined: 27 Apr 2013 00:01

vlc part of desktop streaming to <host>:<port> via UDP

Postby Aubin » 27 Apr 2013 00:20

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:
Image

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

Code: Select all

vlc udp://:2416
Last edited by Aubin on 27 Apr 2013 17:21, edited 4 times in total.

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port>

Postby ibstars » 27 Apr 2013 01:53

Try using 2 versions of vlc players, that way u define the client and the server. With one player is a bit confusing.
IBstars

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

Re: vlc part of desktop streaming to <host>:<port>

Postby Rémi Denis-Courmont » 27 Apr 2013 07:59

Look at the VLC logs. Most probably missing a muxer.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Aubin
New Cone
New Cone
Posts: 6
Joined: 27 Apr 2013 00:01

Re: vlc part of desktop streaming to <host>:<port>

Postby Aubin » 27 Apr 2013 09:58

@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?

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port>

Postby ibstars » 27 Apr 2013 14:13

I have managed to do what you are looking for but it differs from your idea.
IBstars

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port>

Postby ibstars » 27 Apr 2013 15:13

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!!
IBstars

Aubin
New Cone
New Cone
Posts: 6
Joined: 27 Apr 2013 00:01

Re: vlc part of desktop streaming to <host>:<port>

Postby Aubin » 27 Apr 2013 15:56

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.

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port>

Postby ibstars » 27 Apr 2013 16:30

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.
IBstars

Aubin
New Cone
New Cone
Posts: 6
Joined: 27 Apr 2013 00:01

Re: vlc part of desktop streaming to <host>:<port>

Postby Aubin » 27 Apr 2013 17:12

Yes, LAN only.

Aubin
New Cone
New Cone
Posts: 6
Joined: 27 Apr 2013 00:01

Re: vlc part of desktop streaming to <host>:<port> via UDP

Postby Aubin » 27 Apr 2013 20:44

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!

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port> via UDP

Postby ibstars » 27 Apr 2013 23:11

Remove the fps.
IBstars

Aubin
New Cone
New Cone
Posts: 6
Joined: 27 Apr 2013 00:01

Re: vlc part of desktop streaming to <host>:<port> via UDP

Postby Aubin » 27 Apr 2013 23:36

Without ":screen-fps=24 " nothing is displayed, with ":screen-fps=24 ", the video is pretty good but a 3s latency is observed.

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port> via UDP

Postby ibstars » 28 Apr 2013 00:21

Ignore this
Last edited by ibstars on 28 Apr 2013 00:53, edited 1 time in total.
IBstars

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port> via UDP

Postby ibstars » 28 Apr 2013 00:50

Your code is ok.
Latency will always exist!

By the way, i used port 1234.
IBstars

ibstars
Blank Cone
Blank Cone
Posts: 42
Joined: 20 Feb 2009 21:57
VLC version: Mul-versions
Operating System: Windows
Location: The richest man in Babylon

Re: vlc part of desktop streaming to <host>:<port> via UDP

Postby ibstars » 28 Apr 2013 18:21

@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.
IBstars


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 10 guests