在Windows上使用的Andr​​oid FFMPEG [英] Using FFMPEG android on Windows

查看:258
本文介绍了在Windows上使用的Andr​​oid FFMPEG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题可能是很多其他的问题可能重复,但没有很好的答案,也没有为它提供一个很好的教程

I know this question may be possible duplicate of many others questions but there is no good answer nor a good tutorial available for it

我想使用的ffmpeg在我的项目,我在Windows上使用的Andr​​oid ndk7没有什么线索的ffmpeg code下载,编译教程是提供对Ubuntu没有什么太多的Windows

I want to use ffmpeg in my project I am using android ndk7 on windows don't have a clue what ffmpeg code to download,compile tutorial available is for UBUNTU nothing much for windows

我真的AP preciate一个很好的答案。

I would really appreciate a really good answer.

推荐答案

我从来没有能够在Windows下建立FFMPEG为Android,但在Ubuntu下成功地这样做了(有一些困难时期,虽然之后)。

I was never able to build FFMPEG for Android under Windows but successfully did so under Ubuntu (after having some hard time though).

我使用了Oracle VM虚拟盒免费软件在Windows下模拟的Ubuntu电脑。

I used Oracle VM Virtual Box freeware to emulate Ubuntu machine under Windows.

然后我建立FFMPEG利用bambuser http://bambuser.com/opensource 的脚本。

I then built FFMPEG using the scripts from bambuser http://bambuser.com/opensource.

我然后移动生成的目录下,进入我的项目的JNI文件夹窗口,并从我的Andr​​oid.mk

I then moved the resulting directory into the windows under my project's jni folder and referred the libs from my Android.mk

FFMPEG_DIR := ffmpeg
ifeq ($(TARGET_ARCH_ABI), armeabi)
FFMPEG_DIR := $(FFMPEG_DIR)/armeabi
else 
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) 
FFMPEG_DIR := $(FFMPEG_DIR)/armeabi-v7a
endif 
endif 

include $(CLEAR_VARS) 
LOCAL_MODULE := libavcodec
LOCAL_SRC_FILES := $(FFMPEG_DIR)/lib/$(LOCAL_MODULE).a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS) 
LOCAL_MODULE := libavcore
LOCAL_SRC_FILES := $(FFMPEG_DIR)/lib/$(LOCAL_MODULE).a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS) 
LOCAL_MODULE := libavdevice
LOCAL_SRC_FILES := $(FFMPEG_DIR)/lib/$(LOCAL_MODULE).a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS) 
LOCAL_MODULE := libavfilter
LOCAL_SRC_FILES := $(FFMPEG_DIR)/lib/$(LOCAL_MODULE).a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS) 
LOCAL_MODULE := libavformat
LOCAL_SRC_FILES := $(FFMPEG_DIR)/lib/$(LOCAL_MODULE).a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS) 
LOCAL_MODULE := libavutil
LOCAL_SRC_FILES := $(FFMPEG_DIR)/lib/$(LOCAL_MODULE).a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS) 
LOCAL_MODULE := libswscale
LOCAL_SRC_FILES := $(FFMPEG_DIR)/lib/$(LOCAL_MODULE).a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

这篇关于在Windows上使用的Andr​​oid FFMPEG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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