How to play video using FFMPEG library in Android?

16,883

Have a look at this player: https://github.com/bbcallen/ijkplayer

Basically what you need to do is build a JNI interface through to the MediaPlayer class (or possibly ExoPlayer in newer Android though I haven't done this yet).

If you look at the repo link you will see that this needs to be done on top of ffplay more than ffmpeg as the former is the player and the latter the decode/encode/package tool.

Share:
16,883

Related videos on Youtube

Macchiato
Author by

Macchiato

I convert brain signals into bits.

Updated on June 19, 2022

Comments

  • Macchiato
    Macchiato almost 2 years

    I was able to build ffmpeg library by using rock player build script.

    Now I have this .so file, how do I play video? And I want to display this video inside a small LinearLayout in my Activity.

    Is it possible?

    Update: I know that it's easy to play video using VideoView or MediaPlayer + SurfaceView. I just wanted to understand more about ffmpeg library and how to display the frames inside an Android Activity.

    • Yaqub Ahmad
      Yaqub Ahmad about 12 years
    • Macchiato
      Macchiato about 12 years
      I wanted to, but sorry my reputation is below 15
    • Prof. Falken
      Prof. Falken over 11 years
      @Macchiato, so what was the right answer?
  • benchuk
    benchuk almost 9 years
    Working, but uses software decoding in my case - but much better than VideoView for RTP stream stability wise.