Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722274 - media-video/ffmpeg - libavresample is deprecated since 2017
Summary: media-video/ffmpeg - libavresample is deprecated since 2017
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on: 722296
Blocks:
  Show dependency tree
 
Reported: 2020-05-10 21:42 UTC by jospezial
Modified: 2024-01-17 11:18 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2020-05-10 21:42:05 UTC
> or = ffmpeg-4.1.3 ebuilds show
WARNING: Building with deprecated library libavresample
in configure phase.

# Mandatory configuration
	myconf=(
		--enable-avfilter
		--enable-avresample
		--disable-stripping


https://github.com/FFmpeg/FFmpeg/commit/c29038f3041a4080342b2e333c1967d136749c0f
"lavr: deprecate the entire library

Deprecate the entire library. Merged years ago to provide compatibility
with Libav, it remained unmaintained by the FFmpeg project and duplicated
functionality provided by libswresample.

In order to improve consistency and reduce attack surface, as well as to ease
burden on maintainers, it has been deprecated. Users of this library are asked
to migrate to libswresample, which, as well as providing more functionality,
is faster and has higher accuracy."


Please remove --enable-avresample (defaults to "no") or add an USE flag for it.
libswresample is built by default.

If there are any packages still depending on lavr then we can make a tracker bug of this after the change.
Comment 1 Alexis Ballier gentoo-dev 2020-06-05 15:46:53 UTC
do we have any package still needing this ?
Comment 2 jospezial 2020-06-05 16:13:57 UTC
(In reply to Alexis Ballier from comment #1)
> do we have any package still needing this ?

media-video/transcode-1.1.7-r4
https://bugs.gentoo.org/show_bug.cgi?id=722296
was the only one that needed a patch when I rebuilt the installed packages depending on ffmpeg.

Let's find it out.
Comment 3 jospezial 2020-08-13 21:37:25 UTC
After some months of testing with disabled avresample and with now fixed transcode bug I see no problems on my system.

Please go ahead and remove the config option setting.
Comment 4 Alexis Ballier gentoo-dev 2020-11-19 21:19:53 UTC
alsa-plugins still seems to use it at least
Comment 5 jospezial 2020-11-20 12:07:12 UTC
(In reply to Alexis Ballier from comment #4)
> alsa-plugins still seems to use it at least

But configure of media-plugins/alsa-plugins-1.2.2 succeeds even if it does not find libavresample.

/var/tmp/portage/media-plugins/alsa-plugins-1.2.2/work/alsa-plugins-1.2.2/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/alsa-plugins-1.2.2 --htmldir=/usr/share/doc/alsa-plugins-1.2.2/html --with-sysroot=/ --libdir=/usr/lib64 --with-alsalconfdir=/etc/alsa/conf.d --with-speex=lib --disable-arcamav --enable-libav --enable-jack --enable-samplerate --enable-mix --disable-oss --enable-pulseaudio --enable-speexdsp --enable-usbstream

checking for samplerate... yes
checking for libavcodec libavutil libavresample... no

Plugin directory: /usr/lib64/alsa-lib
ALSA_CFLAGS: 
ALSA_LIBS: -lasound
JACK plugin:        yes
  JACK_CFLAGS: 
  JACK_LIBS: -ljack
Pulseaudio plugin:  yes
  pulseaudio_CFLAGS: -D_REENTRANT
  pulseaudio_LIBS: -lpulse
Samplerate plugin:  yes
  samplerate_CFLAGS: 
  samplerate_LIBS: -lsamplerate
Maemo plugin:       no
  Using Osso resource manager: no
Libav A52 plugin:   
Libav rate plugin:  
Speex rate plugin:  lib
Speex preprocess plugin:  yes
AAF plugin:         no
>>> Source configured.

And no problems to emerge it:
=================================================================
                        Package Settings
=================================================================

media-plugins/alsa-plugins-1.2.2::gentoo was built with the following:
USE="ffmpeg jack libsamplerate mix pulseaudio speex usb_stream -arcam_av -debug -oss" ABI_X86="32 (64) (-x32)"

Upstream issue:
https://github.com/alsa-project/alsa-plugins/issues/7

No commits to alsa-plugins git since 19. Feb. 2020
Comment 6 Alexis Ballier gentoo-dev 2020-11-20 14:17:19 UTC
(In reply to jospezial from comment #5)
> (In reply to Alexis Ballier from comment #4)
> > alsa-plugins still seems to use it at least
> 
> But configure of media-plugins/alsa-plugins-1.2.2 succeeds even if it does
> not find libavresample.
> 

well, yeah, because it disables the feature, which is even worse since it's a silent fail
Comment 7 Paolo Pedroni 2021-03-24 12:49:44 UTC
media-video/webcamoid[ffmpeg] uses it as well.
Comment 8 Paolo Pedroni 2021-03-24 13:45:28 UTC
If there is any interest I can develop a patch series to put libavresample under a USE flag and make alsa-plugins[ffmpeg] and webcamoid[ffmpeg] dependent on it.
Comment 9 jospezial 2021-05-01 00:35:47 UTC
removed from ffmpeg git master
https://github.com/FFmpeg/FFmpeg/commit/420cedd49745b284c35d97b936b71ff79b43bdf7
Comment 10 jospezial 2021-05-01 02:06:10 UTC
(In reply to jospezial from comment #9)
> removed from ffmpeg git master
> https://github.com/FFmpeg/FFmpeg/commit/
> 420cedd49745b284c35d97b936b71ff79b43bdf7

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b347f3e83ffc3405cdac5524c07acb20bee906f9
removed from media-video/ffmpeg-9999.ebuild
Comment 11 jospezial 2022-08-27 11:14:17 UTC
ffmpeg-4.4.2.ebuild
and
ffmpeg-4.2.4-r2.ebuild
are the last ebuilds with --enable-avresample

The 2 PRs in gentoo about avresample are closed now.
ffmpeg-5.0.1.ebuild and ffmpeg-9999.ebuild don't have it anymore.

Let's keep this bug open as reminder for people who use the old versions and to avoid duplicates.
Can be closed when the 2 affected versions are removed from tree.
Comment 12 Martin Mokrejš 2024-01-17 11:18:49 UTC
Just a note, also media-libs/libopenshot-0.3.2-r1 searched for it but as it also finds libswresample as mentioend in this thread it is probably working as expected against media-video/ffmpeg-6.1.1-r1:

-- Checking for module 'libavcodec'
--   Found libavcodec, version 60.31.102
-- Checking for module 'libavformat'
--   Found libavformat, version 60.16.100
-- Checking for module 'libavutil'
--   Found libavutil, version 58.29.100
-- Checking for module 'libswscale'
--   Found libswscale, version 7.5.100
-- Checking for module 'libswresample'
--   Found libswresample, version 4.12.100
-- Checking for module 'libavresample'
--   Package 'libavresample', required by 'virtual:world', not found
-- Found FFmpeg: /usr/lib64/libavcodec.so;/usr/lib64/libavformat.so;/usr/lib64/libavutil.so;/usr/lib64/libswscale.so;/usr/lib64/libswresample.so (found version "6.1.1") found components: avcodec avformat avutil swscale swresample missing components: avresample