Newest 'libx264' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Libx264 not found on cross compiling ffmpeg

    28 juin 2021, par Roiniti

    Im trying to compile ffmpeg with mp4 for this project: https://github.com/libgdx/gdx-video the problem is when i try to cross compile ffmpeg, im in linux64 and i get

    libx264 not found
    

    when i execute this command

    ../configure --enable-pic --enable-cross-compile --disable-symver --disable-doc --enable-memalign-hack --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --disable-shared --enable-static --disable-everything --enable-filter=deshake --enable-protocol=file --enable-filter=aresample --enable-demuxer=ogg --enable-demuxer=matroska --enable-decoder=vorbis --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-gpl --enable-libx264 --enable-decoder=h264
    

    without the --enable-libx264 ffmpeg compiles good, also when i try to compile it for linux64 it compiles good, I searched and I think I need to build libx264 for win64 or something similar but I don't if this is correct or if thats the solution, how can I compile it?

  • Inconsistent libx264 I-frame interval. Why ?

    20 juin 2021, par Alexander

    Why is the I-frame interval in some cases inconsistent despite of defyning it as a fixed value?

    I'm using ffmpeg and the below command, while the I-frame coded_picture_number goes as follows: 0 10 20 30 38 47 57 ... 196 206 215 225 235 245 255

    ffmpeg -i football.y4m -c:v libx264 -bf 0 -g 10 football.mp4

    The video data in question is footbal (b) at xiph.org

  • How to change macroblock's size in H.264 ?

    12 juin 2021, par Euphoria Yang

    I am using ffmpeg api to implement this paper(Passthrough+: Real-time Stereoscopic View Synthesis for Mobile Mixed Reality). In this paper, they use 8x8 macroblock to calculate motion vectors. However, most of macroblocks are encoded in 16x16 pixels by ffmpeg. How to force macroblock size to be 8x8 using ffmpeg api(or can be done by modifying libavcodec/libx264.c)?

  • x264 / libx264 : Can only one I/P frame to be used as reference for B-frames ?

    29 mai 2021, par Maria

    As you know ref parameter can set the number of previous frames each P-frame can use as references.

    I need the same thing for B-Frames, but ref=1 does not work for B-Frames.

    I mean an I/P frame to be used as reference for B-frames only.

    is it possible with a command line? , or by change the following function in the source code ?

    static inline int reference_update( x264_t *h )
    {
    if( !h->fdec->b_kept_as_ref )
    {
        if( h->i_thread_frames > 1 )
        {
            x264_frame_push_unused( h, h->fdec );
            h->fdec = x264_frame_pop_unused( h, 1 );
            if( !h->fdec )
                return -1;
        }
        return 0;
    }
    
    /* apply mmco from previous frame. */
    for( int i = 0; i < h->sh.i_mmco_command_count; i++ )
        for( int j = 0; h->frames.reference[j]; j++ )
            if( h->frames.reference[j]->i_poc == h->sh.mmco[i].i_poc )
                x264_frame_push_unused( h, x264_frame_shift( &h->frames.reference[j] ) );
    
    /* move frame in the buffer */
    x264_frame_push( h->frames.reference, h->fdec );
    if( h->frames.reference[h->sps->i_num_ref_frames] )
        x264_frame_push_unused( h, x264_frame_shift( h->frames.reference ) );
    h->fdec = x264_frame_pop_unused( h, 1 );
    if( !h->fdec )
        return -1;
    return 0;
    }
    
  • Extract Motion Vectors From x264 source code

    27 mai 2021, par Essam Aly

    If you are familiar with the x264 source code, where in the code I can extract the MV (motion vectors) of each frame? Can you point please to a line of code I can intercept and save the MVs to disk? Thank you.