简体   繁体   中英

How to compile ffmpeg and x264 with thread support for android?

i want to compile both x264 and ffmpeg with thread support for ANDROID .FFmpeg and x264 didn't compile with thread support even after enabling enable-pthreads and enable-threads respectively.

Both the config.h contains #define HAVE_THREAD 0 and #define HAVE_PTHREADS 0

1.How to compile with thread support. 2.Second question is that when i increase the gop size from 1 to some other value encoder returns 0 for certain subsequent frames.This causes a delay more than 3 to 5 seconds in vide playing

I'm using NDK9 standalone toolchain cross compile the last x264 library with thread support.

Here is my step. http://bashell.nodemedia.cn/archives/cross-complie-pthread-android-x264-library.html

For the first part, maybe looking at how configure checks whether pthreads are supported is a good place to start? I saw a patch to autotools machinery in x264 that might help: http://mailman.videolan.org/pipermail/x264-devel/2012-April/009309.html

See my patch for x264 here: https://mailman.videolan.org/pipermail/x264-devel/2013-March/009941.html

These two easy steps will also work for ffmpeg

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