0

I am new to centos7. I installed the FFmpeg for converting mp3 files to opus (Telegram Bot). However, I tried many ways to install it, every time I got the same errors!

For example, I used these commands for installing and compiling the FFmpeg. Here is my result:

[root@ip154 nasm-2.14.02]# ffmpeg ffmpeg version 3.4.8 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

As one can see the --enable-libopus --disable-encoder=libopus is in the result.

When I run this:

ffmpeg -i /var/www/html/test.mp3 -ac 1 -map 0:a -strict -2 -codec:a opus /var/www/html/0912645.ogg

The result is Segmentation fault!

And this code:

ffmpeg -i /var/www/html/test.mp3 -c:a libopus -compression_level 10 /var/www/html/hello.ogg

The result is Unknown encoder 'libopus'!

I don't know what to do!!!!

2
  • 1
    --enable-libopus --disable-encoder=libopus doesn't make much sense. You have probably have two versions of ffmpeg installed. The broken ffmpeg you are executing is different than the version that you get from the instructions in the link you followed (which is basically just a copy of FFmpeg Wiki: CentOS). In some cases the shell is just remembering the location of the old version, so that is why the Wiki suggests running hash -d ffmpeg after installation. You can try doing that or check the path that the bot is using to run ffmpeg.
    – llogan
    Commented Jan 16, 2021 at 22:18
  • Thanks. You are right!
    – Ali Lord
    Commented Jan 18, 2021 at 21:08

1 Answer 1

1

You have two versions of ffmpeg installed. The broken ffmpeg you are executing is different than the version that you get from the instructions in the link you followed (which is basically just a copy of FFmpeg Wiki: CentOS).

In some cases the shell is just remembering the location of the old version, so that is why the Wiki suggests running hash -d ffmpeg after installation. You can try doing that.

Or check the path that the bot is using to run ffmpeg. It might be pointing to the old, broken ffmpeg.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .