Newest 'libx264' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to fix the "No working C compiler found." problem for compiling x264 in Linux ?

    27 février 2023, par gc xu

    Firstly I have read all other solutions related to this problem, including adding path and reinstall yasm, nasm, gcc... I git clone the source code from https://code.videolan.org/videolan/x264.git. Then, I run command ./configure, it shows

    ./configure: line 169: conftest.log: Invalid argument
    ./configure: line 169: conftest.log: Invalid argument
    ./configure: line 169: conftest.log: Invalid argument
    ./configure: line 169: conftest.log: Invalid argument
    No working C compiler found.
    

    I check the file "config.log". It shows:

    checking for -Werror=unknown-warning-option... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH)   -Werror=unknown-warning-option   -o conftest
    cc1: 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)   -Werror=unknown-attributes   -o conftest
    cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=attributes... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH)   -Werror=attributes   -o conftest
    cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -Werror=ignored-attributes... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c  -Wall -I. -I$(SRCPATH)   -Werror=ignored-attributes   -o conftest
    cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    x264 configure script
    Command line options: "--enable-shared" "--enable-static"
    
    checking whether gcc works... no
    Failed commandline was:
    --------------------------------------------------
    gcc conftest.c -m64  -Wall -I. -I$(SRCPATH)     -m64  -lm -o conftest
    cc1: error: ‘-Werror=unknown-warning-option’: no option -Wunknown-warning-option
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    DIED: No working C compiler found.
    

    Plus I wonder is there something to do with nasm? Becasuse I install nasm with some C grammer problems:

    ./config/config.h:659:16: error: duplicate ‘unsigned’
      659 | #define size_t unsigned int
          |                ^~~~~~~~
    ./config/config.h:659:25: error: two or more data types in declaration specifiers
      659 | #define size_t unsigned int
          |                         ^~~
    In file included from /usr/include/string.h:633,
                     from ./include/compiler.h:89,
                     from asm/nasm.c:38:
    ./include/compiler.h:241:7: error: expected identifier or ‘(’ before ‘__extension__’
      241 | char *strsep(char **, const char *);
          |       ^~~~~~
    ./include/compiler.h:241:7: error: expected identifier or ‘(’ before ‘)’ token
      241 | char *strsep(char **, const char *);
          |       ^~~~~~
    make[1]: *** [asm/nasm.o] Error 1
    make[1]: Leaving directory `/mnt/nfs0/gengcheng/ffmpeg-5.0.2/nasm-2.15.05'
    make: *** [all] Error 2
    

    I have read all other solutions related to this problem, including adding path and reinstall yasm, nasm, gcc... I want to install x264 to configure it in ffmpeg. Thanks for all your answers!

  • How to use x264 encoder in Ant Media Server v2.5

    26 février 2023, par faraway

    Ant Media Server starts to use OpenH264 as a software encoder in v2.5 but I need to use x264. How can I use x264 in Ant Media Server v2.5?

    https://github.com/ant-media/Ant-Media-Server/releases/tag/ams-v2.5.0 https://antmedia.io

  • FFMPEG Flutter - Generating video from images not playing on default android video players

    17 février 2023, par Abdullah Riaz

    I'm trying to generate a video from multiple image files in FFMPEG Flutter. I'm using https-gpl package.

    ffmpeg_kit_flutter_https_gpl: 5.1.0
    

    I'm using this command.

     "-f concat -safe 0 -protocol_whitelist file,http,https,tcp,tls,crypto -i $filePath -stream_loop -1 -i $musicFile -vf 'scale=3840:2880:force_original_aspect_ratio=decrease,pad=3840:2880:(ow-iw)/2:(oh-ih)/2,setsar=1' -r 6 -c:v libx264 -crf 40 -profile:v main -preset veryfast -pix_fmt yuv420p -t $totalTime $outputFilePath"
    

    Where you can clearly see, I'm encoding video in libx264 with yuv420p.

    The thing is, the video is created successfully and played smoothly on the VLC. But it doesn't show anything on normal/default android video players although it plays the audio.

    I've tried multiple things but all failed to run video on default android video players. I've even tried multiple android phones. What am I doing wrong here?

  • libx264 codec not enabled in ffmpeg ubuntu 18.04

    18 janvier 2023, par Bendemann

    I have some weird codec installation issues with the following docker image.

    ARG PYTORCH="1.8.0"
    ARG CUDA="11.1"
    ARG CUDNN="8"
    FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
    
    ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 8.0+PTX"
    ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
    ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
    
    # https://github.com/NVIDIA/nvidia-docker/issues/1632
    RUN apt-key del 7fa2af80
    RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
    RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/7fa2af80.pub
    
    RUN apt-get update && apt-get install -y \
            git nano ninja-build p7zip-full imagemagick wget unzip \
            libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg \
            libxrender1 libfontconfig1 freeglut3-dev llvm-6.0-tools curl \
            amqp-tools ffmpeg libx264-dev \
        && apt --fix-broken install \
        && apt-get clean \
        && rm -rf /var/lib/apt/lists/* \
        # for visualizing
        && wget https://github.com/mmatl/travis_debs/raw/master/xenial/mesa_18.3.3-0.deb \
        && dpkg -i ./mesa_18.3.3-0.deb || true \
        && apt install -f \
        && git clone https://github.com/mmatl/pyopengl.git \
        && pip install ./pyopengl
    

    First of all, libx264 is supposed to be installed by a simple apt-get install ffmpeg in ubuntu 18.04.5. Indeed I see that it is being installed in the installation instructions but for some reason, it's not enabled. This is confirmed when running ffmpeg -codecs | grep 264, which doesn't show libx264 (only h264, libopenh264 are there).

    In addition, I also compiled from source, explicitly enabling libx264 during installation. It didn't make a difference.

  • Lib x : display problem related to window pixel color changes with the mlx_put_pixel() function [closed]

    15 janvier 2023, par Jordan Riga

    I'm stuck on a project that I have to return for school. I have to make a 3D game with the minilibx in C, the problem being that I try to make the graphic part work but it doesn't work (display pixels on the screen). And all this same with the examples that I found of school 42 on the internet in that link https://harm-smits.github.io/42docs/libs/minilibx. All configuration has been done.

    Could there be a possible configuration problem? I'm working on Kali Linux (Even using a VM on Ubuntu it didn't work).

    In short my question is what can be the different reasons why the graphical part of minilibx independently of events, loops and etc does not work without errors ?