Android NDK。如何播放视频 [英] Android NDK. How to play video.
问题描述
我需要在Android设备上播放视频(不同格式)。 据了解,最好的方法是使用Android NDK与可播放视频的特定库。我已经做了一些基本的例子来了解NDK的用法,但是我不知道下一步该怎么做。据我所知,我必须首先安装ffmpeg。
所以我有以下问题:
- 我需要有ffmpeg(最好的方法是使用Linux,而不是Windows,
,因为在Windows中安装有一些麻烦)。 - 如何播放视频?
- 我已经阅读一些开放源代码的图书馆无需任何努力即可播放视频。我的工作是在SD上给他们字节数组或路径。这是对的吗?
所以,任何人都可以帮助我,并解释如何用ndk播放视频的基本方法,可能是一些基本计划或链接?
非常感谢您的关注我的问题!
首先从你的问题开始,您必须决定是否要操纵视频
或只需播放视频
。如果你只是播放视频/音频,那么不需要 external lib。
像Ffmpeg。
但是你是操纵
音频/视频,然后去 Ffmpeg
。然后决定是否要一个准备好的编译的 Ffmpeg
库,或者想追求通过NDK编译
与自定义标志设置。 / p>
如果你可以做好准备 Ffmpeg lib。
那么你可以使用这个 App ,并帮助将其集成到 here 。
但是,如果你要做 *。所以
或者通过 ndk
自己编译Ffmpeg,然后看看这些适用于Android的FFmpeg上的Stackoverflow帮助。在这里你可以有自己的设置。
您还可以使用预编译的
lib。的Ffmpeg直接在 Github / Roman10
现在就您的问题: -
-
以上
-
取决于您是否提取然后 Ffmpeg Doc1 或只是播放声音,然后 Stackoverflow链接
-
a href =http://developer.android.com/training/managing-audio/index.html =nofollow noreferrer> Android文档,视频
干杯。 。!
I need to play video on Android device (different formats). As I have understand, the best way is to use Android NDK with specific libraries that can play video. I have done some basic examples to understand NDK usage, but I don't know what to do next. As I have understood, I must install ffmpeg first of all. So I have the following questions given below:
- I need to have ffmpeg (the best way is to use Linux, not Windows, because in Windows there are some troubles with its installation).
- How to play sound of video?
- I have read that some open-source libraries can play video without any efforts. My job is to give them byte-array or path to video on SD. Is this right?
So, can anyone help me and explain basic ways how to play video with ndk, may be some basic plan or links? Thank you very much for interest to my question!
Ok firstly starting with your problem; you have to decide whether you want Manipulate Video
or just Play video
. If you are just playing video/audio then there is no need for external lib.
like Ffmpeg.
But if you are manipulating
audio/video then go for Ffmpeg
. Then decide whether you want a ready compiled Ffmpeg
library or want to pursue for Compile via NDK
with custom flag settings.
If you can do with ready Ffmpeg lib.
then you can use this App and help for integrating it at here.
But if you are going for making the *.so
or compile Ffmpeg on your own via ndk
then see these Stackoverflow Help on FFmpeg for Android. Here you can have your own settings.
You also can use the Precompiled
lib. of Ffmpeg directly which is available at Github/Roman10
Now for your questions:-
As above
Depends whether you are
extracting
then Ffmpeg Doc1 or just playing sound then Stackoverflow linkPlay simply by looking at Android Docs,Video
Cheers..!
这篇关于Android NDK。如何播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!