Coder Social home page Coder Social logo

androidplayer's Introduction

Android AV Player using ffmpeg and SDL2

history: v2.6 --

  • ffmpeg and sdl2 : sync to newest source code.
  • History.java : add external editable source "/sdcard/ffplay/history.txt"
  • ffplay2.c : force set to screen size when video size too large (e.g. Cammera Photos).

depends

ffmpeg-2.5+, SDL2.0.3+, android 2.3.3+(sdk>=10).

download depends and expand to /mnt/OpenSource/

http://libsdl.org/release/SDL2-2.0.4.tar.gz --> SDL2-2.0.4 git clone https://git.ffmpeg.org/ffmpeg.git

patches

you need patch jni/*.patch. (not needed since this commit)

general instructions

for convience, put this line in your .bashrc: export PATH=$PATH:/mnt/android-ndk-r10d:/mnt/android-sdk-linux/tools:/mnt/android-sdk-linux/platform-tools

do symbol links at first time or configs are changed: ./bootstrap.sh /mnt/OpenSource/ffmpeg /mnt/OpenSource/SDL2-2.0.4 ndk-build clean rm -rf jni/ffmpeg/android ant clean

compile native code: ndk-build -j$(nproc) 2>&1 | tee build.log

compile java code(old way): prepare project at first time: android update project --path . --target android-21 generate apk: ant debug install to phone: ant debug install

compile java code(using Android Studio): open exist project. Build -> Build Apk adb install -r build/outputs/apk/AndroidPlayer-debug.apk

ndk debug

  • ndk-build NDK_DEBUG=1
  • ant debug install
  • (optional) adb push ./gdbserver
  • ndk-gdb --start
  • b SDL_main (choose yes on shared library)
  • continue (means run on arm)

debug gateway

adb logcat -s gw

jdk debug

Using jdb with adb (no ADT)

androidplayer's People

Contributors

deyangliu 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

Watchers

 avatar  avatar  avatar  avatar  avatar

androidplayer's Issues

今日头条互娱研发上海HR Sunny的问候

您好,我是今日头条互娱研发上海HR Sunny,有幸看到您的AndroidPlayer相关项目分享,希望有机会和您认识,不知道是否方便加个微信沟通,我的微信是fengzhigu-s,期待您的回复。

which version ffplay2.c refer to ?

Hi,
I am trying to port newest ffmpeg to android, and i want to know which ffmpeg version your ffplay2.c refer to. Thanks very much.

Best regards,

player cannot exit normally

Hi, I am recently developing upon this project. I found a bug. When I type in a URL and let the player play , it plays well. However, when I press back button and want to go back, the player process will restart. (Although it doesn't hang, by monitoring in the logcat, we can see the PID has changed.) It seems the exit(0) function is the reason why it kills the process and let it restart. However, if we comment exit(0) in the do_exit function, the app will hang at a libc error.

ffmpeg and SDL source

hi , Dear friend, can you push the ffmpeg source and SDL2 source . i download the two source (version: ffmpeg-2.5.3.tar SDL2-2.0.3.tar.gz),but the vidoe play is not smooth. or can you send it to my email ( [email protected] ), thank you very much

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.