LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64
User Name
Password
slarm64 This forum is for the discussion of slarm64.

Notices


Reply
  Search this Thread
Old 10-26-2022, 03:54 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Compiling ffmpeg


I decided to have a go at this to get libx265 going here on my RazPi. VLC seems to read them, but conversions are a problem.

I grabbed the source, ran 'ffmpeg -buildconf' in one terminal, and pasted the ./configure options into another. I hit 2 problems so far
  1. It complained about '--enable-avresample' not being a valid option. Figuring it might be a version thing, I removed the option.
  2. libdrm was not found by pkgconfig. I put a symlink in /usr/lib, as nothing was there, and it's is/was the pkgconfig default, but no dice. So I added the option '--with-pkgconfig-path=/usr/lib64/pkgconfig' but that didn't work either. Yet I can see libdrm.pc and loads of libdrm -something files also.

Any ideas? I still have the original ffmpeg (4.4.1), so this is no major emergency, just an annoyance.
 
Old 10-26-2022, 04:29 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
The only thing that I can tell you, if it helps.

ffmpeg in the arch repo, which will encode to x265, has this.
Code:
build() {
  cd ffmpeg
  ./configure \
    --prefix=/usr \
    --disable-debug \
    --disable-static \
    --disable-stripping \
    --enable-amf \
    --enable-avisynth \
    --enable-cuda-llvm \
    --enable-lto \
    --enable-fontconfig \
    --enable-gmp \
    --enable-gnutls \
    --enable-gpl \
    --enable-ladspa \
    --enable-libaom \
    --enable-libass \
    --enable-libbluray \
    --enable-libbs2b \
    --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-librav1e \
    --enable-librsvg \
    --enable-libsoxr \
    --enable-libspeex \
    --enable-libsrt \
    --enable-libssh \
    --enable-libsvtav1 \
    --enable-libtheora \
    --enable-libv4l2 \
    --enable-libvidstab \
    --enable-libvmaf \
    --enable-libvorbis \
    --enable-libvpx \
    --enable-libwebp \
    --enable-libx264 \
    --enable-libx265 \
    --enable-libxcb \
    --enable-libxml2 \
    --enable-libxvid \
    --enable-libzimg \
    --enable-nvdec \
    --enable-nvenc \
    --enable-opencl \
    --enable-opengl \
    --enable-shared \
    --enable-version3 \
    --enable-vulkan
Code:
ffmpeg
ffmpeg version n5.1.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --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-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
Code:
ffmpeg -t 00:00:20 -i MyFile.mp4 -c:a copy -c:v libx265 -b:v 1000k -s 640x360 test.mp4

ffprobe test.mp4
...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf59.27.100
  Duration: 00:00:20.02, start: 0.000000, bitrate: 1023 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 885 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn (default)
I can't tell you anything about ffmpeg on Slack or Slarm64.
 
Old 10-27-2022, 05:20 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
ffmpeg isn't slow to tell you. This is my current one on the RazPi.
Code:
dec@SparrowFart:~$ ffmpeg -buildconf
ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-4.4.1/html \
--mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-gpl --enable-version3 --enable-avresample \
--arch=aarch64 --disable-encoder=aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls \
--enable-libbluray --enable-libcaca --enable-libcdio --enable-frei0r --enable-openal --enable-libopus --enable-libspeex \
--enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp \
--enable-libmp3lame --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libpulse --enable-libsmbclient \
--enable-libxml2 --enable-librsvg --enable-libdrm
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
That's taken from an ssh session with my Razpi. The hostname here isn't SparrowFart!

tmat returns
Code:
Unknown option "--enable-avresample".
See ./configure --help for available options.
When I remove that, I get
Code:
ERROR: libdrm not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
dec@SparrowFart:~/Downloads/ffmpeg$
But I have libdrm-2.4.109 in pkgconfig
Code:
dec@SparrowFart:~/Downloads/ffmpeg$ ls /usr/lib64/pkgconfig/libdrm*
/usr/lib64/pkgconfig/libdrm.pc         /usr/lib64/pkgconfig/libdrm_freedreno.pc  /usr/lib64/pkgconfig/libdrm_radeon.pc
/usr/lib64/pkgconfig/libdrm_amdgpu.pc  /usr/lib64/pkgconfig/libdrm_nouveau.pc    /usr/lib64/pkgconfig/libdrm_vc4.pc
dec@SparrowFart:~/Downloads/ffmpeg$
I have the latest source from the site. Next time I'm on the box, I'll go looking for the Git and try that. It's not my error. My typing is terrible, so I copy & paste where possible, and with ffmpeg it is.
 
Old 10-27-2022, 11:50 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Solved.

I didn't have to do this, because there was a package up on ~current. I even found the Slackbuild, but that was for 4.4.x. The version number is now 5.1.2, which signifies a compatability break often. I'd expect changes.

Just for the record, I removed the --enable-libdrm option, and it started bellyaching about pulseaudio It's departing from reality at this point, and I'm left wondering about the build environment.
 
Old 10-31-2022, 04:06 AM   #5
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Rep: Reputation: Disabled
Only just spotted this - apologies!

I've got 5.1.2 working fine here, along with x265 - though it is a bit slow (compared to x86_64).

I used the source package from Slackware64-current (its under libraries) and modified the build script to encompass aarch64 by adding the following lines:
Code:
elif [ "$ARCH" = "aarch64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
It built fine, auto-detecting whether pulseaudio is present or not.

Just download the slackware64-current source package from your favourite repository (I use Slackware.uk, being in the UK) and add the lines suggested above to the slackbuild after the "arch=x86_64" section.

--
Pete
 
Old 10-31-2022, 04:39 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I've moved on a bit since, but didn't bother updating since I had marked it solved.

The ffmpeg(5.1.2) on current wouldn't work, complaining of a glibc thing. I certainly knew better than to go there. So I reinstalled 4.4.1 from slackware-15.0. No libx265 action there.

There's an increasing difference between extra packages on slarm64 - things I may want, but are not on the slackware dvd, vlc & libx265 being examples. So I decided to keep my "Just in case" MMC card on current. The MM card is booting now. I'm just arguing with it about adding a user who can log in. My memory is that I won last night, but things were hectic because the dog was freaking out over the Halloween fireworks.

It's par for the course for the first few compiles to be rough on any system until you find the niggles and get confidence in the system. I haven't done that yet. Is there a full compliment of compilers/debuggers/utilities (e.g. m4) on the current releases?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Issues:Compiling FFMPEG souce code on Visual Studio 2010 JAYANTHI Linux - Newbie 1 11-07-2013 10:41 PM
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avformat_alloc_context YeeHaa4LINUX Linux - Software 2 10-16-2009 11:09 PM
Help me in installing ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encod mitesh.ever Red Hat 5 05-16-2009 12:14 PM
Does the latest version of ffmpeg not work with ffmpeg-php? whitey4900 Linux - Software 0 08-04-2008 05:16 PM

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

All times are GMT -5. The time now is 03:10 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
Open Source Consulting | Domain Registration