2

HI all,

I am working on playing audio from URI using ffmpeg shared library in android.

I configured android-ndk and added ffmpeg shared library to project and able to compile the project using cygwin.

In ffmpeg library i see ffmpeg.c file, i donot know how i can use this file to implement audio player in my activity.

Please help me on this issue.

Thank you in advance

praveenb
  • 10,549
  • 14
  • 61
  • 83
  • Check the last comment. Perhaps it helps. [Using FFmpeg / FFplay for audio playback](https://stackoverflow.com/questions/5000385/playing-audio-with-ffmpeg) – VladMode Nov 05 '19 at 01:17

1 Answers1

1

First, Use ffmpeg to open the URI and read frames and decode to raw PCM data, you can take a look at ffplay.c about the decoding part.

Next, using the Android AudioTrack class to play the raw PCM data, there is a tutorial: fun with audiotrack

Good luck!

Bolton
  • 2,226
  • 3
  • 25
  • 29
  • your link is dead, I also need that how to control ffmeg library from my activity. – FTI Jul 14 '11 at 22:01