Convert Figma logo to code with AI

videolan logovlc-android

VLC for Android, Android TV and ChromeOS

2,684
618
2,684
5

Top Related Projects

31,338

A libre lightweight streaming front-end for Android.

21,714

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media

Android Client for Jellyfin

#mpv-android @ libera.chat

1,688

▶ Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer

Quick Overview

VLC for Android is an open-source media player application that brings the power and versatility of the popular VLC media player to Android devices. It supports a wide range of audio and video formats, network streams, and offers advanced playback features.

Pros

  • Supports a vast array of audio and video formats
  • Offers network streaming capabilities (including local network, FTP, and cloud services)
  • Provides advanced playback features like subtitles, audio/video filters, and gesture controls
  • Free and open-source, with regular updates and community support

Cons

  • User interface can be complex for casual users
  • Some users report occasional stability issues on certain devices
  • Requires additional permissions for full functionality, which may concern privacy-conscious users
  • Limited integration with Android's native media controls on some devices

Getting Started

To build and run VLC for Android:

  1. Clone the repository:

    git clone https://code.videolan.org/videolan/vlc-android.git
    
  2. Install the required dependencies:

    • Android Studio
    • Android SDK
    • NDK
  3. Open the project in Android Studio and sync Gradle files.

  4. Build the project using the following command:

    ./compile.sh -a <architecture>
    

    Replace <architecture> with your target architecture (e.g., arm, x86).

  5. Install the generated APK on your Android device or emulator.

For more detailed instructions, refer to the HACKING file in the repository.

Competitor Comparisons

31,338

A libre lightweight streaming front-end for Android.

Pros of NewPipe

  • Ad-free and open-source YouTube client with additional features like background playback and downloads
  • Lightweight and doesn't require Google Services Framework
  • Supports multiple streaming services beyond YouTube (e.g., SoundCloud, PeerTube)

Cons of NewPipe

  • Limited to streaming services; doesn't support local media playback
  • May experience occasional issues with YouTube API changes
  • Lacks Chromecast support and some advanced playback features

Code Comparison

NewPipe (Java):

@Override
protected void onLoadFinished() {
    if (currentInfo == null) {
        return;
    }
    super.onLoadFinished();
    // ...
}

VLC-Android (Kotlin):

override fun onLoadFinished() {
    super.onLoadFinished()
    if (currentMedia == null) return
    // ...
}

Both projects use similar event-driven architectures, but NewPipe focuses on streaming services while VLC-Android is a more comprehensive media player. NewPipe's codebase is primarily in Java, while VLC-Android uses a mix of Kotlin and C++. VLC-Android offers broader codec support and local media playback, making it more versatile for general media consumption. However, NewPipe excels in providing a YouTube-like experience without ads or tracking, appealing to privacy-conscious users.

21,714

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media

Pros of ExoPlayer

  • More lightweight and focused on Android-specific media playback
  • Easier integration with other Google services and APIs
  • More frequent updates and active development

Cons of ExoPlayer

  • Limited codec support compared to VLC's extensive library
  • Less cross-platform compatibility
  • Steeper learning curve for developers new to Android media frameworks

Code Comparison

ExoPlayer

SimpleExoPlayer player = new SimpleExoPlayer.Builder(context).build();
MediaItem mediaItem = MediaItem.fromUri(videoUri);
player.setMediaItem(mediaItem);
player.prepare();
player.play();

VLC-Android

LibVLC libVLC = new LibVLC(context);
MediaPlayer mediaPlayer = new MediaPlayer(libVLC);
IVLCVout vout = mediaPlayer.getVLCVout();
vout.setVideoView(videoView);
mediaPlayer.setMedia(new Media(libVLC, videoUri));
mediaPlayer.play();

Both examples demonstrate basic video playback setup. ExoPlayer's API is more streamlined, while VLC-Android offers more granular control over playback components.

ExoPlayer is better suited for projects focused solely on Android, especially those integrating with other Google services. VLC-Android, on the other hand, provides broader codec support and cross-platform compatibility, making it ideal for projects requiring extensive media format support or multi-platform development.

Android Client for Jellyfin

Pros of Jellyfin Android

  • Open-source media streaming client with a focus on personal media libraries
  • Supports a wide range of media formats and codecs
  • Integrates with Jellyfin server for a seamless media streaming experience

Cons of Jellyfin Android

  • More limited in terms of local playback options compared to VLC
  • Requires a Jellyfin server setup for full functionality
  • Less mature project with potentially fewer contributors

Code Comparison

VLC Android:

public class VLCApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        MediaParsingService.Companion.getMediaLibrary().init(this);
    }
}

Jellyfin Android:

class JellyfinApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        AppPreferences.init(this)
        initializeWebView()
    }
}

Both applications extend the Android Application class and initialize their respective media libraries or preferences in the onCreate method. VLC Android uses Java, while Jellyfin Android is written in Kotlin, reflecting more modern Android development practices.

#mpv-android @ libera.chat

Pros of mpv-android

  • Lightweight and minimalistic interface
  • Better support for advanced video playback features
  • More customizable through Lua scripting

Cons of mpv-android

  • Smaller user base and community support
  • Less comprehensive media library management features
  • Fewer built-in codecs and formats supported out-of-the-box

Code Comparison

mpv-android:

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    MPVLib.create(this)
    setContentView(R.layout.player)
    // ... more initialization code
}

