开发者

Use FFMPEG on Android [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

Does somebody know how to use FFMPEG on Android to convert YUV420 frame to H.264?

I have ported FFMPEG work on Android with NDK, I just don't know how to use it. A 开发者_StackOverflow中文版source code is appreciated.


You have two options:

  1. use ffmpeg api - google ffmpeg sample code. this requires good understanding of the api and which is very comprehnsive.
  2. compile ffmpeg.c and invoke its main() via jni. This requires that you understand the command line parameters. It is rather cumbersome but works.

    You need to look out for the static vars defined in ffmpeg.c and reset them every time you invoke the main function. Also make sure you don't invoke the main in two threads simultaneously .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