Newest 'libx264' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/libx264

Les articles publiés sur le site

  • libx264 : which parameters can be changed on fly ?

    12 janvier, par Dan Tumaykin

    I know that it is possible to change some encoder parameters on fly, using x264_encoder_reconfig(). From this commit I can deduce that we can change ratecontrol parameters - but I was unable to find a clear list of parameters that may be changed.

    Question: which parameters of x264 encoder can be changed on fly?

  • encode x264(libx264) raw yuv frame data

    12 janvier, par Mohamed El-Sayed

    I am trying to encode an MP4 video using raw YUV frames data, but I am not sure how can I fill the plane data (preferably without using other libraries like ffmpeg)

    The frame data is already encoded in I420, and does not need conversion.

    Here is what I am trying to do:

    const char *frameData = /* Raw frame data */;
    
    x264_t *encoder = x264_encoder_open(&param);
    x264_picture_t imgInput, imgOutput;
    x264_picture_alloc(&imgInput, X264_CSP_I420, width, height);
    
    // how can I fill the struct data of imgInput
    
    x264_nal_t *nals;
    int i_nals;
    int frameSize = x264_encoder_encode(encoder, &nals, &i_nals, &imgInput, &imgOutput);
    

    The equivalent command line that I have found is :

     x264 --output video.mp4 --fps 15 --input-res 1280x800 imgdata_01.raw 
    

    But I could not figure out how the app does it.

    Thanks.

  • Create a deep copy of internal x264 encoder's state

    9 janvier, par Ragdoll Car

    I am using x264 library: https://github.com/mirror/x264

    We can create a new encoder handler this way:

    x264_param_t param{};  // fill with proper values
    x264_t* handler = x264_encoder_open(&param);
    

    But how can we create a deep copy of handler so we can have two the same encoders with exactly the same internal state?

  • is it possible to compile x264 for webassembly using emscripten ?

    4 novembre 2024, par sunder kandasamy

    I am trying to build x264 code for webassembly. i use emconfigure to configure. like below

    emconfigure ./configure --prefix="$(pwd)/em" --enable-shared --enable-static  --disable-cli  --disable-gpl
    

    But this was throwing "No working C compiler found." error. i have gcc compiler 9.3.0 version and have tried reinstalling build-essentials and gcc but still same issue.

    config.log also doesn't help.

    If i provide --host cross compiler flag then it is generating libx264.so file, but i am not sure whether this is right as the wasm code should work in every browser in (windows/mac/linux)

    please tell me first whether compiling x264 using emscripten is possible? If yes, please tell me what is the correct steps to do it

  • How to set correct parameters for x264 lib

    29 octobre 2024, par galuk

    I depacketize the H264 video fragments from an IP.RTP stream and save them to video.ivf file. After depacketizing i have only [SPS] ,[PPS] and [non-IDR slice]. I try to create IDR slice by using x264 lib. x264 lib creates IDR frame which consists of 0x000001[SPS nal type 7] 0x000001[PPS nal type 8] 0x0001[SE slice nal type 6] and 0x0001[I slice nal type 5]. How to set correct parameters for x264 lib if i have real SPS and PPS frames to get the same SPS and PPS frames

    i parse SPS and PPS but i don't know which parameters of x264_param_t param i should set. can someone give me some examples.