VideoHelp Forum
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. First, I want to apologize if you don't understand what I say, English is not my language.

    Second, I looking everywhere for info about to add mp4 output support on x264. I have tried like this, this, this, or this, but nothing works, some guides are very old or are not show detailed process.

    Supposedly, when it run ./configure in MinGW, GPAC (which I also have installed on PC) or Lsmash are automatically detected when the source code files are in the workplace, but on prompt it keeps say "mp4: no".

    What exactly should I do?
    Quote Quote  
  2. Why compile by yourself?
    For simple mp4 support you could use a FFmpeg static build (for Windows: https://ffmpeg.zeranoe.com/builds/) and a Gui, g.e. my clever FFmpeg-GUI.
    Last edited by ProWo; 30th Jun 2020 at 09:04.
    Quote Quote  
  3. I suppose you know about doing basics and encoding *.264 then muxing it in mp4. If yes , just disregard this. mp4box-gpac you can install this way:
    Code:
    sudo apt-get install subversion
    sudo svn co https://svn.code.sf.net/p/gpac/code/trunk/gpac gpac
    cd gpac
    sudo /configure --disable-opengl --use-js=no --use-ft=no --use-jpeg=no --use-png=no --use-faad=no --use-mad=no --use-xvid=no --use-ffmpeg=no --use-ogg=no --use-vorbis=no --use-theora=no –use-openjpeg=no
    sudo make
    sudo make install
    cp bin/gcc/libgpac.so /usr/lib
    Quote Quote  
  4. Originally Posted by ProWo View Post
    Why compile by yourself?
    For simple mp4 support you could use a FFmpeg static build (for Windows: https://ffmpeg.zeranoe.com/builds/) and a Gui, g.e. my clever FFmpeg-GUI.
    Although it's something any mortal would do, the thing is I want to build an x264 bin (from VideoLan source code) with mp4 output support because official releases have it disabled by default. Even if FFmpeg is very complete, I don't want to use it for my H264 encodes. Also I try to learn something different and I don't know.

    Originally Posted by _Al_ View Post
    I suppose you know about doing basics and encoding *.264 then muxing it in mp4. If yes , just disregard this. mp4box-gpac you can install this way:
    Code:
    sudo apt-get install subversion
    sudo svn co https://svn.code.sf.net/p/gpac/code/trunk/gpac gpac
    cd gpac
    sudo /configure --disable-opengl --use-js=no --use-ft=no --use-jpeg=no --use-png=no --use-faad=no --use-mad=no --use-xvid=no --use-ffmpeg=no --use-ogg=no --use-vorbis=no --use-theora=no –use-openjpeg=no
    sudo make
    sudo make install
    cp bin/gcc/libgpac.so /usr/lib
    This is not clear to me. Do all of that, is the same as doing it using "git clone https://github.com/gpac/gpac.git" before run ./configure and make? Or are the specific files needed for x264 to detect GPAC before run ./configure and make? BTW, I forgot to mention that I use MinGW and trying to do it from WIndows 10, although I have a VM with Ubuntu, I'm not sure if it's possible to cross-compile x264 for Windows.
    Last edited by naoto89; 30th Jun 2020 at 21:58.
    Quote Quote  
  5. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Supposedly, when it run ./configure in MinGW, GPAC (which I also have installed on PC) or Lsmash are automatically detected when the source code files are in the workplace, but on prompt it keeps say "mp4: no".

    What exactly should I do?
    "Zeroth" of all: I recommend that you DO NOT USE gpac because it's bloatware, but I cannot stop you from using it anyway

    GPAC (which I also have installed on PC) or Lsmash are automatically detected when the source code files are in the workplace
    I presume you mean you do have compiled (and "installed") GPAC or L-Smash, instead of just having "their source-code in the workplace"

    And in this case, you should "say" to x264's ./configure the exact paths to L-Smash's include files + lib files
    —otherwise ./configure will ignore your instruction to add an MP4 muxer to the final. EXE.

    So, give a try to something like this:
    Code:
    ./configure --blah-blah-blah CPPFLAGS="-I/path-to-L-Smash/include" LDFLAGS="-L/path-to-L-Smash/lib" --blah-blah-blah
    make
    NOTICE: I have never tried to compile x264.exe with anything besides Avisynth support,
    because I don't even use the built-in MKV and FLV muxers of x264,
    so take this suggestion with a grain of salt and play at your own risk
    Last edited by El Heggunte; 1st Jul 2020 at 01:51. Reason: clarity
    "Programmers are human-shaped machines that transform alcohol into bugs."
    Quote Quote  
  6. Originally Posted by El Heggunte View Post
    Supposedly, when it run ./configure in MinGW, GPAC (which I also have installed on PC) or Lsmash are automatically detected when the source code files are in the workplace, but on prompt it keeps say "mp4: no".

    What exactly should I do?
    "Zeroth" of all: I recommend that you DO NOT USE gpac because it's bloatware, but I cannot stop you from using it anyway

    GPAC (which I also have installed on PC) or Lsmash are automatically detected when the source code files are in the workplace
    I presume you mean you do have compiled (and "installed") GPAC or L-Smash, instead of just having "their source-code in the workplace"

    And in this case, you should "say" to x264's ./configure the exact paths to L-Smash's include files + lib files
    —otherwise ./configure will ignore your instruction to add an MP4 muxer to the final. EXE.

    So, give a try to something like this:
    Code:
    ./configure --blah-blah-blah CPPFLAGS="-I/path-to-L-Smash/include" LDFLAGS="-L/path-to-L-Smash/lib" --blah-blah-blah
    make
    NOTICE: I have never tried to compile x264.exe with anything besides Avisynth support,
    because I don't even use the built-in MKV and FLV muxers of x264,
    so take this suggestion with a grain of salt and play at your own risk
    About that of "installed" I meant that I downloaded the latest GPAC installer and after added "C:\Program Files (x86)\GPAC" to PATH (or it says in this guide). I also downloaded the source code but it's in workplace where I try to compile with x264. In any case, I tried to do it both ways but I never knew what the error was. In the case of L-Smash, I just downloaded the source code but I didn't know how to call the files and I couldn't find a guide about it (and even if there are guides, surely the language is Russian, Chinese or Japanese).
    Quote Quote  
  7. Ok, I tried to compile with L-Smash following the example above and detects it, but now the problem is an error and it can't compile.

    On MSYS2-MinGW32

    Code:
    checking for -Werror=unknown-warning-option... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=unknown-warning-option   -L../l-smash/tmpbuild/lib -o conftest
    cc1.exe: error: '-Werror=unknown-warning-option': no option '-Wunknown-warning-option'
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=unknown-attributes... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=unknown-attributes   -L../l-smash/tmpbuild/lib -o conftest
    cc1.exe: error: '-Werror=unknown-attributes': no option '-Wunknown-attributes'; did you mean '-Wno-attributes'?
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=attributes... yes
    checking for -Werror=ignored-attributes... yes
    checking for -lshell32... yes
    checking for -S... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m64  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=attributes -Werror=ignored-attributes -S  -lshell32 -m64  -L../l-smash/tmpbuild/lib  -o conftest
    cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Wl,--high-entropy-va... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m64  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=attributes -Werror=ignored-attributes -Wl,--high-entropy-va  -lshell32 -m64  -L../l-smash/tmpbuild/lib  -o conftest
    cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking whether windres works... no
    Failed commandline was:
    --------------------------------------------------
    windres --target=pe-x86-64  -o conftest.o conftest.rc
    C:\msys64\mingw32\bin\windres.exe: Can't detect target endianness and architecture.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    0 RCDATA {0}
    --------------------------------------------------
    checking whether !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) is true... no
    --------------------------------------------------
    cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <winapifamily.h>
    #if !(!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) 
    #error  
    #endif 
    --------------------------------------------------
    x264 configure script
    Command line options: "--enable-shared" "--enable-static" "--bit-depth=8" "--extra-cflags=-I../l-smash/tmpbuild/include" "--extra-ldflags=-L../l-smash/tmpbuild/lib"
    
    checking whether gcc works... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m64  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=attributes -Werror=ignored-attributes   -lshell32 -Wl,--image-base,0x140000000 -m64  -L../l-smash/tmpbuild/lib  -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
    cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    DIED: No working C compiler found.
    On MinGW32

    Code:
    checking for -Werror=unknown-warning-option... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=unknown-warning-option   -L../l-smash/tmpbuild/lib -o conftest
    cc1.exe: error: '-Werror=unknown-warning-option': no option -Wunknown-warning-option
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=unknown-attributes... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=unknown-attributes   -L../l-smash/tmpbuild/lib -o conftest
    cc1.exe: error: '-Werror=unknown-attributes': no option -Wunknown-attributes
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=attributes... yes
    checking for -Werror=ignored-attributes... yes
    checking for -lshell32... yes
    checking whether windres works... yes
    checking whether !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) is true... no
    --------------------------------------------------
    conftest.c:1:10: fatal error: winapifamily.h: No such file or directory
        1 | #include <winapifamily.h>
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <winapifamily.h>
    #if !(!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) 
    #error  
    #endif 
    --------------------------------------------------
    x264 configure script
    Command line options: "--enable-shared" "--enable-static" "--bit-depth=8" "--extra-cflags=-I../l-smash/tmpbuild/include" "--extra-ldflags=-L../l-smash/tmpbuild/lib"
    
    checking whether gcc works... yes
    checking whether gcc supports for( int i = 0; i < 9; i++ ); with -std=gnu99... yes
    checking whether gcc supports __attribute__((force_align_arg_pointer))... yes
    checking for -mpreferred-stack-boundary=6... yes
    checking whether nasm supports vmovdqa32 [eax]{k1}{z}, zmm0... yes
    checking whether gcc supports __asm__("pabsw %xmm0, %xmm0");... yes
    checking for volatile float x = 2; return log2f(x); in math.h... yes
    checking for strtok_r(0, 0, 0); in string.h... yes
    checking for clock_gettime(CLOCK_MONOTONIC, 0); in time.h... yes
    checking for packages: libswscale libavutil... no
    Failed commandline was:
    --------------------------------------------------
    pkg-config --exists libswscale libavutil
    ./configure: line 266: pkg-config: command not found
    --------------------------------------------------
    checking for sws_init_context(0,0,0); in libswscale/swscale.h... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m32  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L -march=i686 -mfpmath=sse -msse -msse2 -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6   -Werror=attributes -Werror=ignored-attributes  -lswscale -lavutil  -lshell32 -m32  -L../l-smash/tmpbuild/lib  -Wl,--large-address-aware -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
    conftest.c:1:10: fatal error: libswscale/swscale.h: No such file or directory
        1 | #include <libswscale/swscale.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <libswscale/swscale.h>
    int main (void) { sws_init_context(0,0,0); return 0; }
    --------------------------------------------------
    checking for packages: libavformat libavcodec libavutil... no
    Failed commandline was:
    --------------------------------------------------
    pkg-config --exists libavformat libavcodec libavutil
    ./configure: line 266: pkg-config: command not found
    --------------------------------------------------
    checking for -lavformat... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m32  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L -march=i686 -mfpmath=sse -msse -msse2 -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6   -Werror=attributes -Werror=ignored-attributes -lavformat  -lshell32 -m32  -L../l-smash/tmpbuild/lib  -Wl,--large-address-aware -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
    c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lavformat
    collect2.exe: error: ld returned 1 exit status
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for av_register_all(); in libavformat/avformat.h... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m32  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L -march=i686 -mfpmath=sse -msse -msse2 -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6   -Werror=attributes -Werror=ignored-attributes    -lshell32 -m32  -L../l-smash/tmpbuild/lib  -Wl,--large-address-aware -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
    conftest.c:1:10: fatal error: libavformat/avformat.h: No such file or directory
        1 | #include <libavformat/avformat.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <libavformat/avformat.h>
    int main (void) { av_register_all(); return 0; }
    --------------------------------------------------
    checking for packages: ffms2... no
    Failed commandline was:
    --------------------------------------------------
    pkg-config --exists ffms2
    ./configure: line 266: pkg-config: command not found
    --------------------------------------------------
    checking for FFMS_DestroyVideoSource(0); in ffms.h... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m32  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L -march=i686 -mfpmath=sse -msse -msse2 -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6   -Werror=attributes -Werror=ignored-attributes  -lffms2  -lshell32 -m32  -L../l-smash/tmpbuild/lib  -Wl,--large-address-aware -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
    conftest.c:1:10: fatal error: ffms.h: No such file or directory
        1 | #include <ffms.h>
          |          ^~~~~~~~
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <ffms.h>
    int main (void) { FFMS_DestroyVideoSource(0); return 0; }
    --------------------------------------------------
    checking for FFMS_DestroyVideoSource(0); in ffms.h... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m32  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L -march=i686 -mfpmath=sse -msse -msse2 -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6   -Werror=attributes -Werror=ignored-attributes  -lffms2 -lstdc++   -lshell32 -m32  -L../l-smash/tmpbuild/lib  -Wl,--large-address-aware -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
    conftest.c:1:10: fatal error: ffms.h: No such file or directory
        1 | #include <ffms.h>
          |          ^~~~~~~~
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <ffms.h>
    int main (void) { FFMS_DestroyVideoSource(0); return 0; }
    --------------------------------------------------
    checking for packages: liblsmash... no
    Failed commandline was:
    --------------------------------------------------
    pkg-config --exists liblsmash
    ./configure: line 266: pkg-config: command not found
    --------------------------------------------------
    checking for lsmash_destroy_root(0); in lsmash.h... yes
    checking whether LSMASH_VERSION_MAJOR > 1 || (LSMASH_VERSION_MAJOR == 1 && LSMASH_VERSION_MINOR >= 5) is true... yes
    checking for uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3}; in stdint.h... yes
    checking for -fno-tree-vectorize... yes
    checking for -fno-zero-initialized-in-bss... yes
    checking for fseeko(stdin,0,0); in stdio.h... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -O3 -ffast-math -m32  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L -march=i686 -mfpmath=sse -msse -msse2 -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6  -fomit-frame-pointer -fno-tree-vectorize -fno-zero-initialized-in-bss   -Werror=attributes -Werror=ignored-attributes  -llsmash  -lshell32 -m32  -L../l-smash/tmpbuild/lib  -Wl,--large-address-aware -Wl,--dynamicbase,--nxcompat,--tsaware -o conftest
    conftest.c: In function 'main':
    conftest.c:2:19: warning: implicit declaration of function 'fseeko'; did you mean 'fseek'? [-Wimplicit-function-declaration]
        2 | int main (void) { fseeko(stdin,0,0); return 0; }
          |                   ^~~~~~
          |                   fseek
    c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\USER\AppData\Local\Temp\cc4rp7W6.o:conftest.c:(.text.startup+0x23): undefined reference to `fseeko'
    collect2.exe: error: ld returned 1 exit status
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <stdio.h>
    int main (void) { fseeko(stdin,0,0); return 0; }
    --------------------------------------------------
    checking for fseeko64(stdin,0,0); in stdio.h... yes
    checking for -Wshadow... yes
    checking for -Wmaybe-uninitialized... yes
    checking for -fvisibility=hidden... yes
    
    platform:      X86
    byte order:    little-endian
    system:        WINDOWS
    cli:           yes
    libx264:       internal
    shared:        yes
    static:        yes
    asm:           yes
    interlaced:    yes
    avs:           avisynth
    lavf:          no
    ffms:          no
    mp4:           lsmash
    gpl:           yes
    thread:        win32
    opencl:        yes
    filters:       crop select_every
    lto:           no
    debug:         no
    gprof:         no
    strip:         no
    PIC:           no
    bit depth:     8
    chroma format: all
    Quote Quote  
  8. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    This one has just worked for me:

    (after compiling L-Smash (64-bits), bien entendu)

    ./configure --host=x86_64-pc-mingw32 --enable-static --disable-opencl --bit-depth=all --enable-strip --disable-swscale --disable-lavf --disable-ffms --disable-gpac --extra-cflags="-I./z/include" --extra-ldflags="-L./z/lib"

    make


    — with "z" = a subdirectory of the x264 source-code directory, containing "include/lsmash.h", "lib/liblsmash.a" and "lib/pkgconfig/liblsmash.pc" —

    Final result:

    => x264 --help
    x264 core:161 r3015 4c2aafd
    Syntax: x264 [options] -o outfile infile

    Infile can be raw (in which case resolution is required),
    or YUV4MPEG (*.y4m),
    or Avisynth if compiled with support (yes).
    or libav* formats if compiled with lavf support (no) or ffms support (no).
    Outfile type is selected by filename:
    .264 -> Raw bytestream
    .mkv -> Matroska
    .flv -> Flash Video
    .mp4 -> MP4 if compiled with GPAC or L-SMASH support (lsmash)
    Output bit depth: 8/10


    But if you want a 32-bit executable, you'll need a 32-bit L-Smash library and then use --host=i686-pc-mingw32 in x264's ./configure.

    Hope this helps
    Last edited by El Heggunte; 4th Jul 2020 at 02:10. Reason: typo :-/
    "Programmers are human-shaped machines that transform alcohol into bugs."
    Quote Quote  
  9. Ok, it looks like I got the build, but I'm curious about those other errors it seems ignored them.

    Code:
    checking for -Werror=unknown-warning-option... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=unknown-warning-option   -L../l-smash/tmpbuild/lib -o conftest
    cc1.exe: error: '-Werror=unknown-warning-option': no option '-Wunknown-warning-option'
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=unknown-attributes... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH) -I../l-smash/tmpbuild/include -D_POSIX_C_SOURCE=200112L   -Werror=unknown-attributes   -L../l-smash/tmpbuild/lib -o conftest
    cc1.exe: error: '-Werror=unknown-attributes': no option '-Wunknown-attributes'; did you mean '-Wno-attributes'?
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=attributes... yes
    checking for -Werror=ignored-attributes... yes
    checking for -lshell32... yes
    checking whether windres works... yes
    checking whether !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) is true... no
    --------------------------------------------------
    conftest.c:3:2: error: #error 
        3 | #error
          |  ^~~~~
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <winapifamily.h>
    #if !(!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) 
    #error  
    #endif 
    --------------------------------------------------
    x264 configure script
    Command line options: "--host=i686-pc-mingw32" "--enable-static" "--disable-opencl" "--bit-depth=all" "--enable-strip" "--disable-swscale" "--disable-lavf" "--disable-ffms" "--disable-gpac" "--extra-cflags=-I../l-smash/tmpbuild/include" "--extra-ldflags=-L../l-smash/tmpbuild/lib"
    
    checking whether gcc works... yes
    checking whether gcc supports for( int i = 0; i < 9; i++ ); with -std=gnu99... yes
    checking whether gcc supports __attribute__((force_align_arg_pointer))... yes
    checking for -mpreferred-stack-boundary=6... yes
    checking whether nasm supports vmovdqa32 [eax]{k1}{z}, zmm0... yes
    checking whether gcc supports __asm__("pabsw %xmm0, %xmm0");... yes
    checking for volatile float x = 2; return log2f(x); in math.h... yes
    checking for strtok_r(0, 0, 0); in string.h... yes
    checking for clock_gettime(CLOCK_MONOTONIC, 0); in time.h... yes
    checking for packages: liblsmash... no
    Failed commandline was:
    --------------------------------------------------
    pkg-config --exists liblsmash
    --------------------------------------------------
    checking for lsmash_destroy_root(0); in lsmash.h... yes
    checking whether LSMASH_VERSION_MAJOR > 1 || (LSMASH_VERSION_MAJOR == 1 && LSMASH_VERSION_MINOR >= 5) is true... yes
    checking for uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3}; in stdint.h... yes
    checking for -fno-tree-vectorize... yes
    checking for -fno-zero-initialized-in-bss... yes
    checking for fseeko(stdin,0,0); in stdio.h... yes
    checking for -Wshadow... yes
    checking for -Wmaybe-uninitialized... yes
    checking for -fvisibility=hidden... yes
    
    platform:      X86
    byte order:    little-endian
    system:        WINDOWS
    cli:           yes
    libx264:       internal
    shared:        no
    static:        yes
    asm:           yes
    interlaced:    yes
    avs:           avisynth
    lavf:          no
    ffms:          no
    mp4:           lsmash
    gpl:           yes
    thread:        win32
    opencl:        no
    filters:       crop select_every
    lto:           no
    debug:         no
    gprof:         no
    strip:         yes
    PIC:           no
    bit depth:     all
    chroma format: all
    BTW, why does the compiled have less file size than the official release build?
    Quote Quote  
  10. No clue which releases count as official.
    Wild guess: at least lavf and ffms are usually included, sometimes even opencl support.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. Rather I mean those of VideoLan for example.
    Quote Quote  
  12. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by naoto89 View Post
    Ok, it looks like I got the build, but I'm curious about those other errors it seems ignored them.
    Well, I have no idea of why you got those error messages

    For what it's worth... I don't use Windows 10 and my MSYS2 setup doesn't use the GCC stuff provided by the MSYS2 servers (through pacman.exe),
    my GCC package is Windows-threaded and it is built through the script(s) written by Zeranoe and modified by nevcairiel.

    https://files.1f0.de/mingw/scripts/

    EDIT:

    presuming your GCC is posix-threaded, try adding the option --disable-win32thread and see if this makes some difference...
    Last edited by El Heggunte; 4th Jul 2020 at 18:11.
    "Programmers are human-shaped machines that transform alcohol into bugs."
    Quote Quote  
  13. Rather I mean those of VideoLan for example.
    Those are build with: lavf, lsmash and opencl
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  14. I think begin to understand.

    I also understand the reason why it doesn't recommend compile with GPAC, but it doesn't hurt to learn that too. I built the gpac static lib and added --extra-cflags="-I../gpac/tmpbuild/include/gpac" --extra-ldflags="-L../gpac/tmpbuild/lib" --extra-ldflags="-L../gpac/bin/gcc" to ./configure line but for some reason x264 says "mp4: no".
    Quote Quote  
  15. No clue.
    I usually use MBAS (https://github.com/m-ab-s/media-autobuild_suite) to build x264 and other tools, you might want to take a look at their build scripts.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  16. Originally Posted by Selur View Post
    No clue.
    I usually use MBAS (https://github.com/m-ab-s/media-autobuild_suite) to build x264 and other tools, you might want to take a look at their build scripts.
    In the Last year i tried to use that but always show errors and wasted time.

    Going back to the topic, x264's config.log file says one of the errors that GPAC undetectable is because it can't find "gpac/tmpbuild/include/gpac/isomedia.h". I don't understand how that file could not be generated if apparently my GPAC build didn't show errors. Newer GPAC versions no longer generate that file or what?

    EDIT:
    I already know how to get GPAC to be detected, also in the most recent versions of x264 source code you can compile it with the most current version of GPAC. Just copy the GPAC header to x264 using "cp -R ../gpac/tmpbuild/include/gpac ." before going to ./configure line.

    Just one more doubt. How do I compile with libav or lavf?
    Last edited by naoto89; 9th Jul 2020 at 11:59.
    Quote Quote  
  17. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    @naoto69: congrats for finding out how to include GPAC's muxer (mp4box) in x264.

    I also understand the reason why one doesn't recommend compile with GPAC, but it doesn't hurt to learn that too.
    Well, as I said before, GPAC is bloatware, takes ages to compile, it contains much more than MP4Box, etc., whereas L-Smash is just and only an MP4 muxing library, therefore...
    Also, GPAC is a project maintained by Linux zealots/TROLLS — therefore...

    Why the x264 devs still haven't included an MP4 muxer in their source-code is beyond me
    Why having "native" Matroska and FLV muxers is okay but a "native" MP4 muxer is not?

    Just one more doubt. How do I compile with ffms or lavf?
    Hope someone who knows more than I do will chime in
    "Programmers are human-shaped machines that transform alcohol into bugs."
    Quote Quote  
  18. Based on what I read, FFmpeg must be compiled for load "libavformat" and even "swscale" on x264.

    I thought just putting that "--extra-cflags=-I../ffmpeg/tmpbuild/include --extra-ldflags=-L../ffmpeg/tmpbuild/lib" was enough, but it seems not.

    EDIT:
    When compile FFmpeg with

    Code:
    ./configure --prefix=tmpbuild --disable-network --disable-debug --disable-yasm --enable-gpl --enable-libx264 --enable-static --extra-cflags=-I./tmpbuild/include --extra-ldflags='-L./tmpbuild/lib -static' --extra-cflags=-I../x264/tmpbuild/include --extra-ldflags=-L../x264/tmpbuild/lib && make && make install
    This message appears in yellow.

    Code:
    WARNING: using libx264 without pkg-config
    
    But if I add "--enable-shared" to ./configure line, this error appears.

    Code:
    C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.1.0/../../../../i686-w64-mingw32/bin/ld.exe: libavcodec/bintext.o:bintext.c:(.text.unlikely+0x149): undefined reference to `_imp__avpriv_cga_font'
    C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.1.0/../../../../i686-w64-mingw32/bin/ld.exe: libavcodec/bintext.o:bintext.c:(.text.unlikely+0x153): undefined reference to `_imp__avpriv_vga16_font'
    C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.1.0/../../../../i686-w64-mingw32/bin/ld.exe: libavcodec/tmv.o:tmv.c:(.text+0x16f): undefined reference to `_imp__avpriv_cga_font'
    collect2.exe: error: ld returned 1 exit status
    make: *** [ffbuild/library.mak:103: libavcodec/avcodec-58.dll] Error 1
    I looked for some solution, but it's not related to this. I feel like 2 errors but I have no idea what cause is or what I did wrong.
    Last edited by naoto89; 9th Jul 2020 at 22:49.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!