x264libx264libx265

How to decode using libx264 package?


Environment: Ubuntu 16.04, package libx264-148

I am looking at decoding some x264-encoded data using libx264 library. I found a sample at https://code.videolan.org/solaris/x264/raw/7d35ba6bf080610d8f144f4270e961c69ba14f1c/x264.c. It is using APIs such as x264_decoder_open and x264_decoder_decode. However, when I examine /usr/include/x264.h, I see APIs only for encoding such as x264_encoder_open and x264_encoder_encode. There are no APIs for decoding. I am wondering if I am missing something. Are we supposed to use the same APIs for encoding as well as decoding? Also, pointer to any code sample will be highly appreciated. Regards.

PS: It is a similar issue with x265.h as well.


Solution

  • You're not missing anything. x264 doesn't decode, its an encoder only