Coder Social home page Coder Social logo

anilbeesetti / nextlib Goto Github PK

View Code? Open in Web Editor NEW
56.0 4.0 16.0 295 KB

NextLib for Next Player

Home Page: https://github.com/anilbeesetti/nextplayer

License: GNU General Public License v3.0

Kotlin 13.82% CMake 2.26% C++ 45.28% C 3.13% Java 29.22% Shell 6.28%
exoplayer ffmpeg ffmpeg-android media3 video-decoder

nextlib's Introduction

NextLib

Build nextlib

NextLib is a library for adding ffmpeg codecs to Media3.

Currently supported decoders

  • Audio: Vorbis, Opus, Flac, Alac, pcm_mulaw, pcm_alaw, MP3, Amrnb, Amrwb, AAC, AC3, EAC3, dca, mlp, truehd
  • Video: H.264, HEVC, VP8, VP9

Setup

NextLib is available at JitPack's Maven repo.

First, you have to add the jitpack's maven repo to your build.gradle

Kotlin DSL:

repositories {
    maven { url = uri("https://jitpack.io") }
}

Groovy DSL:

repositories {
    maven { url 'https://jitpack.io' }
}

Now, you have to add the dependency to nextlib in your build.gradle

Kotlin DSL:

dependencies {
    implementation("com.github.anilbeesetti.nextlib:nextlib-media3ext:INSERT_VERSION_HERE") // To add media3 software decoders and extensions
    implementation("com.github.anilbeesetti.nextlib:nextlib-mediainfo:INSERT_VERSION_HERE") // To get media info through ffmpeg
}

Groovy DSL:

dependencies {
    implementation "com.github.anilbeesetti.nextlib:nextlib-media3ext:INSERT_VERSION_HERE" // To add media3 software decoders and extensions
    implementation "com.github.anilbeesetti.nextlib:nextlib-mediainfo:INSERT_VERSION_HERE" // To get media info through ffmpeg
}

Usage

To use Ffmpeg decoders in your app, Add NextRenderersFactory (is one to one compatible with DefaultRenderersFactory) to ExoPlayer

val renderersFactory = NextRenderersFactory(applicationContext) 

ExoPlayer.Builder(applicationContext)
    .setRenderersFactory(renderersFactory)
    .build()

nextlib's People

Contributors

anilbeesetti avatar renovate[bot] avatar thebeastlt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nextlib's Issues

I am sorry for creating a issue - this is to thankyou

Hi
I have successfully added your library. its working 200% fine to my app. i was afraid i wont able to play HEVC videos but with your library its working flawlessly. i was too tired of askign chatgpt for fixes later found your library a life saver.
i dont know how to thankyou. please accept my thanks.

I just forked ,did not change anything, github action build failed

~/work/nextlib/nextlib/ffmpeg
~/work/nextlib/nextlib/ffmpeg/sources/dav1d-1.4.1 ~/work/nextlib/nextlib/ffmpeg
~/work/nextlib/nextlib/ffmpeg
~/work/nextlib/nextlib/ffmpeg/sources/ffmpeg-6.0 ~/work/nextlib/nextlib/ffmpeg
ERROR: dav1d >= 0.5.0 not found using pkg-config
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/x86/lib/.so': No such file or directory
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/x86/include/
': No such file or directory

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Building FFmpeg for i686...
Makefile:184: /tests/Makefile: No such file or directory
ERROR: dav1d >= 0.5.0 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Building FFmpeg for x86_64...
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/x86_64/lib/.so': No such file or directory
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/x86_64/include/
': No such file or directory
ERROR: dav1d >= 0.5.0 not found using pkg-config

Makefile:184: /tests/Makefile: No such file or directory
If you think configure made a mistake, make sure you are using the latest
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/armeabi-v7a/lib/.so': No such file or directory
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/armeabi-v7a/include/
': No such file or directory
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Building FFmpeg for arm...
Makefile:184: /tests/Makefile: No such file or directory
ERROR: dav1d >= 0.5.0 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Building FFmpeg for aarch64...
~/work/nextlib/nextlib/ffmpeg

