Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 868327 - media-video/handbrake-9999 requires ffmpeg 5.1
Summary: media-video/handbrake-9999 requires ffmpeg 5.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: James Beddek
URL:
Whiteboard:
Keywords:
Depends on: 900963
Blocks: 868315
  Show dependency tree
 
Reported: 2022-09-04 01:22 UTC by Tom Poplawski
Modified: 2023-04-09 06:59 UTC (History)
3 users (show)

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


Attachments
handbrake-9999.ebuild (handbrake-9999.ebuild,4.00 KB, text/plain)
2022-09-14 13:33 UTC, James Beddek
Details
handbrake-9999-dont-search-for-python.patch (handbrake-9999-dont-search-for-python.patch,694 bytes, patch)
2022-09-14 13:34 UTC, James Beddek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Poplawski 2022-09-04 01:22:03 UTC
Tracking down some build failures:

../libhb/common.c:2481:5: error: unknown type name AVChannelLayout



AVChannelLayout is only defined in ffmpeg version 5.1, 5.0 does not have it.


Defined on line 290 here:

https://github.com/FFmpeg/FFmpeg/blob/release/5.1/libavutil/channel_layout.h
Comment 1 James Beddek 2022-09-14 13:33:54 UTC
Created attachment 805102 [details]
handbrake-9999.ebuild

Hi Tom,

Assuming you have ffmpeg:5 installed, would you mind trying the below ebuild? I'll attach below an updated patch to put within the files directory.

I don't currently have access to a system with ffmpeg:5, but I'll work on that in the meantime in case you aren't able to test
Comment 2 James Beddek 2022-09-14 13:34:50 UTC
Created attachment 805105 [details, diff]
handbrake-9999-dont-search-for-python.patch
Comment 3 Tom Poplawski 2022-09-17 17:29:07 UTC
Sorry, Don't have ffmpeg:5 system either.
Comment 4 Alexey Chernyak 2023-01-31 01:53:45 UTC
Tested it out:
1. Needs to be merged with the latest portage -9999 ebuild commit.
2. Fails to build without media-libs/svt-av1.

autoreconf-2.71: running: aclocal --force -I m4
/usr/bin/g++ -pipe -Wl,-S -Wl,-O1,--as-needed -fmessage-length=0 -Wall -Wno-format-truncation -g0 -O3 -mfpmath=sse -msse2 -w -march=native -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -I./libhb/ -Iinclude -I/usr/include/libxml2 -o HandBrakeCLI -Wl,--start-group test/parsecsv.o test/test.o ./libhb/libhandbrake.a -Llib -lass -lavformat -lavfilter -lavcodec -lavutil -lswresample -lpostproc -lmp3lame -ldvdnav -ldvdread -lfribidi -lswscale -lvpx -ltheor
aenc -ltheoradec -lvorbis -lvorbisenc -logg -lx264 -lbluray -lfreetype -lxml2 -lbz2 -lz -ljansson -lharfbuzz -lopus -lspeex -llzma -ldav1d -lturbojpeg -lzimg -lSvtAv1Enc -lfontconfig -lx265 -lpthread -ldl -lm -Wl,--end-group
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lSvtAv1Enc: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [../test/module.rules:49: HandBrakeCLI] Error 1

Builds fine with media-libs/svt-av1 installed.

The build doesn't seem to care whether or not media-video/ffmpeg was built with the svt-av1 USE flag.
Comment 5 Alexey Chernyak 2023-03-24 14:16:08 UTC
Also tested against ffmpeg-6
Fails with:

../libhb/encsvtav1.c: In function ‘encsvtInit’:
../libhb/encsvtav1.c:122:36: error: ‘SVT_AV1_RC_MODE_VBR’ undeclared (first use in this function)
  122 |         param->rate_control_mode = SVT_AV1_RC_MODE_VBR;
      |                                    ^~~~~~~~~~~~~~~~~~~
../libhb/encsvtav1.c:122:36: note: each undeclared identifier is reported only once for each function it appears in
../libhb/encsvtav1.c:127:36: error: ‘SVT_AV1_RC_MODE_CQP_OR_CRF’ undeclared (first use in this function)
  127 |         param->rate_control_mode = SVT_AV1_RC_MODE_CQP_OR_CRF;
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [../libhb/module.rules:12: libhb/encsvtav1.o] Error 1
Comment 6 Alexey Chernyak 2023-03-24 14:32:21 UTC
This depends on bug 900963.

Building with svt-av1-1.4.1 fixes the above build error.

However still fails with the following error:

../libhb/encx265.c: In function ‘encx265Init’:
../libhb/encx265.c:311:14: error: ‘x265_param’ has no member named ‘ambientIlluminance’
  311 |         param->ambientIlluminance = rescale(job->ambient.ambient_illuminance, 10000);
      |              ^~
../libhb/encx265.c:312:14: error: ‘x265_param’ has no member named ‘ambientLightX’
  312 |         param->ambientLightX = rescale(job->ambient.ambient_light_x, 50000);
      |              ^~
../libhb/encx265.c:313:14: error: ‘x265_param’ has no member named ‘ambientLightY’
  313 |         param->ambientLightY = rescale(job->ambient.ambient_light_y, 50000);
      |              ^~
../libhb/encx265.c:314:14: error: ‘x265_param’ has no member named ‘bEmitAmbientViewingEnvironment’
  314 |         param->bEmitAmbientViewingEnvironment = 1;
      |              ^~
/usr/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -Wno-format-truncation -g0 -O3 -mfpmath=sse -msse2 -w -march=native -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -Iinclude -I/usr/include/libxml2 -c ../libhb/hb_dict.c -o libhb/hb_dict.o
make: *** [../libhb/module.rules:12: libhb/encx265.o] Error 1
Comment 7 Larry the Git Cow gentoo-dev 2023-04-07 11:44:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d65316b91fe2e8997536270a59e7560e4b28a0f6

commit d65316b91fe2e8997536270a59e7560e4b28a0f6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-07 11:43:45 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-07 11:43:45 +0000

    media-video/handbrake: update deps
    
    Closes: https://bugs.gentoo.org/868327
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/handbrake/handbrake-9999.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 8 Alexey Chernyak 2023-04-09 06:48:07 UTC
Sam,

The ebuild changes and patch which James had previously attached to this bug also need incorporating.

Currently the ebuild fails patching:

 * Applying handbrake-9999-remove-dvdnav-dup.patch ...              [ ok ]
 * Applying handbrake-9999-remove-faac-dependency.patch ...         [ ok ]
 * Applying handbrake-9999-system-tools.patch ...                   [ ok ]
 * Applying handbrake-1.3.0-dont-search-for-python.patch ...
patching file configure
Hunk #1 FAILED at 14.
1 out of 1 hunk FAILED -- saving rejects to file configure.rej      [ !! ]
Comment 9 Alexey Chernyak 2023-04-09 06:52:08 UTC
Also the latest git code Config generates this error:

ERROR: The --disable-gtk-update-checks flag is no longer required or supported
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-09 06:59:20 UTC
thanks, done

commit 018626145ba44c7559d63102827faa151cc7e72a (origin/master, origin/HEAD)
Author: Sam James <sam@gentoo.org>
Date:   Sun Apr 9 07:56:37 2023 +0100

    media-video/handbrake: update live ebuild

    Thanks-to: James Beddek <telans@posteo.de>
    Signed-off-by: Sam James <sam@gentoo.org>