vlc-android:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.player);
    mService = VLCInstance.getService();
    // ... more initialization code
}

Both projects use similar initialization patterns, but mpv-android uses Kotlin while vlc-android uses Java. The mpv-android codebase tends to be more concise due to Kotlin's features, while vlc-android has a more extensive codebase with additional features and compatibility layers.

mpv-android focuses on a streamlined video playback experience, making it ideal for users who prioritize performance and customization. vlc-android offers a more comprehensive media player solution with broader format support and media library management, catering to a wider range of use cases.

1,688

▶ Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer

Pros of Player

  • Lightweight and minimalist design, focusing on core video playback features
  • Faster startup time and lower resource usage
  • More frequent updates and active development

Cons of Player

  • Limited codec support compared to VLC's extensive library
  • Fewer advanced features and customization options
  • Smaller community and less documentation

Code Comparison

Player (Kotlin):

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
    binding = FragmentPlayerBinding.inflate(inflater, container, false)
    return binding.root
}

VLC-Android (Java):

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.player, container, false);
    mSurfaceView = v.findViewById(R.id.player_surface);
    mSurfaceFrame = v.findViewById(R.id.player_surface_frame);
    return v;
}

Player uses Kotlin and view binding, resulting in more concise code. VLC-Android uses Java and traditional findViewById, which is more verbose but potentially more familiar to some developers.

Both projects follow similar architectural patterns for their player implementations, but Player's codebase is generally more modern and streamlined due to its focus on simplicity and use of Kotlin.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

VLC for Android

This is the official Android port of VLC.

VLC on Android plays all the same files as the classical version of VLC, and features a media database for Audio and Video files and stream.

Project Structure

Here are the current folders of vlc-android project:

  • extension-api : Application extensions SDK (not released yet)
  • application : Android application source code, organized by modules.
  • buildsystem : Build scripts, CI and maven publication configuration
  • libvlc : LibVLC gradle module, VLC source code will be cloned in vlc/ at root level.
  • medialibrary : Medialibrary gradle module

LibVLC

LibVLC is the Android library embedding VLC engine, which provides a lot of multimedia features, like:

  • Play every media file formats, every codec and every streaming protocols
  • Hardware and efficient decoding on every platform, up to 8K
  • Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...) and servers (UPnP, DLNA)
  • Playback of Audio CD, DVD and Bluray with menu navigation
  • Support for HDR, including tonemapping for SDR streams
  • Audio passthrough with SPDIF and HDMI, including for Audio HD codecs, like DD+, TrueHD or DTS-HD
  • Support for video and audio filters
  • Support for 360 video and 3D audio playback, including Ambisonics
  • Ability to cast and stream to distant renderers, like Chromecast and UPnP renderers.

And more.

LibVLC stack

You can use our LibVLC module to power your own Android media player. Download the .aar directly from Maven or build from source.

Have a look at our sample codes.

License

VLC for Android is licensed under GPLv2 (or later). Android libraries make this, de facto, a GPLv3 application.

VLC engine (LibVLC) for Android is licensed under LGPLv2.

Build

Native libraries are published on bintray. So you can:

  • Build the application and get libraries via gradle dependencies (JVM build only)
  • Build the whole app (LibVLC + Medialibrary + Application)
  • Build LibVLC only, and get an .aar package

Build Application

VLC-Android build relies on gradle build modes :

  • Release & Debug will get LibVLC and Medialibrary from Bintray, and build application source code only.
  • SignedRelease also, but it will allow you to sign application apk with a local keystore.
  • Dev will build build LibVLC, Medialibrary, and then build the application with these binaries. (via build scripts only)

Build LibVLC

You will need a recent Linux distribution to build VLC. It should work with Windows 10, and macOS, but there is no official support for this.

Setup

Check our AndroidCompile wiki page, especially for build dependencies.

Here are the essential points:

On Debian/Ubuntu, install the required dependencies:

sudo apt install automake ant autopoint cmake build-essential libtool-bin \
    patch pkg-config protobuf-compiler ragel subversion unzip git \
    openjdk-8-jre openjdk-8-jdk flex python wget

Setup the build environment: Set $ANDROID_SDK to point to your Android SDK directory export ANDROID_SDK=/path/to/android-sdk

Set $ANDROID_NDK to point to your Android NDK directory export ANDROID_NDK=/path/to/android-ndk

Then, you are ready to build!

Build

buildsystem/compile.sh -l -a <ABI>

ABI can be arm, arm64, x86, x86_64 or all for a multi-abis build

You can do a library release build with -r argument

Medialibrary

Build Medialibrary with -ml instead of -l

Contribute

VLC is a libre and open source project, we welcome all contributions.

Just respect our Code of Conduct, and if you want do contribute to the UI or add a new feature, please open an issue first so there can be a discussion about it.

Pull requests

Pull requests must be proposed on our gitlab server.

So you must create an account, fork vlc-android project, and propose your merge requests from it.

Except for translations, see the section below.

Translations

You can help improving translations too by joining the transifex vlc project

Translations merge requests are then generated from transifex work.

Issues and feature requests

VLC for Android bugtracker is hosted on VideoLAN gitlab
Please look for existing issues and provide as much useful details as you can (e.g. vlc app version, device and Android version).

A template is provided, please use it!

Issues without relevant information will be ignored, we cannot help in this case.

Support