• Stars
    star
    114
  • Rank 301,863 (Top 7 %)
  • Language
    Kotlin
  • License
    GNU Lesser Genera...
  • Created about 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Android media player library powered by libVLC and Open Subtitles.

Release

[deprecated] simple-vlc-player

I'm no longer maintaining this project due to time constraints.

An Android media player library powered by LibVLC and Open Subtitles.

Notice

I'm currently unable to maintain this project. There are a few open issues that need to be resolved. Pull requests are welcome.

Usage

Options can be provided for the initialization of LibVLC by using the VlcOptionsProvider singleton. This optional configuration should only be provided once during app initialization, or at some point before starting the MediaPlayerActivity. If no options are provided, then a default configuration is provided when initializing LibVLC. To make life easier, the VlcOptionsProvider.Builder class is available to help build a list of common options. If an option is not provided to the builder, then the default value for that option is used. For example, the following enables LibVLC verbose logging, sets the subtitle background opactiy, and sets the subtitle encoding:

VlcOptionsProvider
        .getInstance()
        .setOptions(
                new VlcOptionsProvider.Builder(this)
                        .withSubtitleBackgroundOpacity(255)
                        // See R.array.subtitles_encoding_values
                        .withSubtitleEncoding("KOI8-R")
                        .setVerbose(true)
                        .build()
        );

The MediaPlayerActivity can be started by providing a required media Uri and an optional subtitle Uri. The subtitle Uri must be a local file. Consumers of this library should also supply an opensubtitles.org User-Agent and preferred subtitle language via the intent. As stated in the Open Subtitles documentation, the temporary User-Agent should only be used during development and testing as it periodically changes.

Intent intent = new Intent(this, MediaPlayerActivity.class);

intent.putExtra(MediaPlayerActivity.MediaUri, videoUri);
intent.putExtra(MediaPlayerActivity.SubtitleUri, subtitleUri);
intent.putExtra(MediaPlayerActivity.OpenSubtitlesUserAgent, "TemporaryUserAgent")
// See R.array.language_values
intent.putExtra(MediaPlayerActivity.SubtitleLanguageCode, "rus")

startActivity(intent);

Configuration

Add this in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

and add the following in the dependent module:

dependencies {
    implementation 'com.github.masterwok:simple-vlc-player:1.1.16'
}

Projects using simple-vlc-player

Licensing

Please refer to the VLC FAQ.

Screenshots

Local Playback Renderer Item Selection Casting Subtitles

More Repositories

1

simple-torrent-android

A torrent client library for Android that utilizes frostwire-jlibtorrent. It supports sequential and simultaneous downloads.
Kotlin
94
star
2

libvlc-android-sdk

An unofficial library of LibVLC for Android. The goal of this project is to be able to use LibVLC as an Android dependency.
Java
38
star
3

maneki

An open-source torrent search engine that harnesses the power of Jackett.
Kotlin
31
star
4

ffmpeg-glide-video-decoder

A Glide resource decoder powered by FFmpegMediaMetadataRetriever.
Kotlin
28
star
5

open-subtitles-android

An Android library for querying and downloading subtitles from Open Subtitles.
Kotlin
27
star
6

tpb-search-android

An Android library for querying thepiratebay.org and its various proxies.
Kotlin
12
star
7

subverter

A simple Java library for converting subtitle files.
Java
3
star
8

poc-cached-paging-3

Proof of concept for Paging 3 in-memory cache mediator and paging source.
Kotlin
2
star
9

jackett-harness

A harness for Jackett. Includes Xamarin Andorid bindings.
C#
2
star
10

stanford-ios-course

Repository containing personal notes and implementations of sample projects from the iOS Stanford lectures.
Swift
2
star
11

sample-fragment-communication

Sample project demonstrating very basic communication between from fragment to activity and vice-versa.
Java
1
star
12

game-of-life-js

Optimized game of life algorithm discussed in Michael Abrash's Graphics Programming Black Book implemented in vanilla javascript.
JavaScript
1
star
13

sweater

[WIP] A proxy to torrent indexers exposed through a RESTful API.
C#
1
star
14

reverse-proxy-poc

(WIP) A reverse API proxy PoC in .NET Core
C#
1
star
15

QuadTree

QuadTree implementation in Java (Jogl)
Java
1
star
16

Game-of-Life-Screensaver

Conways game of life screensaver.
C#
1
star
17

stream-video-android

An attempt to pipe torrent input stream to websocket. (Dev sandbox/sloppy code)
Java
1
star