Newest 'x264' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Anybody can Explain me, what is Open GOP & Close GOP in Easy way- H.264 ?

    18 mai 2019, par user11281994

    Youtube is Mentioned that, you should have to use Close GOP, Half of the frame rate. Now in my adobe premier pro i added the TMPGEncMovieAVC101212PremPro Plugin. In this plugin, I found GOP setting but i confused how to set close GOP value.

    Also I want to know this is Close GOP structure? IBBPBBPBBPBBPBP

  • "C compiler not found" compiling NDK code Mac

    4 mai 2019, par Zia ur Rehman

    I am trying to compile ffmpeg wrapper GitHub link but getting issues in configuring it. In build_ffmpeg_for_android.sh file I have following lines at start and these are not working so far.

    PREFIX_DIR=$PWD/ffmpeg-android-sdk
    SYSROOT=$NDK_HOME/platforms/android-19/arch-arm/
    CROSS_COMPILE=$NDK_HOME/toolchains/arm-linux-androideabi- 
    4.9/prebuilt/windows/bin/arm-linux-androideabi-
    EXTRA_CFLAGS="-I$PREFIX_DIR/include -DANDROID -DNDEBUG -Os -ffast-math -mfpu=neon-vfpv4 -mfloat-abi=softfp"
    EXTRA_LDFLAGS="-L$PREFIX_DIR/lib"
    
    #++ build x264 ++#
    if true; then
    if [ ! -d x264 ]; then
       git clone -b stable git://git.videolan.org/x264.git
    fi
    cd x264
    ./configure --prefix=$PREFIX_DIR \
    --enable-strip \
    --enable-static \
    --enable-pic \
    --disable-cli \
    --disable-opencl \
    --disable-avs \
    --host=arm-linux-androideabi \
    --cross-prefix=$CROSS_COMPILE \
    --sysroot=$SYSROOT
    

    Error that I am unable to get rid of is "C compiler not found". I have verified all paths mentioned at top of file and added missing paths to env too but still same issue. I have tried it in ubuntu too and facing same issue there. Many users faced similar issues but those fixes are not seems to be working for me. Any pointers will be helpful.

    FYI: I have not worked on NDK much therefore there might be something silly that i have missed.

  • How to fix "fatal error : x.264 no such file or directory"

    24 avril 2019, par user11340790

    I wrote a makefile which builds a C program attaching the x.264 header. After trying to execute the makefile in terminal I receive the fatal error: "example.c line [line of #include ] x264.h no such file or directory". Below you can find the C code and makefile (located in the same folder, the library - containing the x264.pc file- is in the folder libx264 of the parent folder). I would be very grateful if you could help with the linkage.

    Makefile:

        CC = gcc
    
        CFLAGS = -c -Wall `export PKG_CONFIG_PATH=../libx264 && pkg-config            --cflags x264`
        LDFLAGS = -static `export PKG_CONFIG_PATH=../libx264 && pkg-config --libs --static libx264`
    
    
        all: Release
    
        Debug: CFLAGS += -g
        Debug: example
    
        Release: example
    
        test: example.o
            $(CC) -o example example.o $(LDFLAGS)
    
        test.o: example.c
            $(CC) $(CFLAGS) example.c -o example.o
    
        clean:
            rm -f example.o example
    

    example.c code

        #include 
        #include 
        int main( int argc, char **argv )
        {
            int width, height;
             return 0;
        }
    
  • how to mux a multi-slice h264 stream via android mediamuxer

    12 avril 2019, par li hu

    I'm trying to mux a mp4 file using mediaMuxer. I've already set SPS, PPS and replaced the 4-bit header. When the h.264 frame formed with single slice, everything is ok, but when I change it into multi-slice, the result is wrong.

  • Force x264_encoder_encode to only output one NAL unit [duplicate]

    29 mars 2019, par ktb92677

    This question already has an answer here:

    I am trying to figure out how to get x264_encoder_encode to only return one NAL unit.

    Google does not provide any good results on how to tune x264 to only produce one NAL unit per encode cycle.

    x264_param_default_preset(&x264_encoder->parameters, "ultrafast", "zerolatency");
    
      x264_encoder->parameters.i_csp = X264_CSP_I420;
        x264_encoder->parameters.i_log_level = X264_LOG_INFO;
      x264_encoder->parameters.i_threads = 1;
      x264_encoder->parameters.b_sliced_threads = 1;
      x264_encoder->parameters.i_width = x264_encoder->Width;
      x264_encoder->parameters.i_height = x264_encoder->Height;
      x264_encoder->parameters.i_fps_num = 60;
      x264_encoder->parameters.i_fps_den = 1;
      x264_encoder->parameters.i_keyint_max = 30;
      x264_encoder->parameters.b_intra_refresh = 1;
      x264_encoder->parameters.rc.i_rc_method = X264_RC_CRF;
      x264_encoder->parameters.rc.i_vbv_buffer_size = 200;
      x264_encoder->parameters.rc.i_vbv_max_bitrate = 350;
      x264_encoder->parameters.rc.f_rf_constant = 20;
      x264_encoder->parameters.rc.f_rf_constant_max = 30;
      x264_encoder->parameters.i_sps_id = 7;
        x264_encoder->parameters.i_slice_max_size = 1200;
      x264_encoder->parameters.b_repeat_headers = 1;
      x264_encoder->parameters.b_annexb = 1;
        x264_encoder->parameters.b_opencl = 1;
    
      x264_param_apply_profile(&x264_encoder->parameters, "baseline");
    
    x264_encoder->frameSize = x264_encoder_encode(x264_encoder->encoder,
      &x264_encoder->nals, &x264_encoder->i_nals, &x264_encoder->picture_in,
      &x264_encoder->picture_out);
    

    I would like x264_encoder->i_nals to equal one every time. Instead it varies up to 4 or 5 occasionally