LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-26-2020, 04:20 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,765

Rep: Reputation: 137Reputation: 137
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?
 
Old 06-26-2020, 04:23 PM   #2
LuckyCyborg
Member
 
Registered: Mar 2010
Posts: 650

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
Quote:
Originally Posted by mfoley View Post
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.
 
Old 06-26-2020, 04:47 PM   #3
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,913

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
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.
Old 06-26-2020, 04:51 PM   #4
LuckyCyborg
Member
 
Registered: Mar 2010
Posts: 650

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
The Slackware does not ships H264 encoders, only H264 decoders. Because of reasons.
 
1 members found this post helpful.
Old 06-26-2020, 04:56 PM   #5
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 -current
Posts: 676

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
Quote:
Originally Posted by mfoley View Post
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.
Old 06-26-2020, 05:01 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,151

Rep: Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818
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.
Old 06-26-2020, 05:14 PM   #7
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 -current
Posts: 676

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
Quote:
Originally Posted by bassmadrigal View Post
EDIT: drgibbon beat me to it.
Haha sorry, it seems I keep doing that
 
Old 06-26-2020, 07:18 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,765

Original Poster
Rep: Reputation: 137Reputation: 137
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.
Old 06-26-2020, 10:13 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,151

Rep: Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818
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.
Old 07-02-2020, 01:27 PM   #10
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,765

Original Poster
Rep: Reputation: 137Reputation: 137
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.
 
Old 07-02-2020, 02:33 PM   #11
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 -current
Posts: 676

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
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 03:55 PM.
 
Old 07-02-2020, 03:39 PM   #12
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,151

Rep: Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818Reputation: 4818
Quote:
Originally Posted by drgibbon View Post
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 View Post
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/
 
Old 07-02-2020, 03:55 PM   #13
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 -current
Posts: 676

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
Oops, yes, "restricted"
 
  


Reply

Tags
ffmpeg, x264


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ffmpeg: Unknown encoder 'libmp3lame' maschelsea Linux - Software 13 01-30-2017 02:36 AM
LINUX UBUNTU PHP FFMPEG INSTALLED BUT libx264 while installing ERROR??? trinay123 Ubuntu 2 03-13-2010 10:22 AM
slack13_64 - FFMPEG's "libx264 not found" error erickFis Slackware 24 11-14-2009 08:12 PM
[FFMPEG] Error with libx264 not found nikhil010586 Linux - Software 11 09-23-2009 03:48 AM
dependency issue: libx264.so.54 needed by ffmpeg PhilTR Fedora 22 01-23-2007 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration