的Andr​​oid NDK。如何播放视频。 [英] Android NDK. How to play video.

查看:173
本文介绍了的Andr​​oid NDK。如何播放视频。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要播放视频的Andr​​oid设备(不同格式)。 正如我已经明白了,最好的办法是使用Android NDK与特定库,可播放的视频。我做了一些基本的例子来了解NDK的用法,但我不知道下一步该怎么做。正如我已经明白,我必须安装的ffmpeg首先。 所以我下面给出了以下几个问题:

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:

  1. 在我需要的ffmpeg(最好的办法是使用Linux,而不是Windows, 因为Windows有其安装一些麻烦)。
  2. 如何播放音视频?
  3. 在我看过一些开源库可以播放视频,没有任何努力。我的工作是给他们的字节数组或路径视频SD。这是正确的?
  1. I need to have ffmpeg (the best way is to use Linux, not Windows, because in Windows there are some troubles with its installation).
  2. How to play sound of video?
  3. 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?

那么,谁能帮我解释一下基本的方式如何与NDK播放视频,可能是一些基本的计划或链接? 非常感谢你的兴趣我的问题!

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!

推荐答案

确定首先开始你的问题。你必须决定是否要操纵视频或只是播放视频。如果你只是播放视频/音频那么就没有必要外部库。像ffmpeg的。

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.

但如果你是操作音频/视频去为 ffmpeg的。然后决定你是否需要一个准备编译 ffmpeg的库或想追求的通过NDK 自定义标记设置编译。

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.

如果你可以准备好做 ffmpeg的库。,那么你可以用这个的应用,并帮助它在的这里

If you can do with ready Ffmpeg lib. then you can use this App and help for integrating it at here.

但是,如果你要制作的 *。所以,或通过 NDK 编译ffmpeg的你自己再看看这些帮助#1上的FFmpeg为Android 。在这里,你可以有你自己的设置。 您还可以使用precompiled lib中的。 ffmpeg的直接它可在 Github上/ Roman10

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:-

  1. 如上

取决于你是否是提取然后的 ffmpeg的DOC1 或只播放声音那么的链接#1

Depends whether you are extracting then Ffmpeg Doc1 or just playing sound then Stackoverflow link

单单看的Andr​​oid文档播放,< A HREF =htt​​p://stackoverflow.com/questions/6040226/play-video-file-in-android>视频

干杯..!

这篇关于的Andr​​oid NDK。如何播放视频。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