VLC setup for real time streaming with a webcam

About encoding, codec settings, muxers and filter usage
eliocon
New Cone
New Cone
Posts: 1
Joined: 26 Jun 2019 05:09

VLC setup for real time streaming with a webcam

Postby eliocon » 26 Jun 2019 16:28

Hi people, Good morning.
My name is Eliomar, I am a beginner with VLC and for that reason I would like to ask for a little help in streaming.

Since a week I am trying to stream my web cam over my local network in real time with no success.

I get the image of the webcam but with a latency that I would prefer to eradicate, the lowest latency that I have reached is approximately 1.5s, I would like to decrease it a little more at least below 1s.

Is it possible to decrease that latency below 1 second? I have read that VLC is a powerful video tool and for that reason i am trying to achieve this with that. Checking in other forums I have read too that I can use other video players to play the stream with a "more real time experience". But I would like to know if I can achieve that only with VLC on the server side (the one that sends the stream) and also in the client side (the one that receives the stream).

I am running VLC 3.0.4 vetinari.

Ubuntu 18.04 LTS in one machine, the one that sends the stream.
windows 10, in the client machine.

My current setup on the server side are:

1. live-caching: 300ms
2. fps: 30
3. I am using RTSP protocol and the TS container (Video h264 + mp3).
when I am going to start the stream I check the next line
:sout=#transcode{vcodec=h264,vb=800,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:rtp{sdp=rtsp://:12345/stream.ts} :no-sout-all :sout-keep

I tried to decrease the "vb" parameter with a little improvement on the latency (with a lower size than with 800 but that's no problem, I don't mind the size of the image) but the streaming on the client side tends to break after less than a minute.
Besides that? cold you explain me what is that parameter? what does it do? the "vb" parameter and the "ab" parameter?.

On the client side I have the following setup

1. network-caching: 300ms (I decreased, since the default value is 1000ms, and I Perceive an imporvement on the latency, the one of 1.5s, but sometimes the screen goes into green or gray, What does it means a green or gray screen?)
2- In the tool preferences I have tried with different post-processing levels, but the result is the same, i.e.: with post-processing level 4 i get the same latency than with 6, besides the image is worse than with post-processing level 6. So I understand that's not the problem, that make me think that the problem may be on the server side on any setup.

Besides that I have changed some streaming setup like the Stream output muxer cahing (ms).
That is in, tool --> preferences --> all settings --> streaming output
which i changed to 500ms from the default that was 1500ms but i did not get any improvement on the latency.

I would like to know if I am missing something? there is any other configuration parameter that I am missing? should I test with other video players and measure the latency of the streaming?

I also have tried the streaming between two PCs on the same local network (taking off any internet connection problem).
And I tried even sending and receiving on the same PC (taking off any local network problem) and I am getting approximately the same latency of 1.5s.
sometimes, even the tests on the same computer were better because between the two PCs the screen became green after a few seconds or simply started on green and the streaming was not able to be seen.

I would appreciate all the help with this please, or if you can send me any documentation that can help me to solve this issue I will appreciate that.
Also if you want to send documentation about streaming that is not contemplated on the VLC wiki I will appreciate too. I like the media world I would like to learn alot of it.

Well, without nothing more to say. Thanks in advance for all the help guys.

Regards.

Eliomar.
Last edited by eliocon on 26 Jun 2019 16:36, edited 1 time in total.

Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 11 guests