Ffmpeg present two times in Manjaro?

Hello all,

trying to compile a program against ffmpeg, I encountered that there seem to be two versions of that package installed in parallel:

$ pacman -Qs ffmpeg
local/ffmpeg 2:5.0-7
    Complete solution to record, convert and stream audio and video
local/ffmpeg4.4 4.4.1-5
    Complete solution to record, convert and stream audio and video

I am just wondering why there seem to be no conflicts at that point.

Some applications do not support ffmpeg 5.0 yet, so Arch created an ffmpeg4.4 package for compatibility reasons.

Thank you, that makes sense, indeed.

But when I want to compile a program written for ffmpeg 4.4, how do I direct the build process to use that package instead of 5.0?

Example: I wanted to compile chromium against the system ffmpeg. However, it seems that it is using the 5.0 includes by default, resulting in errors like

error: no member named 'channel_layout' in 'AVFrame'

This is because of a recent change, channel_layout is deprecated and was replaced by ch_layout. Unfortunately, they are of different types (while channel_layout was uint64, ch_layout is a more complex struct).

If you want to build against ffmpeg 4.4, you’ll need to specify it in the build() function:

export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'

I just built chromium in the last few days against ffmpeg 5.0 just fine.

That’s reassuring. Which version did you use?
Reason for asking: In 103.0.5057.0, for example, some changes were applied which broke the ability to build the browser against system ffmpeg:
I had to revert this commit entirely, and additionally, had to apply the patches proposed at https://chromium-review.googlesource.com/c/chromium/src/+/3525614 - to get Chromium to compile against system ffmpeg.

I’ve built 101.0.4951.41, 101.0.4951.54 and 101.0.4951.64 recently.

Meanwhile, I got Chromium 103.0.5057.0 to compile against Manjaro’s ffmpeg-5.0 system package.
As discussed, https://chromium-review.googlesource.com/c/chromium/src/+/3565647 broke the ability to build against system ffmpeg as it introduces several changes only present in the ffmpeg development branch.
More detail: 1325301 - chromium - An open-source project to help move the web forward. - Monorail and subsequent comments.