Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 791220 - media-video/handbrake-1.3.3-r1: missing audio stream in MPEG-4 container (.m4v) created with ffmpeg-4.4
Summary: media-video/handbrake-1.3.3-r1: missing audio stream in MPEG-4 container (.m4...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-05-20 13:28 UTC by mehw
Modified: 2021-10-16 02:21 UTC (History)
5 users (show)

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


Attachments
emerge --info handbrake ffmpeg (emerge-info.log,9.04 KB, text/x-log)
2021-05-20 13:28 UTC, mehw
Details
Patch of the indicated site (ffmpeg-4.4.patch,605 bytes, patch)
2021-05-25 14:35 UTC, Eduardo Coutinho Scalabrin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mehw 2021-05-20 13:28:01 UTC
Created attachment 710010 [details]
emerge --info handbrake ffmpeg

Hello,

After upgrading from ffmpeg-4.3.2 to ffmpeg-4.4, transcoding a video with handbrake-1.3.3-r1 may result into a missing audio stream.

This has been fixed upstream https://github.com/HandBrake/HandBrake/commit/f28289fb06ab461ea082b4be56d6d1504c0c31c2 (libhb: fix audio encoders when linking to FFmpeg 4.4).

The following are the options I use to transcode a video with audio, handbrake-1.3.3-r1 + ffmpeg-4.4, resulting in a missing audio stream in the MPEG-4 (.m4v) container.

Official > Web > Discord Tiny 5 Minutes 240p30

Format:  MPEG-4 (avformat)
         [x] Web Optimized
         [x] Align A/V Start
         [ ] iPod 5G Support

Tracks:  H.264 (x264), 30 FPS PFR
         English, AAC (FDK), Mono
         Chapter Makers

Filters: Comb Detect, Decomb

Size:    320x216 storage, 384x216 display
         6:5 Pixel Aspect Ratio
         16:9 Display Aspect Ratio

PS: the complete `emerge --info handbrake ffmpeg` is attached.

media-video/handbrake-1.3.3-r1::gentoo was built with the following:
USE="fdk gstreamer gtk numa x265 -libav-aac -nvenc" ABI_X86="(64)"

media-video/ffmpeg-4.4::gentoo was built with the following:
USE="X alsa bzip2 dav1d encode fdk fontconfig frei0r gme gmp gnutls gpl gsm iconv jack jpeg2k ladspa libass libcaca libsoxr libxml2 lv2 lzma modplug mp3 network openal opencl opengl openh264 opus postproc rubberband sdl snappy speex svg theora threads truetype v4l vorbis vpx webp x264 x265 xvid zimg zlib -amr -amrenc (-appkit) -bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection (-cuda) -debug -doc -flite -fribidi -gcrypt -hardcoded-tables -iec61883 -ieee1394 -kvazaar -libaom -libaribb24 -libdrm -libilbc -librtmp -libtesseract -libv4l (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -openssl -oss -pic -pulseaudio -rav1e -samba -sndio -srt -ssh -static-libs -test -twolame -vaapi -vdpau -vidstab -vulkan -zeromq -zvbi"
Comment 1 Frej Drejhammar 2021-05-22 13:09:25 UTC
The linked patch and PR fixes the problem on my system.
Comment 2 Eduardo Coutinho Scalabrin 2021-05-25 14:32:50 UTC
I have the same error and the ffmpeg-4.4 patch from the indicated website fixed the problem for me.
Comment 3 Eduardo Coutinho Scalabrin 2021-05-25 14:35:08 UTC
Created attachment 711150 [details, diff]
Patch of the indicated site
Comment 4 James L. Hammons 2021-06-25 15:30:54 UTC
I can confirm this issue exists with the combination of handbrake-1.3.3-r1 and ffmpeg-4.4.  I'm not sure how to add the patch to an ebuild, otherwise I would likely be able to confirm the fix as well.
Comment 5 mehw 2021-06-26 14:05:34 UTC
(In reply to James L. Hammons from comment #4)
> I can confirm this issue exists with the combination of handbrake-1.3.3-r1
> and ffmpeg-4.4.  I'm not sure how to add the patch to an ebuild, otherwise I
> would likely be able to confirm the fix as well.

If you want, you may take a look at the PR https://github.com/gentoo/gentoo/pull/20896 , the ebuild is already there.
Comment 6 Eduardo Coutinho Scalabrin 2021-06-26 14:47:24 UTC
(In reply to James L. Hammons from comment #4)
> I can confirm this issue exists with the combination of handbrake-1.3.3-r1
> and ffmpeg-4.4.  I'm not sure how to add the patch to an ebuild, otherwise I
> would likely be able to confirm the fix as well.

Hello, James!

I believe this is what you need:

https://wiki.gentoo.org/wiki//etc/portage/patches
Comment 7 Martin Rott 2021-08-30 11:44:16 UTC
Hello, confirming both the bug and functionality of linked patch..
Comment 8 Larry the Git Cow gentoo-dev 2021-10-16 01:24:42 UTC
The bug has been closed via the following commit(s):

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

commit ff3c488b4c491c2beb5e9ad2e8ffefe43bc2c5f0
Author:     Matthew White <mehw.is.me@inventati.org>
AuthorDate: 2021-05-20 13:30:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-16 01:23:55 +0000

    media-video/handbrake: fix audio encoders with FFmpeg 4.4
    
    Applies the upstream patch:
    https://github.com/HandBrake/HandBrake/commit/f28289fb06ab461ea082b4be56d6d1504c0c31c2
    
    Closes: https://bugs.gentoo.org/791220
    Package-Manager: Portage-3.0.18, Repoman-3.0.2
    Signed-off-by: Matteo Bianco <mehw.is.me@inventati.org>
    Closes: https://github.com/gentoo/gentoo/pull/20896
    Signed-off-by: Sam James <sam@gentoo.org>

 ...audio-encoders-when-linking-to-FFmpeg-4.4.patch |  28 ++++
 media-video/handbrake/handbrake-1.3.3-r3.ebuild    | 165 +++++++++++++++++++++
 2 files changed, 193 insertions(+)