libvlcsharp | Cross-platform .NET/Mono bindings for LibVLC | Media library

 by   videolan C# Version: 3.7.0 License: LGPL-2.1

kandi X-RAY | libvlcsharp Summary

kandi X-RAY | libvlcsharp Summary

libvlcsharp is a C# library typically used in Media applications. libvlcsharp has no bugs, it has no vulnerabilities, it has a Weak Copyleft License and it has medium support. You can download it from GitHub.

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

            kandi-support Support

              libvlcsharp has a medium active ecosystem.
              It has 1192 star(s) with 230 fork(s). There are 54 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              libvlcsharp has no issues reported. There are 6 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of libvlcsharp is 3.7.0

            kandi-Quality Quality

              libvlcsharp has 0 bugs and 0 code smells.

            kandi-Security Security

              libvlcsharp has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              libvlcsharp code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              libvlcsharp is licensed under the LGPL-2.1 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              libvlcsharp releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 136 lines of code, 0 functions and 257 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libvlcsharp
            Get all kandi verified functions for this library.

            libvlcsharp Key Features

            No Key Features are available at this moment for libvlcsharp.

            libvlcsharp Examples and Code Snippets

            No Code Snippets are available at this moment for libvlcsharp.

            Community Discussions

            QUESTION

            LibVlcSharp: How to stream a dynamic frame sequence with RTSP (Dynamic StreamMediaInput)?
            Asked 2021-Dec-14 at 19:56

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

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

            Source https://stackoverflow.com/questions/68983620

            QUESTION

            C# LibVLCSharp switching media stream causes HTTP exception
            Asked 2021-Nov-26 at 14:42

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

            Don'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()

            Source https://stackoverflow.com/questions/70110385

            QUESTION

            Playing video yeild black screen with audio(Vlc.DotNet and libvlcsharp)
            Asked 2021-Nov-09 at 18:19

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

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

            Source https://stackoverflow.com/questions/69897287

            QUESTION

            C# LibVLCSharp issue with playing YouTube
            Asked 2021-Oct-30 at 06:53

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

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

            Source https://stackoverflow.com/questions/69445725

            QUESTION

            Memory Access Violation disposing libvlcsharp objects from a task
            Asked 2021-Oct-22 at 01:45

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

            To fix problem upgrade to version 3.6.1.0 for both libvlcsharp and libvlcwinforms.winforms

            Source https://stackoverflow.com/questions/69650954

            QUESTION

            LibVlcSharp Mystery: Visual Studio deletes libvlc.dll files on Debug>Start Debugging
            Asked 2021-Oct-20 at 05:46

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

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

            Source https://stackoverflow.com/questions/69582617

            QUESTION

            Embedding VLC player in WInform Application in .Net Core. Core.Intialize() Giving Exception
            Asked 2021-Oct-16 at 12:02

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

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

            Source https://stackoverflow.com/questions/69593147

            QUESTION

            LibVLCSharp: cannot view the RTSP
            Asked 2021-Oct-10 at 02:19

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

            There were two errors:

            1. This option is malformed and causes a silent error

            Source https://stackoverflow.com/questions/69485916

            QUESTION

            Why Read and ReadAync are producing totally different results
            Asked 2021-Oct-09 at 10:16

            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:37
            await sourceStream.ReadAsync(bytes, 0, bytes.Length, token).ConfigureAwait(false);
            

            Source https://stackoverflow.com/questions/69504981

            QUESTION

            LibVLCSharp: how to stop the application when player closes
            Asked 2021-Oct-07 at 06:33

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

            The following code example from LibVLCSharp GitHub Page shows how to play the video in a console application.

            Source https://stackoverflow.com/questions/69475999

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install libvlcsharp

            LibVLC is the actual VLC engine written mostly in C/C++ and compiled for your target platform. More information here. LibVLCSharp is the .NET wrapper that consumes LibVLC and allows you to interact with native code from C#/F#.
            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

            Mono, .NET Framework and .NET Core runtimes are supported.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/videolan/libvlcsharp.git

          • CLI

            gh repo clone videolan/libvlcsharp

          • sshUrl

            git@github.com:videolan/libvlcsharp.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link