Coder Social home page Coder Social logo

yxchaha / vplayer_lib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matthewn4444/vplayer_lib

0.0 1.0 0.0 1.37 MB

Simple FFmpeg library for android for multiple architectures

License: Apache License 2.0

Java 27.29% Makefile 3.10% C 57.18% C++ 2.98% Shell 9.45%

vplayer_lib's Introduction

VPlayer Library (0.3.2)

This project provides the easiest way to include FFmpeg into any Android project with almost no NDK building and tweaking. Of course if you want to customize FFmpeg, you will have to build the project from scratch.

Forked from appunite/AndroidFFmpeg, this project has a few enhancements to make it easier to develop and embed videos to your app. I have added some more functionality and a new simple project for developers to get started with. This project follows AndroidFFmpeg closely.

Read the wikis for this work. Even if you are a beginner to NDK, this project should be comprehensable enough to include VPlayer into your project. I provide prebuilt binaries for the project.

Changes/Fixes from AndroidFFmpeg

  • Able to compile with gcc 4.9+ toolchain and NDK r10e (32 or 64bit)
  • Updated with the newest versions of each library
  • Super easy way to compile FFmpeg from scratch without hassles
  • Fixes crashing issue when using the same video player for multiple videos (with or without subs)
  • Added a single build file to compile all dependencies without any need of commandline
  • Changed the Java library to easily integrate a video into a project
  • Added looping functionality

Sample integration

This is a very simple example that plays a video after starting the activity. You can view more integration tutorials here.

public class VideoActivity extends Activity {
    private VPlayerView mPlayerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Attach the player
        mPlayerView = new VPlayerView(this);
        setContentView(mPlayerView);

        // Set the content and play the video
        mPlayerView.setDataSource(path);
        mPlayerView.play();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mPlayerView.onPause();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mPlayerView.onResume();
    }

    @Override
    public void finish() {
        super.finish();
        mPlayerView.finish();
    }
}

Cloning and Building

You can clone the project here:

git clone https://github.com/matthewn4444/VPlayer_lib.git

For building the project, please refer here.

License

Copyright (C) 2015 Matthew Ng Licensed under the Apache License, Verision 2.0

AndroidFFmpeg, FFmpeg, libpng, fdk-aac, fribidi, libvo-aacenc, vo-amrwbenc, tropicssl, and libyuv are distributed on theirs own license.

Patent disclaimer

We do not grant of patent rights. Some codecs use patented techniques and before use those parts of library you have to buy thrid-party patents.

Credits

This library was modified by Matthew Ng from the original author Jacek Marchwicki from Appunite.com and other libraries he used. Also thanks to his issues page that fixed a bunch of issues.

vplayer_lib's People

Contributors

matthewn4444 avatar jacek-marchwicki avatar kwojtaszek avatar

Watchers

tricker 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.