Giter VIP home page Giter VIP logo

vlcj's Introduction

vlcj

You are currently looking at the development branch for vlcj-4.0.0, if you want a stable version of vlcj you should switch to the vlcj-3.x branch.

vlcj

The vlcj project provides a Java framework to allow an instance of a native 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 1.6 is required.

This version of vlcj requires VLC 3.0.0 as a minimum, no earlier version is supported.

This is the open source vlcj project page, see also the 'official' home page where you can find more information as well as some new simple tutorials.

vlcj-4

This is the new development branch for the next major release of vlcj. Most things will stay the same but vlcj is undergoing a significant refactoring exercise for the long-term health of the project and ease of further development.

As such, at the present time the API is fluid and completely subject to change. If you are migraging from vlcj-3 then you will have to make changes to your own code. The implementation behind the API is pretty much the same as it ever was, although there have been and will continue to be significant improvements in some areas, nevertheless if you are using this branch you do so at your own risk.

Any issues raised pertaining to these API changes will be summarily deleted, perhaps with a snarky comment, although sensible suggestions for improvements and genuine problems (i.e. problems other than "why did this change?" and "my code doesn't compile any more") are still welcome.

At the present time there is no cut-off for API changes or in fact any other breaking changes, so use this branch at your own risk!

This branch will also introduce significant new features with new API, some headline new features are:

  • 360 degree video, changing pitch, yaw, roll etc
  • new API for alternate renderers (e.g. you can now send your media to Chromecast)
  • integrated native dialog callbacks (e.g. you can now be prompted for credentials when accessing a protected stream)
  • use any AWT Component as a video surface, not just a Canvas (Window should work on OSX)

For a full list of changes in this release, check the release milestone.

Building vlcj - sun.misc.Unsafe

Currently the target supported JDK is still 1.6, since there are no new language or platform features used in vlcj that need anything past 1.6. There is no particularly strong reason to keep supporting 1.6, but there is no particular reason to abandon it either.

On the other hand, the project is at the moment built with OpenJDK 11 on Linux and cross-compiled to 1.6. This will work just fine when using Maven to build the project from the command-line, or when working with Eclipse.

However, if you use IntelliJ IDEA you may encounter some compilation problems...

When compiling, IDEA will complain that package sun.misc does not exist - the Unsafe class from this package is required for the "direct" media players.

This can be worked around in a number of ways:

  • use source and target JDK 1.10 in the pom.xml, which IDEA will then incorporate into the project
  • use JDK 1.9 and convert the project to use the Java Module System and add jdk.unsupported as a required module
  • change the IDEA compiler settings to uncheck the "Use '--release' option for cross-compilation (Java 9 and later)"

The latter option is probably the simplest to deal with.

When compiling with Maven it is simply not possible to suppress the warnings about using sun.misc.Unsafe.

Maven Dependency

Add the following Maven dependency to your own project pom.xml:

<dependency>
    <groupId>uk.co.caprica</groupId>
    <artifactId>vlcj</artifactId>
    <version>4.0.0</version>
</dependency>

This artefact may not be available for quite some time, we do not push snapshot releases to Maven Central.

Privacy Considerations

When parsing media, depending on configuration, it may be possible that a remote network access is made for meta data and album/cover art. This may unintentionally expose sensitive data regarding the media being parsed.

To affirmatively prevent all network access for meta data, consider using the --no-metadata-network-access argument when creating a MediaPlayerFactory.

It should also be possible to prevent such network accesses by using appropriate ParseFlag values when requesting to parse media.

Even with network access disabled, some media covert art may still appear locally (e.g. ~/.cache/vlc) - this does not necessarily mean that a remote network request was made for the cover art, rather the art was embedded in the media file and extracted to this temporary cache directory.

In any case, you need to be aware of this issue and inform users of your application about it.

News

You can follow @capricasoftware on Twitter for more vlcj news.

Documentation

Some new tutorials are available at the official project page.

The vlcj project page is at github.

Online Javadoc is not yet available but will appear here in due course:

Examples

There are many examples in the vlcj test sources showing how to use vlcj.

For a more complete example of a feature-rich media player built with vlcj, see vlcj-player.

Related Projects

Support

Development of vlcj is carried out by Caprica Software.

Free support for Open Source and non-commercial projects is generally provided - you can use github issues for this purpose.

Support for commercial projects is provided exclusively on commercial terms - send an email to the following address for more information:

mark [dot] lee [at] capricasoftware [dot] co [dot] uk

License

The vlcj framework is provided under the GPL, version 3 or later.

If you want to consider a commercial license for vlcj that allows you to use and redistribute vlcj without complying with the GPL then send an email to the address below:

mark [dot] lee [at] capricasoftware [dot] co [dot] uk

vlcj's People

Contributors

caprica avatar

Watchers

James Cloos avatar 赖泳钦 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.