begeekmyfriend / yasea

RTMP live streaming client for Android
MIT License
4.87k stars 1.32k forks source link

Add x86_64 architecture to x264 codec #730

Open olegsl2011 opened 5 years ago

olegsl2011 commented 5 years ago

Hi can You add x86_64 architecture to x264 codec ? I cant publish app on google play (after 1 August of 2019 we cant publishing app without it)

begeekmyfriend commented 5 years ago

Does hard encoding not work for you?

olegsl2011 commented 5 years ago

I tried to compile but I got error when build

begeekmyfriend commented 5 years ago

I mean using the Android built-in hard encoder.

olegsl2011 commented 5 years ago

I have old project and now need to update some features

muehlemann commented 5 years ago

Agreed support for x86_64 architecture would be great! Cant use hard encoder due to restrictions of my project.

begeekmyfriend commented 5 years ago

Unfortunately I am unavailable for Android development any more. Hope such issue can be taken over by some kind guys.

tolew1 commented 5 years ago

@begeekmyfriend You are no longer maintaining this library? How do we use Android built-in hard encoder?

begeekmyfriend commented 5 years ago

I do not know what device you are using with this project. Android phone or board? In fact the default encoding mode is hard one. Or you can call this method in MainActivity.java.

tolew1 commented 5 years ago

It is a phone. But we need to be able to add x86_64 arch or we cant update our apps in Google play anymore. I tried compiling it myself but all I get are errors when trying to build it using the libx264.a file that is generated.

Build command failed.
Error while executing process C:\Users\tolew\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\tolew\OneDrive\Documents\pixtantly-timeline\broadcast\src\main\cpp\Android.mk NDK_APPLICATION_MK=C:\Users\tolew\OneDrive\Documents\pixtantly-timeline\broadcast\src\main\cpp\Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=C:/Users/tolew/OneDrive/Documents/pixtantly-timeline/broadcast/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\tolew\OneDrive\Documents\pixtantly-timeline\broadcast\build\intermediates\ndkBuild\debug\lib C:/Users/tolew/OneDrive/Documents/pixtantly-timeline/broadcast/build/intermediates/ndkBuild/debug/obj/local/x86_64/libenc.so}
[x86_64] Compile++      : enc <= libenc.cc
[x86_64] SharedLibrary  : libenc.so

C:/Users/tolew/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin\ld: error: C:/Users/tolew/OneDrive/Documents/pixtantly-timeline/broadcast/src/main/cpp/libx264/libs/x86_64/libx264.a(base.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC``
begeekmyfriend commented 5 years ago

Oh I see. Since I live in China where people seldom develop their Android application on Google play of which the policy I am not aquainted with. Unfortunately I have not such x86 device at hand but the build script of libx264 has been provided. You might try to build out the static library and copy it into this directory. NOTE that the prebuilt one might be invalid. You had better build it on your own platform. Good luck!

tolew1 commented 5 years ago

I'm just going to not support x86 and I shouldn't need x86_64.. There are very few devices that use that and 98 percent use ARM. So I'm going to just try that and remove x86 from abi filters