Git Product home page Git Product logo

linecode / ffmpeg-android-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fscz/ffmpeg-android

0.0 2.0 0.0 105.79 MB

A videoplayer and streaming audio decoder that outputs pcm or directly writes to Android/AudioTrack (based on https://github.com/appunite/AndroidFFmpeg)

Makefile 5.01% C 63.15% Shell 7.36% C++ 4.09% Objective-C 5.99% CSS 0.02% Perl 0.11% Assembly 4.52% Verilog 0.01% Roff 5.46% HTML 3.45% Python 0.37% CMake 0.01% Awk 0.01% M4 0.11% sed 0.01% DIGITAL Command Language 0.05% Batchfile 0.01% TeX 0.21% Java 0.07%

ffmpeg-android-1's Introduction

FFmpeg-Android

A videoplayer, streaming audioplayer and streaming audio decoder that outputs pcm or directly writes to Android/AudioTrack (based on https://github.com/appunite/AndroidFFmpeg)

Used Sources

Building

  1. checkout the project
  2. cd /jni
  3. export NDK=/path/to/android-ndk-version8 (If you want to compile with another NDK you are on your own)
  4. ./build_android
  5. ndk-build

Repeat steps 4 and 5 after making changes to the source

Usage

  • It is an Android Library Project so you can import it into ADT and reference it from other projects
  • Check classes in com.appunite.ffmpeg.audio
  • TrackDecoder accepts an InputStream (some audio format) and an Android AudioTrack and will write pcm data directly to the AudioTrack
  • StreamDecoder is a convenience class and accepts an InputStream and return an InputStream of PCM data. This is achieved by using the com.appunite.ffmpeg.audio.Buffer class (see there for details). Using this class should be sufficient (performance-wise) for tasks like writing pcm data to a file or some simple audio processing. If you want to add more heavy lifting to the audio processing pipeline, you should subclass com.appunite.ffmpeg.audio.Decoder and thus avoid some of the copying and shifting that Buffer has to do. Check StreamDecoder/TrackDecoder to see, how you can do that.

Examples

  • AudioPlayer audioPlayer = new AudioPlayer(new FileInputStream("/path/to/your/mp3file"));
  • audioPlayer.play();
  • audioPlayer.stop();
  • for more fine grained control of audio decoding, check the classes in com.appunite.ffmpeg.audio
  • see an example for using FFmpegPlayer at https://github.com/appunite/AndroidFFmpeg

ffmpeg-android-1's People

Watchers

 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.