Task :media3ext:preBuild
Task :media3ext:preReleaseBuild
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
Makefile:184: /tests/Makefile: No such file or directory
make: *** No rule to make target '/tests/Makefile'. Stop.
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/arm64-v8a/lib/.so': No such file or directory
cp: cannot stat '/home/runner/work/nextlib/nextlib/ffmpeg/build/arm64-v8a/include/
': No such file or directory
Task :media3ext:configureCMakeRelWithDebInfo[arm64-v8a]

Task :media3ext:buildCMakeRelWithDebInfo[arm64-v8a] FAILED
C/C++: ninja: error: '/home/runner/work/nextlib/nextlib/ffmpeg/output/lib/arm64-v8a/libavutil.so', needed by '/home/runner/work/nextlib/nextlib/media3ext/build/intermediates/cxx/RelWithDebInfo/3n2y6vu5/obj/arm64-v8a/libmedia3ext.so', missing and no known rule to make it

FAILURE: Build failed with an exception.
3 actionable tasks: 3 executed

  • What went wrong:
    Execution failed for task ':media3ext:buildCMakeRelWithDebInfo[arm64-v8a]'.

com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/runner/work/nextlib/nextlib/media3ext/.cxx/RelWithDebInfo/3n2y6vu5/arm64-v8a'

C++ build system [build] failed while executing:
/usr/local/lib/android/sdk/cmake/3.22.1/bin/ninja
-C
/home/runner/work/nextlib/nextlib/media3ext/.cxx/RelWithDebInfo/3n2y6vu5/arm64-v8a
media3ext
from /home/runner/work/nextlib/nextlib/media3ext
ninja: error: '/home/runner/work/nextlib/nextlib/ffmpeg/output/lib/arm64-v8a/libavutil.so', needed by '/home/runner/work/nextlib/nextlib/media3ext/build/intermediates/cxx/RelWithDebInfo/3n2y6vu5/obj/arm64-v8a/libmedia3ext.so', missing and no known rule to make it

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org./

BUILD FAILED in 4m 48s
Error: Process completed with exit code 1.

Execution failed for task ':media3ext:buildCMakeDebug[arm64-v8a]'.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':media3ext:buildCMakeDebug[arm64-v8a]'.

com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/jitpack/build/media3ext/.cxx/Debug/6b1p4io1/arm64-v8a'

C++ build system [build] failed while executing:
/opt/android-sdk-linux/cmake/3.22.1/bin/ninja
-C
/home/jitpack/build/media3ext/.cxx/Debug/6b1p4io1/arm64-v8a
media3ext
from /home/jitpack/build/media3ext
ninja: error: '/home/jitpack/build/ffmpeg/output/lib/arm64-v8a/libavutil.so', needed by '/home/jitpack/build/media3ext/build/intermediates/cxx/Debug/6b1p4io1/obj/arm64-v8a/libmedia3ext.so', missing and no known rule to make it

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 2m 24s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Publication: io.github.anilbeesetti:nextlib-media3ext:1.0
Publication: io.github.anilbeesetti:nextlib-mediainfo:1.0
Build tool exit code: 0
Looking for artifacts...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Looking for pom.xml in build directory and ~/.m2
Found artifact: io.github.anilbeesetti:nextlib-mediainfo:1.0
Found artifact: io.github.anilbeesetti:nextlib-media3ext:1.0
2024-08-05T16:12:15.100922588Z
Exit code: 0

⚠️ ERROR: No build artifacts found
Expected artifacts in: $HOME/.m2/repository/io/github/anilbeesetti/nextlib-mediainfo/1.0

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/build.yaml
  • actions/checkout v4
  • gradle/wrapper-validation-action v3
  • actions/setup-java v4
  • gradle/gradle-build-action v3
  • actions/upload-artifact v4.3.6
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
gradle/libs.versions.toml
  • androidx.annotation:annotation 1.8.2
  • org.jetbrains.kotlin:kotlin-annotations-jvm 2.0.10
  • androidx.media3:media3-exoplayer 1.4.0
  • org.checkerframework:checker-qual 3.46.0
  • com.google.errorprone:error_prone_annotations 2.29.2
  • com.android.library 8.5.2
  • org.jetbrains.kotlin.android 2.0.10
media3ext/build.gradle.kts
mediainfo/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.9

  • Check this box to trigger a request for Renovate to run again on this repository

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.