libvlcsharp | Cross-platform .NET/Mono bindings for LibVLC | Media library
kandi X-RAY | libvlcsharp Summary
kandi X-RAY | libvlcsharp Summary
The LibVLCSharp.Forms and Uno packages features a MediaPlayerElement control, similar to the ones provided by the .NET Framework on WPF and UWP. It currently supports iOS, Android and UWP (Uno only).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libvlcsharp
libvlcsharp Key Features
libvlcsharp Examples and Code Snippets
Community Discussions
Trending Discussions on libvlcsharp
QUESTION
I'm working on a project that takes individual images from an RTSP-Stream and manipulates them (drawing bounding boxes). Those images should be restreamed (h264 encoded) on a separate RTSP-stream on an other address and shouldn't be saved on the local disk.
My current code so far is:
...ANSWER
Answered 2021-Aug-31 at 13:23Because you are doing a new Media for each frame, you won't be able to stream it as a single stream.
What you could do is create a MJPEG stream : Put .jpg images one after one in a single stream, and use that stream with LibVLCSharp to stream it.
However, if LibVLCSharp is faster to read the data from your memory stream than you are writing data to it, it will detect the end of the file, and will stop the playback / streaming (A Read() call that returns no data is considered as the end of the file). To avoid that, the key is to "block" the Read() call until there is actually data to read. This is not a problem to block the call as this happen on the VLC thread.
The default MemoryStream
/StreamMediaInput
won't let you block the Read() call, and you would need to write your own Stream
implementation or write your own MediaInput
implementation.
Here are a few ideas to block the Read call:
- Use a BlockingCollection to push Mat instances to the stream input. BlockingCollection has a Take() method that blocks until there is actually some data to read
- Use a ManualResetEvent to signal when data is available to be read (it has a Wait() method)
It would be easier to talk about that on The LibVLC discord, feel free to join !
If you manage to do that, please share your code as a new libvlcsharp-sample project!
QUESTION
We are using libvlcsharp to play a live mp3 network stream in our xamarin.ios app using the following code snippet
...ANSWER
Answered 2021-Nov-26 at 13:13Don't forget that Play()
is not a synchronous method as you might expect. It is a method that posts a stop message to a background thread, and only then starts to play the media.
When you're executing your IsStartingOrPlaying()
method right after, chances are that the state is not the one that you might have expected, thus calling the second Play()
QUESTION
I have a simple WinForms
solution with 2 video players one is Vlc.DotNet and the second is libvlcsharp
and besides that, I have a simple button that plays both videos.
for libvlcsharp
i followed this example
and for Vlc.DotNet
i used this example
further more im attaching both logFiles Loglibvlcsharp.txt and LogVlcDotNet
this is my code
...ANSWER
Answered 2021-Nov-09 at 18:19Have you tried using this?
it should be native to winforms,
all you have to do choose the right .dll at toolbox-> choose items-> com compoents-> windows media player.
QUESTION
I am trying to play YouTube using the LibVLC on multiple instances, in a WPF app. This works fine maybe 75% of the time, but stream freeze for a second or 2 and get pixeleted the other 25%. This seems to be random.
Here is my code:
...ANSWER
Answered 2021-Oct-08 at 07:29General feedback on your code.
- Keep track of the mediaplayer as long as you are using it, and dispose it when you're done.
- Don't dispose LibVLC while you're using it.
- Integrate each mediaplayer with a view, right now you're just calling play on mediaplayers who don't have a drawing target. LibVLC will create random windows to draw on then. Probably not what you want.
Now, playing your stream in the VLC desktop app with logs open will provide some insights:
QUESTION
Link to full sample app C# Winform application built in Visual Studio 2019 libvlcsharp runtime version v4.0.30319 version 3.4.4.0
I built a simpler application that has the same problem as one that is currently deployed.
Here's where the code gets the player started:
...ANSWER
Answered 2021-Oct-22 at 01:45To fix problem upgrade to version 3.6.1.0 for both libvlcsharp and libvlcwinforms.winforms
QUESTION
I have an intermitted build issues related to LibVLCSharp and the bin\Debug outputs.
When I build a Solution containing a LibVLCSharp Project, I can see the libvlc.dll in the final win-x64 output folder, but when I start debugging, the following files get deleted, and the application fails with :
...ANSWER
Answered 2021-Oct-20 at 05:46The LibVLC-nuget project is meant to be refereced directly in the startup project.
This is because we embed target files in the NuGet packages that creates a Task that executes BeforeBuild, and I'm not sure how that would work in referenced projects. You can see it there : https://github.com/mfkl/libvlc-nuget/blob/56178d3d4fd4d5b4874d41e5e9de07116be4cb64/build/VideoLAN.LibVLC.Windows.targets#L16
I'm pretty sure msbuild does not rebuild your dependent project every time, thus not catching the conditional "Content" files.
We do this, because otherwise the visual studio project tree would be filled with every .dll files from the plugins folder, which would slow down the visual studio process.
QUESTION
I am trying to Embed VLc in Winform Application on .net core 3.1 framework. Packages installed are ** LibVLCSharp 3.6.1 LibVLCSharp.WinForms 3.6.1 **
...ANSWER
Answered 2021-Oct-16 at 12:02The package doesn't include the actual 'libvlc' as you might expect, its only initialization code in the LibVLCSharp. Ensure you installed the VideoLAN.LibVLC.[YourPlatform]
package in your target project. Or download it manually and point towards the folder:
QUESTION
I am trying to start a capture of the webcam, transcode it and output it to RTSP
but I cannot view the stream when I view: rtsp://127.0.0.1:53211
I get a log in my VLC player saying:
...ANSWER
Answered 2021-Oct-10 at 02:19There were two errors:
- This option is malformed and causes a silent error
QUESTION
I have been using this code to capture the webcam and I have been trying to learn from it and make it better. Rider IDE suggested I should use an async variant of MemoryMappedViewStream.Read
but it doesn't work at all. It produces all-black images suggesting the async and sync methods are totally different. I am wondering why that's the case?
ANSWER
Answered 2021-Oct-09 at 08:37await sourceStream.ReadAsync(bytes, 0, bytes.Length, token).ConfigureAwait(false);
QUESTION
I am trying to write a simple player application using LibVLCSharp and I am wondering how to stop the app when player closes. Currently, it just freezes and doesn't stop the app even though I added SetExitHandler
callback.
ANSWER
Answered 2021-Oct-07 at 06:33The following code example from LibVLCSharp GitHub Page shows how to play the video in a console application.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libvlcsharp
Install LibVLC in your platform specific project.
Install LibVLCSharp or LibVLCSharp.Forms (if you plan on using Xamarin.Forms)
Follow the Getting started guide. Make sure you read it since it contains platform-specific caveats.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page