Fail to open x265 encoder

Issue #352 invalid
Thi Nhan Dinh created an issue

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/

  1. I built libx265.so in combination with libyuv, downloaded from: https://chromium.googlesource.com/libyuv/libyuv/

  2. 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.

  3. 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)

  1. Pradeep Ramachandran Account Deactivated

    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.

  2. Pradeep Ramachandran Account Deactivated

    Updating to task as this is an integration issue, and not anything to do with the library itself.

  3. Pradeep Ramachandran Account Deactivated

    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.

  4. Log in to comment