Fail to open x265 encoder
I have an issue that need your assistance, please help!
I am building an app on Android Studio that take the input video from camera, encode it by softCoding (libx265) and stream it to Wowza server
To do that, 1. I first build libx265.so for armeabi-v7a. The source code I download from: https://bitbucket.org/multicoreware/x265/downloads/
-
I built libx265.so in combination with libyuv, downloaded from: https://chromium.googlesource.com/libyuv/libyuv/
-
The C source file, named libenc265.cc that defined some native functions that I am going to used in Android Studio. I attached the libenc265.cc in the attachment. Please have a look at it.
-
When I run my app, with options of softCoding libx265, it raised an error: Fail to open x265 encoder! I did spend a lot of time looking at the source code, and found that the error came from libenc265.cc, at:
x265_ctx.encoder = x265_encoder_open(&x265_ctx.params); if (x265_ctx.encoder == NULL) { LIBENC265_LOGE("Fail to open x265 encoder!"); return JNI_FALSE; }
That means the x265_encoder_open() fuction is unable to open the encoder, but x265_encoder_open() fuction is in x265.h file and I don't have any idea how to deal with it.
Is that something wrong with libenc265.cc or the libx265 itself. So please help me with this error.
Comments (5)
-
Account Deactivated -
Account Deactivated - marked as major
-
Account Deactivated - marked as task
Updating to task as this is an integration issue, and not anything to do with the library itself.
-
reporter Thanks for your help!
-
Account Deactivated - changed status to invalid
This isn't a bug with the library, but more an integration problem for the library based on a new application that the user is writing.
- Log in to comment
My suspicion is that your param structure is invalid and therefore you're having trouble.
I would recommend moving the param object inside your x265_content into a pointer and using x265_param_alloc() to allocate the param structure. You can try and follow the integration with the library that is done in x265.cpp as a reference.