mfkl / libvlc-nuget

NuGet packaging setup for LibVLC
GNU Lesser General Public License v2.1
63 stars 10 forks source link

I'm trying to use libVLCSharp.Forms nugut for displaying video from an UDP stream but it just doesn't seem to work. #13

Closed fpuente70 closed 6 years ago

fpuente70 commented 6 years ago

I tried with VLC application for Windows and it fails to reproduce the UDP video stream on version 3.0.x and works fine on the older version 2.4. ¿What has changed? ¿How can I make the nuget display the UDP stream video?

jeremyVignelles commented 6 years ago

Does it work with the vlc 3.0.0 desktop application

fpuente70 commented 6 years ago

When I say I tried with VLC application for Windows I mean I tried the desktop application and it fails on VLC 3.0.x but works fine on version 2.4 I thought it could have some relationship with the nuget not being able to display the UDP stream video but working well with, for example, http

fpuente70 commented 6 years ago

the nuget is very recent, so probably uses the code from VLC 3.0.x

fpuente70 commented 6 years ago

just in case it helps, I generate the UDP stream using FFMPEG using the following setting:

ffmpeg -f gdigrab -framerate 30 -i desktop -preset ultrafast -vcodec libx264 -tune zerolatency -b 900k -f mpegts udp://127.0.0.1:1234

fpuente70 commented 6 years ago

It works great on VLC v2.4 but with the newer 3.0.x it doesn't seem to recognize the codec used or something like that

jeremyVignelles commented 6 years ago

The NuGet is 3.0.0 in a packege, we never updated it to a more recent version. If it fails with VLC 3.0.4 itself, there's nothing we can do about it and you should submit a bug in vlc's trac

fpuente70 commented 6 years ago

I will do that then, thanks Anyway, if you think it could be solved through non default configuration, I will be happy to hear it

jeremyVignelles commented 6 years ago

It's hard to tell without the vlc logs (they will ask you). Please close this issue as there's nothing we can do here

fpuente70 commented 6 years ago

Before reporting the bug I made a little additional investigation and found out it is not a bug on VLC v3.0.x but a restriction on the maximum MTU size when using UDP. I made the change on the streaming source to take that into account and now it works fine on VLC desktop application for Windows v 3.0.x. However, I still can't open the UDP stream using libVLCSharp.Forms, at least on IOS which I'm using for the tests. How can I trace the problem? It doesn't give me any message... just tries to start the video but never starts. Is there any way to access a log of debug it to see what is happening? Thanks in advance

mfkl commented 6 years ago

Have you tried LibVLC.Log += ...?

fpuente70 commented 6 years ago

I am using a Xamarin.Forms example that simply sets the video directly on the XAML so I have no control on the loading of the video or anything. I will check that property to see if I can find any info there, but if I have to write into it what is happening (+=...) then it doesn't help much.

mfkl commented 6 years ago

https://github.com/videolan/libvlcsharp/blob/93ee9f3d1ab61d3db54c7e0a58a3457b781d4142/LibVLCSharp.Tests/MediaTests.cs#L118

then it doesn't help much.

Then share your code. Helping you blindly is not very efficient ;-)

fpuente70 commented 6 years ago

I will try that. Thanks

fpuente70 commented 6 years ago

That link was of great use... I had to do some extra work to put the project to work but finally it works great... I owe you a couple beers at least. Thanks so much

bharathraja commented 3 years ago

@fpuente70 Can you share you working code ?