简体   繁体   中英

Android and ffmpeg. Play video (with sound)

I have compiled ffmpeg library add it to my project and now I want to play video (with full list of options - stop, pause, forward, backward etc). I have read roman10 ffmpeg tutorial . And I also find out tutorial which describes how play video with ffmpeg and SDL framework . The difference (if I have correctly understood) is that in roman's tutorial each frame of video turns into a Bitmap and is then passed to Java code where it shows on SurfaceView. And in the second tutorial, the video is playing with the help of the SDL framework without passing it back to Java code.

I want to ask some questions:

  1. Which way is better: return Bitmap back to Java and show it on SurfaceView or play it with SDL?
  2. How can I play the sound of my video (can I do it with ffmpeg or do I need some additional libraries)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM