I am pleased to publish a B4J-wrapper/library of Vlcj (version 3.10.1) which in turn is a Java-wrapper of VLC (VideoLAN). With this wrapper, we can use VLC as a MediaPlayer in B4J.
I guess most of you are already familiar with VLC. Its strength is that it plays (local and in streaming) nearly all available formats/codecs. You might be less familiar with Vlcj - if so, you can find more information about Vlcj here.
In this library, I have wrapped the most important methods, properties and events which are required to create a functional MediaPlayer in B4J. I have tested it on Windows 10 and on my MAC and it works fine on both.
I am attaching the MediaPlayer as a demo-project. I also attach the required B4J-libraries. You also need to install some extra Jars that are necessary to make this work. I also attach the Java-code of the B4J-wrapper.
Vlcj (and VLC) is huge and therefore I have left out some functionality such as subtitles, audio-tracks, embedding logos, video-adjustments etc. You can add missing functionality by using JavaObject (see the GetFps-method in the demo-project), InLineJava or by modifying the attached Java-sources. Please refer to the API JavaDocs. Should you prefer me to do it for you, please then contact me in PM here in the forum and we can discuss it.
Requirements:
-VLC (VideoLAN) must be installed on the computer.
-You must match the CPU architecture of the Java Virtual Machine and the native LibVLC libraries. If you use a 32-bit JVM you must use a 32-bit release of VLC; if you use a 64-bit JVM you must use a 64-bit release of VLC. You can not mix CPU architectures, it will not work.
-Add the extra jars in your B4J Extra/Additional Library folder. They can be downloaded from here.
How to run the demo-project:
-Add the extra jars (jna-4.1.0, jna-platform-4.1.0, slf4j-api-1.7.10,vlcj-3.10.1) in your B4J Extra/Additional Library folder.
-Add the B4JVlcj and B4JDragToMe libraries in your B4J Extra/Additional Library folder.
-Make sure to refresh the Library-pane in the B4J-IDE and tick the libraries.
-Open the demo-project in B4J and read the code-notes.
-Methods and Properties are explained in the IDE-help (see also next post).
License:
-My B4J-wrapper is free to use and Java source code is attached. I am only enabling users to use Vlcj with my B4J-wrapper (B4JVlcj).
-Vlcj is provided under the terms of the gpl3 license. Check their web-site for further information.
Please remember that creating libraries and maintaining them takes time and so does supporting them. Please consider a donation if you use my free libraries as this will surely help keeping me motivated. Thank you!
A compiled jar of the demo-project can be downloaded from this thread.
Here is video of the demo-app in execution:
Enjoy!
I guess most of you are already familiar with VLC. Its strength is that it plays (local and in streaming) nearly all available formats/codecs. You might be less familiar with Vlcj - if so, you can find more information about Vlcj here.
In this library, I have wrapped the most important methods, properties and events which are required to create a functional MediaPlayer in B4J. I have tested it on Windows 10 and on my MAC and it works fine on both.
I am attaching the MediaPlayer as a demo-project. I also attach the required B4J-libraries. You also need to install some extra Jars that are necessary to make this work. I also attach the Java-code of the B4J-wrapper.
Vlcj (and VLC) is huge and therefore I have left out some functionality such as subtitles, audio-tracks, embedding logos, video-adjustments etc. You can add missing functionality by using JavaObject (see the GetFps-method in the demo-project), InLineJava or by modifying the attached Java-sources. Please refer to the API JavaDocs. Should you prefer me to do it for you, please then contact me in PM here in the forum and we can discuss it.
Requirements:
-VLC (VideoLAN) must be installed on the computer.
-You must match the CPU architecture of the Java Virtual Machine and the native LibVLC libraries. If you use a 32-bit JVM you must use a 32-bit release of VLC; if you use a 64-bit JVM you must use a 64-bit release of VLC. You can not mix CPU architectures, it will not work.
-Add the extra jars in your B4J Extra/Additional Library folder. They can be downloaded from here.
How to run the demo-project:
-Add the extra jars (jna-4.1.0, jna-platform-4.1.0, slf4j-api-1.7.10,vlcj-3.10.1) in your B4J Extra/Additional Library folder.
-Add the B4JVlcj and B4JDragToMe libraries in your B4J Extra/Additional Library folder.
-Make sure to refresh the Library-pane in the B4J-IDE and tick the libraries.
-Open the demo-project in B4J and read the code-notes.
-Methods and Properties are explained in the IDE-help (see also next post).
License:
-My B4J-wrapper is free to use and Java source code is attached. I am only enabling users to use Vlcj with my B4J-wrapper (B4JVlcj).
-Vlcj is provided under the terms of the gpl3 license. Check their web-site for further information.
Please remember that creating libraries and maintaining them takes time and so does supporting them. Please consider a donation if you use my free libraries as this will surely help keeping me motivated. Thank you!
A compiled jar of the demo-project can be downloaded from this thread.
Here is video of the demo-app in execution:
Enjoy!
Attachments
Last edited: