vlcj | Java framework for the vlc media player | Video Utils library
kandi X-RAY | vlcj Summary
kandi X-RAY | vlcj Summary
The vlcj project provides a Java framework to allow an instance of a native [VLC] "VLC") media player to be embedded in a Java application. You get more than just simple bindings, you also get a higher level framework that hides a lot of the complexities of working with LibVLC. vlcj is primarily developed and therefore extensively tested on Linux - it does also work just fine on Windows and OSX, although there may be some limitations on OSX. Additionally, whilst not supported as one of the main platforms, this version of vlcj has been tested and shown to be working on contemporary Raspberry Pi builds. At least JDK 8 is required. vlcj-4.7.x, which is still current, is the last version of vlcj that was built against JDK 1.6. This is the open source vlcj project page, see also the 'official' [home page] "Official vlcj home page at Caprica Software") where you can find more information as well as some new simple tutorials.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates new media player event .
- Attempt to discover the native library .
- Apply logo information to a media player .
- Send client - message .
- Validates the parameters .
- Determines if the specified directory exists .
- Create a new Equalizer based on a preset name .
- Initialize input events .
- Set renderer item .
- Returns a list of descriptions of a given media category .
vlcj Key Features
vlcj Examples and Code Snippets
Community Discussions
Trending Discussions on vlcj
QUESTION
I try to use vlcj-javafx-demo to develop a video player, and I put the progress bar(Slider) on the StackPane over the video layer. In the beginning, it looks work well, but when I set maximum or full screen the app, it looks some components UI did not update correctly. How can I correct it?
Thanks a lot!
normally: [1]: https://i.stack.imgur.com/bbE51.png
normally: [2]: https://i.stack.imgur.com/Plsb1.png the red color is the sence background color.
the code :
...ANSWER
Answered 2022-Feb-17 at 06:18You appear to be using a Linux OS, try passing one or more of these system properties when you start your JVM:
QUESTION
I am trying to transcode a RTSP stream into an mpeg4 stream over http for use on a webpage in a video tag. I am using vlcj and a 32-bit version of VLC installed locally. I thought I had the right sout settings, but I am getting the following error when finished.
...ANSWER
Answered 2021-Dec-29 at 17:50The streaming options need to be passed in an array, not a single string with the separator as you have used.
This is a fragment of what you have:
QUESTION
I use embeddedMediaPlayer.media().play(path);
which loads the video and plays it at the same time no problems, but I'd rather it opened and didn't auto play the video. If I use embeddedMediaPlayer.media().prepare(path);
it doesn't really seem to do anything since if I then use embeddedMediaPlayer.controls().play();
to play the video it doesn't start the video..
Is there something else I need to do to load the video properly? With embeddedMediaPlayer.media().play(path);
I get this in the terminal showing that the video is fully loaded:
ANSWER
Answered 2021-Nov-26 at 08:00It seems it's an actual issue or the prepare
method is not supposed to work like this. Leastways I posted the issue on the developed github page and it's been open several days with no response from anyone.
https://github.com/caprica/vlcj/issues/1094
The vlcj demo project is set up to play a video automatically and I guess it is that way because that's the only way. The prepare
method seems to prepare a video but you have to either wait...or press play once for it load and then again to play it. I guess it's kind of 'half prepared'.
EDIT: Issue deleted directly from github by author without solution. Very odd. The author didn't seem to understand that the problem was a delay in playback, and not a failure to play back. Before the issue's deletion, there was this statement from the author which seems to explain the delay:
"In theory, you're supposed to wait for the mediaChanged event after prepare and before calling play, because LibVLC at some point reasonably recently made setting media asynchronous."
There's a workaround for instant playback which is to use the start
method and have it pause on first opening or on media change. That way a video will be ready for playback straight away.
QUESTION
I tried this code to display a video on simple jframe:
...ANSWER
Answered 2021-Jul-08 at 15:44You must make your frame visible before you play your media.
QUESTION
I have a custom Java NIO FileSystem. I have to validate it's usability for video playing, seeking, etc. in a demo.
My problem is that I cannot find any library which allows me to play a video from anything other than a regular File or URL. I tried with vlcj, javafx with no luck.
My question is what library should I use for starting a video from a custom FileSystem abstraction?
...ANSWER
Answered 2021-May-13 at 02:32LibVLC has support for in-memory stream playback.
This should get you started for Java (credit to caprica)
https://gist.github.com/caprica/52b1793500626cdc88d756175cf9aa4c
QUESTION
Eclipse 2021-03 (4.19.0) on Windows 10 Pro (20H2) Raspberry Pi 4 running Raspbian 10 Java 11 (since it is the latest I've seen on the Raspberry Pi.
I've recently encountered a problem while exporting runnable jar files. On new and older programs in the workspace, when they are exported as runnable jar files on the Windows 10 Pro and moved to the Raspberry Pi, I get the message "Error: An unexpected error occurred while trying to open file test.jar"
Having written a "Hello World" program and exported it, it ran just fine. This leads me to believe it is something with the project name, the Maven repositories, some quirk on the Raspberry Pi, or some other unknown.
The project names are now "ButtonMediaPlayerV24" where 24 indicates 2.4 (to keep previous versions, the period was removed in hopes it would fix the issue)
The Maven Repositories are VLCj and pi4j.
Have anything I should check or try?
Tried: creating a new project, with the name "ButtonMediaPlayer" with the same result.
UPDATE 1: After gutting the program and putting it into the test project, I found GPIO 30 and 31 had "PinPullResistance.PULL_DOWN" in the initiation, which was given as an error message after getting rid of the additional classes.
UPDATE 2: The Maven repositories are not the problem, and the project name isn't an issue.
Further updates if I find more.
...ANSWER
Answered 2021-Mar-25 at 18:31The error appears to be the way I was trying to create local version control, which involved using Windows Explorer to create a new copy, and rename it. It seems to be possible to do this, but Eclipse must rename the file to update not obvious locations where the file name is. Without that, it seems to break every time.
QUESTION
I want to play multiple audio files from a single java process via vlcj (old version 3.10.1). Below is the snippet of java code that I wrote to play audio from two files:-
...ANSWER
Answered 2021-Mar-20 at 08:33This can not be done with the version of VLC/LibVLC that you are using (3.x).
All native media player instances in the same process share the same audio controls.
I have however heard that this may be dependent on the audio output plugin that is being used, but on Linux I have never personally seen this work.
Early testing of the upcoming VLC/LibVLC 4.x offers some hope that in the future you do in fact get separate audio controls, but at time of writing this answer that version of VLC may still be some way off.
In short, there's nothing you can "fix" here.
You could run multiple media players in separate processes and somehow control them, but that is not trivial.
QUESTION
I want to add external libraries needed by my project to the custom runtime image.
I use the following external libraries in my project: vlcj.jar, vlcj-javafx.jar
For vlcj.jar to work I also need to add external libraries: jna.jar, jna-platform.jar, vlcj-natives.jar
If I rewrite my application so that I don't need to use vlcj.jar and vlcj-javafx.jar, then the custom runtime image creation line looks like this:
...ANSWER
Answered 2021-Mar-08 at 09:53The custom runtime image does not support automatic modules (non-module jars) so you don't have any dependent jars in the jlink
image which defines classpath for running with the vlc.
You can edit the META-INF\MANIFEST.MF
in your own jar to specify a classpath so the extra jars could be read from the same directory you run java -jar
:
QUESTION
Upcalls from JavaScript to JavaFX works fine. But if I add a variable containing the VLCJ player implementation then everything stops working.
Main.java:
...ANSWER
Answered 2021-Mar-02 at 14:07Solved the problem thanks to this answer: https://stackoverflow.com/a/53618875/10946427
It turns out my JSBridge was being destroyed by the garbage collector and because of VLCJ it was faster.
If you create a JSBridge variable inside the class, then the garbage collector will not destroy it and everything will work.
QUESTION
I have a Maven project in IntelliJ IDEA, using JDK 15 and JavaFX 15.
I tried:
- Set style for WebEngine
- Set blend mode for WebView
- Tried WebPage
Nothing succeeded. How do I make the background of the WebView transparent?
My module-info.java:
...ANSWER
Answered 2021-Feb-23 at 14:33The WebView renders the DOM CSS in the web page. If you want a transparent background, you'll have to modify the CSS there as well.
EDIT ... the following works, but opens up a can of worms.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vlcj
You can use vlcj like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the vlcj component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
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