Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
06-26-2020, 05:20 PM
|
#1
|
Senior Member
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,705
Rep:
|
ffmpeg Unknown encoder 'libx264'
In addition to my recent ffmpeg post ( https://www.linuxquestions.org/quest...75#post6138275) I have another issue. I've tried:
Code:
ffmpeg -f image2 -r 1/5 -pattern_type glob -i './*.[jJ]*' -c:v libx264 -pix_fmt yuv420p out.mp4
Unknown encoder 'libx264'
I've downloaded and installed package x264 from SlackBuilds (via sbopkg), and re-installed package ffmpeg from SlackBuild. libx264 is in:
Code:
-rwxr-xr-x 1 root root 1019528 Jun 26 16:33 /usr/lib64/libx264.so.148
lrwxrwxrwx 1 root root 14 Jun 26 16:33 /usr/lib64/libx264.so -> libx264.so.148
So, why is ffmpeg giving me this error?
|
|
|
06-26-2020, 05:23 PM
|
#2
|
Senior Member
Registered: Mar 2010
Posts: 4,417
|
Quote:
Originally Posted by mfoley
In addition to my recent ffmpeg post ( https://www.linuxquestions.org/quest...75#post6138275) I have another issue. I've tried:
Code:
ffmpeg -f image2 -r 1/5 -pattern_type glob -i './*.[jJ]*' -c:v libx264 -pix_fmt yuv420p out.mp4
Unknown encoder 'libx264'
I've downloaded and installed package x264 from SlackBuilds (via sbopkg), and re-installed package ffmpeg from SlackBuild. libx264 is in:
Code:
-rwxr-xr-x 1 root root 1019528 Jun 26 16:33 /usr/lib64/libx264.so.148
lrwxrwxrwx 1 root root 14 Jun 26 16:33 /usr/lib64/libx264.so -> libx264.so.148
So, why is ffmpeg giving me this error?
|
Because of the greedy Hollywood barons.
It is not legal to ship some particular codecs unless you pay royally for them, and that happens specially and particularly in USA.
|
|
|
06-26-2020, 05:47 PM
|
#3
|
LQ Guru
Registered: Oct 2004
Distribution: Arch
Posts: 5,345
|
ffmpeg has to have x264 support compiled in. It usually does.
Code:
ffmpeg -codecs
...
DEV.L. h263p H.263+ / H.263-1998 / H.263 version 2
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_omx h264_qsv h264_v4l2m2m h264_vaapi nvenc nvenc_h264 )
D.VIL. hap Vidvox Hap
DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_v4l2m2m hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_qsv hevc_v4l2m2m hevc_vaapi )
...
Also when you launch ffmpeg
Code:
ffmpeg
ffmpeg version n4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.1.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265....
|
|
1 members found this post helpful.
|
06-26-2020, 05:51 PM
|
#4
|
Senior Member
Registered: Mar 2010
Posts: 4,417
|
The Slackware does not ships H264 encoders, only H264 decoders. Because of reasons.
|
|
1 members found this post helpful.
|
06-26-2020, 05:56 PM
|
#5
|
Senior Member
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,224
|
Quote:
Originally Posted by mfoley
I've downloaded and installed package x264 from SlackBuilds (via sbopkg), and re-installed package ffmpeg from SlackBuild. So, why is ffmpeg giving me this error?
|
Did you pass X264=yes to the script before building? For whatever reason, the ffmpeg build doesn't auto-detect these optional deps.
|
|
1 members found this post helpful.
|
06-26-2020, 06:01 PM
|
#6
|
LQ Guru
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792
|
Did you enable x264 when compiling ffmpeg? It doesn't autodetect things, so you're forced to pass flags to enable/disable certain features. Per the README, x264 encoder support requires passing X264=yes to the SlackBuild (and installing x264).
You can check your available encoders by running ffmpeg -encoders and if the output is a bit overwhelming, you can pipe the info and grep for 264 ( ffmpeg -encoders | grep 264)
EDIT: drgibbon beat me to it.
|
|
1 members found this post helpful.
|
06-26-2020, 06:14 PM
|
#7
|
Senior Member
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,224
|
Quote:
Originally Posted by bassmadrigal
EDIT: drgibbon beat me to it.
|
Haha sorry, it seems I keep doing that
|
|
|
06-26-2020, 08:18 PM
|
#8
|
Senior Member
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,705
Original Poster
Rep:
|
Output to ffmpeg -encoders | grep 264:
Code:
ffmpeg -encoders | grep 264
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.5.0 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-3.2.4/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-gpl --enable-version3 --enable-avresample --arch=x86_64 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libcaca --enable-libcdio --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-opengl --enable-libopenjpeg --enable-libpulse --enable-libsmbclient --enable-libwavpack --enable-x11grab
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
V..... h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... h264_vaapi H.264/AVC (VAAPI) (codec h264)
V..... nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264)
It certainly seems to list h364, but I still get that error. Meanwhile, I'll try building with X264=yes and see what happens.
|
|
1 members found this post helpful.
|
06-26-2020, 11:13 PM
|
#9
|
LQ Guru
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792
|
You don't have libx264 as an encoder option. Compare your output to mine:
Code:
jbhansen@craven-moorhead:~$ ffmpeg -encoders | grep 264
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.5.0 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-3.2.4/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-gpl --enable-version3 --enable-avresample --arch=x86_64 --enable-nonfree --enable-libschroedinger --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libcaca --enable-libcdio --enable-libdc1394 --enable-frei0r --enable-libgme --enable-libiec61883 --enable-libilbc --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-opengl --enable-libopenjpeg --enable-libpulse --enable-libsmbclient --enable-openssl --enable-libwavpack --enable-x11grab
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
V..... h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... h264_vaapi H.264/AVC (VAAPI) (codec h264)
V..... nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264)
|
|
2 members found this post helpful.
|
07-02-2020, 02:27 PM
|
#10
|
Senior Member
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,705
Original Poster
Rep:
|
Thanks all for the feedback. At the moment, I'm not that into this project enough to modify builds, etc. I'm going to move on and not deal with this one further.
|
|
|
07-02-2020, 03:33 PM
|
#11
|
Senior Member
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,224
|
All good. If anyone has this problem on the latest Slack you can fix it like this (assuming you installed x264 already):
Code:
rsync -avz rsync://mirrors.kernel.org/slackware/slackware-current/source/l/ffmpeg .
cd ffmpeg
su
X264=yes sh ./mirror/ffmpeg.SlackBuild
And then upgradepkg on the output (check the SlackBuild for other compile time environment vars, I really don't know why ffmpeg can't autodetect that stuff though ).
Alternatively slackpkg+ and alienbob's restricted ffmpeg would be an easier method in the long run.
Last edited by drgibbon; 07-02-2020 at 04:55 PM.
|
|
|
07-02-2020, 04:39 PM
|
#12
|
LQ Guru
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792
|
Quote:
Originally Posted by drgibbon
I really don't know why ffmpeg can't autodetect that stuff though ).
|
This has been a major head scratcher for me too. I've been thinking about tweaking the SlackBuild script to add in autodetection and then submit it to the maintainer, but it's been low on my priority list.
Quote:
Originally Posted by drgibbon
Alternatively slackpkg+ and alienbob's unrestricted ffmpeg would be an easier method in the long run.
|
Just to clarify, you'd want the "restricted" ffmpeg that Alien Bob offers, as that includes support for various things that have patent restrictions (like x264 encoding).
https://bear.alienbase.nl/mirrors/pe...builds/ffmpeg/
|
|
|
07-02-2020, 04:55 PM
|
#13
|
Senior Member
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,224
|
Oops, yes, "restricted"
|
|
|
06-02-2021, 02:17 AM
|
#14
|
Member
Registered: Jun 2009
Location: Brasília, Brazil
Distribution: Slackware64 14.2
Posts: 39
Rep:
|
Sorry for necroposting, but I've made an improvement on this script to auto detect some libraries.
It's not complete, but maybe we could finish this list and send to the maintainer. The missing parts are marked with a #TODO comment
The following lines can be added just before the comments I've kept at the end.
Code:
LAME=$(/sbin/ldconfig -p | grep libmp3lame\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
X264=$(/sbin/ldconfig -p | grep libx264\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
CELT=$(/sbin/ldconfig -p | grep libcelt0\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
DC1394=$(/sbin/ldconfig -p | grep libdc1394\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
#TODO FREI0R libfrei0r
GSM=$(/sbin/ldconfig -p | grep libgsm\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
RTMP=$(/sbin/ldconfig -p | grep librtmp\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
SCHROEDINGER=$(/sbin/ldconfig -p | grep libschroedinger-1.0\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
SPEEX=$(/sbin/ldconfig -p | grep libspeex\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
XVID=$(/sbin/ldconfig -p | grep libxvidcore\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
BLURAY=$(/sbin/ldconfig -p | grep libbluray\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
ASS=$(/sbin/ldconfig -p | grep libass\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
OPENAL=$(/sbin/ldconfig -p | grep libopenal\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
IEC61883=$(/sbin/ldconfig -p | grep libiec61883\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
ILBC=$(/sbin/ldconfig -p | grep libilbc\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
MODPLUG=$(/sbin/ldconfig -p | grep libmodplug\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
OPUS=$(/sbin/ldconfig -p | grep libopus\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
TWOLAME=$(/sbin/ldconfig -p | grep libtwolame\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
#TODO LADSPA ladspa
#TODO FLITE libflite
VIDSTAB=$(/sbin/ldconfig -p | grep libvidstab\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
X265=$(/sbin/ldconfig -p | grep libx265\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
ZVBI=$(/sbin/ldconfig -p | grep libzvbi\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
#TODO OPENCV libopencv
#TODO GME libgme
SNAPPY=$(/sbin/ldconfig -p | grep libsnappy\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
WEBP=$(/sbin/ldconfig -p | grep libwebp\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
#TODO ZMQ libzmq
#TODO BS2B libbs2b
#TODO EBUR128 libebur128
RUBBERBAND=$(/sbin/ldconfig -p | grep librubberband\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
#TODO TESSERACT tesseract
#TODO NETCDF netcdf
CHROMAPRINT=$(/sbin/ldconfig -p | grep libchromaprint\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
OPENCORE=$(/sbin/ldconfig -p | grep libopencore-amrnb\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
FDK_AAC=$(/sbin/ldconfig -p | grep libfdk-aac\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
OPENSSL=$(/sbin/ldconfig -p | grep libssl\.so\ | grep /usr/lib${LIBDIRSUFFIX}/ | grep . >> /dev/null && echo yes)
#TODO DECKLINK decklink
# You can enable a lot of optional (not-autodetected) features by
# passing variables to the script (VAR=yes/no ./ffmpeg.SlackBuild).
# Unfortunately ffmpeg's configure doesn't support --enable-feature=yes
# syntax, so we have to do it the complicated way :/
# Additional optional (autodetected) dependencies are:
# - jack
# - libva
# - libvdpau
# - libX11
# - libxcb
# - sdl2
# - xz
# - zlib
|
|
|
06-02-2021, 03:35 AM
|
#15
|
Senior Member
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,224
|
Quote:
Originally Posted by Weber Kai
Sorry for necroposting, but I've made an improvement on this script to auto detect some libraries.
It's not complete, but maybe we could finish this list and send to the maintainer. The missing parts are marked with a #TODO comment
|
See this post for some other ideas (using pkg-config).
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 09:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|