Git Product home page Git Product logo

vlc-sdk-lib's Introduction

Vlc-sdk-lib

构建切换大小屏播放器 参考

转码视频的命令行工具 参考

在RecyclerView中播放器的实现 参考


实现的功能

能支持大部分主流格式
软硬解切换.支持vlc指令  < transform:rotation=90>
当前缓冲百分比 
视频(音频)播放速度可调,任意速度可调. (0.25-4)   < player.setRate(float rate); >
加载字幕,设置镜面等

使用方法

<xml>
//高度需要自已设置调整
 <org.videolan.vlc.VlcVideoView
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
        
<java>
VlcVideoPlayer   player = new VlcVideoPlayer(context);
                 player.setMediaListenerEvent(new MediaListenerEvent());
                 player.startPlay(path);

<其它>
 thumbnail 
 如果你有截图需求最好用我写的ffmpeg截图       
 截图方法   byte[] b = VLCUtil.getThumbnail(media, width, height);
           if (b != null) {
                 Bitmap thumbnail = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
                 thumbnail.copyPixelsFromBuffer(ByteBuffer.wrap(b));
           }

#引用库文件

   dependencies {
   compile 'com.yyl.vlc:vlc-android-sdk:2.5.17'
   
   }
    ndk {
        //支持的abi    可选 精简的库
        abiFilters 'armeabi-v7a'//,'x86_64','arm64-v8a','x86'
    }
         
  目前支持的库 : x86_64     x86    armeabi-v7a    arm64-v8a   

Donate

Alipay:

谢谢支持我会和官方同步更新

官方网站

编译方法

vlc-android的代码在  linux  ubuntu64  16.4  中搭建编绎环境
android-sdk 版本 api25
ndk版本 r13b
java 版本 8
vlc-android 版本 3.0.0-v2.1.0版本

1.在win10中安装的 VMware Workstation Pro 安装ubuntu 64 16 的最新版

2.安装 linux 版的 jdk sdk 最新版

安装包管理工具和开源库等
参考:https://wiki.videolan.org/AndroidCompile/

## sudo apt-get install automake ant autopoint cmake build-essential libtool \
     patch pkg-config protobuf-compiler ragel subversion unzip git
  1. ubuntu 64 vlc-android环境设置
sudo gedit /etc/profile
$source /etc/profile

export NDK=/opt/sdk/android-sdk-linux/ndk-bundle
export ANDROID_NDK=/opt/sdk/android-sdk-linux/ndk-bundle
export PATH=${ANDROID_NDK}:$PATH
export ANDROID_SDK=/opt/sdk/android-sdk-linux
export PATH=$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$PATH

export JAVA_HOME=/opt/sdk/jdk1.8.0_101
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:${JAVA_HOME}/lib/tools.jar
export PATH=${JAVA_HOME}/bin:$PATH

export ANDROID_ABI=armeabi-v7a   //对应的cpu平台 .so包
#export ANDROID_ABI=x86   //编译对应的平台

DEMO效果预览

image

vlc-sdk-lib's People

Contributors

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