libvlc | vlc for android , easy to use | Video Utils library
kandi X-RAY | libvlc Summary
kandi X-RAY | libvlc Summary
The package of libvlc makes it easier to use. Lastest: Build with libvlc:3.2.5.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Resume playback
- Sets the video view
- Resumes the player
- Start play
- Create the VLCVideoLibrary
- Set the media player
- Set the VLC output
- Destroy the video library
- Stop the player
- Release the resource released
- Pause the video library
- Pauses the playback
- Set media file
- Sets the media
- Get the default options
- Event handler
- Check if the player is playing
libvlc Key Features
libvlc Examples and Code Snippets
Community Discussions
Trending Discussions on libvlc
QUESTION
My SDP looks like below (IP and port may change ofc), video only, contains SPS/PPS and profile/level (real ones, not hardcoded)
...ANSWER
Answered 2022-Apr-01 at 11:42according to THIS issue - currently ExoPlayer doesn't support sideloading and playing SDP file, sadly...
QUESTION
I used the command prompt command
vlc --longhelp
Which generates a long text file, but it's missing a bunch of options like
network-caching
, or any caching.
Anyone have any insight into a complete list of options for the Media object in libvlc?
...ANSWER
Answered 2022-Mar-15 at 04:56not sure this wiki page is versioned to the libvlc version, but here you go https://wiki.videolan.org/VLC_command-line_help/
QUESTION
I am trying to create a method, would get passed a standard youtube link (e.g. https://youtu.be/.......) and would return the direct video playback link, just like VLC does.
In VLC this is done with a luac or lua code (https://github.com/videolan/vlc/blob/master/share/lua/playlist/youtube.lua) also for some reason VLC only plays in 640x368 resolution??
I tried looking through the code itself but I know nothing of lua so I dont understand it at all, even with the comments. Is there a resource I could read on how this is done? As I understand it, the lua code runs some script from the website itself to generate this? Also there is a lot of descrambling??
Now I wouldnt be opposed to using LibVLC to generate the links, but as I mentioned above, that only works in 640x368, which I dont understand why. If it worked with the best quality available, then thats what I would use (possibly with ability to choose resolution??)
Also I dont really care about youtubes policy about this, so dont tell me "this is against youtubes TOS, dont do this" this is a personal project only. I know that youtube is very much against this, as even the rythm bot on discord had to stop operation....
So, in short, what I am looking for: A way to get the direct link to the video resource, be it by generating it from the website or scraping it from the HTML. I know that the link will be temporary, I only need it for a short while.
...ANSWER
Answered 2022-Jan-12 at 05:47QUESTION
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
Got this Dahua vto stream link: that works with omxplayer, but vlc won't play it:
...ANSWER
Answered 2021-Nov-10 at 05:29So what happened is that the library in Debian providing support for live555 was removed in February of this year, this affects all downstream distros including but not limited to RPi OS and Ubuntu:
https://askubuntu.com/a/1363113
The 2 active versions were 2020.01.19-1 and 2018.11.26-1.1, Live555 has since added GPL license headers to the offending files, however the RFC issue remains.
Now you may be tempted to just download the latest Live555 source code and compile it... it does not work. There have been changes to function names and structures referenced by VLC, and as such VLC will not compile against the source. You need to get an older version, I specifically used this one, which is a tweaked snapshot from 2020 prior to the modifications that prevent VLC compilation:
https://github.com/rgaufman/live555
The configuration you want is ./genMakefiles linux-with-shared-libraries
, I do not know if it is required but since my system is x86-64-bit I added -m64 to the compiler options first
After compilation and install, I went on to compile VLC, adding '--enable-live555'
and '--with-live555-tree=extras/live555-master'
after placing the root Live555 folder in the VLC extras folder, however VLC failed to compile, it turns out the Live555's make install does not copy all the header files needed to where VLC is looking. They were dropped as 4 subfolders into /usr/local/include/, and the actual libs into /usr/local/lib/. Adding the correct CXX/CPP flags will make it look where they were put, however I put them all in a single folder and used 1 flag.
I also had to '--disable-mod'
to work around a dependency version issue that I had no interest in fixing, since I do not use modplug or any mod files.
50 minutes later... VLC successfully compiled! However it was expecting the libraries for Live555 to be in /usr/lib/ not /usr/local/lib/, since it took so long to compile I was just fine with linking or copying the libraries into the expected folder, and after that VLC works with RTSP when linked to the new file. Or you can choose to maintain the original VLC and run the new file directly if you need to load the camera feeds.
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
the video is playing normally, but if you open another application and go back, vlc will show a black screen with a only sound. (Android 8.0.0, last version of nuget package)
...ANSWER
Answered 2021-Nov-08 at 08:35On Android, background support needs a bit of ceremony due to how the OS works. Simply, it means you need to recreate a VideoView
and set your existing MediaPlayer
on it to have video working when coming back from the background.
Sample demonstrating this is available https://code.videolan.org/mfkl/libvlcsharp-samples/-/tree/master/ForegroundBackground
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
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libvlc
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