skip to Main Content

I’m trying to stream MP4 videos from my server to YouTube and so I installed FFMPEG version. When I then look at the configuration of FFMPEG, I am then presented with the following:

ffmpeg version 3.3.6 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --enable-cross-compile --arch=i686 --target-os=linux --disable-yasm --disable-static --enable-shared --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libsoxr --enable-version3 --enable-nonfree --enable-openssl --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-decoder=eac3 --disable-decoder=dca --disable-decoder=truehd --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-encoder=dca --disable-decoder=hevc --disable-decoder=hevc_cuvid --disable-encoder=hevc_nvenc --disable-encoder=nvenc_hevc --extra-ldflags='-L/root/daily_build/64_05/4.4.1/LinkFS/usr/lib -L/root/daily_build/64_05/4.4.1/Model/TS-X72/build/RootFS/usr/local/medialibrary/lib -Wl,--rpath -Wl,/usr/local/medialibrary/lib' --extra-cflags='-I/root/daily_build/64_05/4.4.1/LinkFS/usr/include -I/root/daily_build/64_05/4.4.1/Model/TS-X72/build/RootFS/usr/local/medialibrary/include -D_GNU_SOURCE -DQNAP' --prefix=/root/daily_build/64_05/4.4.1/Model/TS-X72/build/RootFS/usr/local/medialibrary
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100

However, when I then try

ffmpeg ---enable-libx264

I then get an error saying:

Unrecognized option '--enable-libx264'.
Error splitting the argument list: Option not found

Do I need to change the configuaration of FFMPEG somehow or run another configuration option first or is there just something wrong with my call to enable libx264?

2

Answers


  1. You are using a version that doesn’t have libx264 support (Like Nikos mentioned) (which is rather old as well)

    You must recompile it with the needed codec(s).

    You could try using the below script, or compile it yourself.

    I would recommend since will need to build your own, that you also add support for hardware encoders/decoders if you have a recent NVIDIA card –enable-nvenc and use h264_nvenc instead of libx264 for encoding to reduce CPU overhead.

    Final thought – Would OBS fulfill your needs?


    OBS streaming info

    https://www.digitaltrends.com/computing/how-to-live-stream-on-youtube-with-obs/

    Compiling info..

    https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

    Script

    https://gist.github.com/silverkorn/db5451f836e2bf9dea2a8358475eb5f4

    Login or Signup to reply.
  2. Your ffmpeg already has libx264 enabled. Refer to the configuration line and you can see --enable-libx264 is listed.

    To use it:

    ffmpeg -i input -c:v libx264 output.mp4
    

    To stream a MP4 file to YouTube:

    ffmpeg -re -i input.mp4 -c:v libx264 -preset veryfast -b:v 4000k -maxrate 4000k -bufsize 8000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://youtube
    

    From FFmpeg Wiki: Streaming.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search