Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ffmpeg-4.4 upgrade - heads up
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Sat Apr 10, 2021 5:56 pm    Post subject: ffmpeg-4.4 upgrade - heads up Reply with quote

If you rely on tools like Handbrake and Audacity you may want to stay with 4.3 for now. Handbrake refused to read input video and Audacity refused to export using ffmpeg with 4.4 version.
_________________
Life is a tragedy for those who feel and a comedy for those who think.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Sat Apr 10, 2021 6:24 pm    Post subject: Reply with quote

for handbrake exists patch https://github.com/HandBrake/HandBrake/pull/3537
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Sat Apr 10, 2021 7:45 pm    Post subject: Reply with quote

Hmh ... this patch is for audio encoders, while I got H.264 decoding error - it was the input file. I think there may be more incompatibility than they anticipated.
_________________
Life is a tragedy for those who feel and a comedy for those who think.
Back to top
View user's profile Send private message
bug_surfer
n00b
n00b


Joined: 05 Sep 2015
Posts: 11
Location: EU

PostPosted: Thu May 20, 2021 5:47 pm    Post subject: ffmpeg44 with handbrake-9999 x265 no sound fix Reply with quote

Hi!

with Handbrake -1.3.3-r1 there is no sound if you use aac/fdk and ffmpeg 4.4.

Solution: Handbrake 1.4.0 beta as version 9999. You need to create your own ebuild, because the original 9999 ebuild is not working.

3 steps:

1. Newer versions of handbrake needs media-libs/zimg. I put it in the rdepend section and also recompiled ffmpeg 4.4 with zimg.

2. You do not need the "${FILESDIR}/${PN}-9999-remove-faac-dependency.patch anymore. Comment it out.

3. You need the ${FILESDIR}/${PN}-1.3.3-x265-link.patch. Put it in. The offset is ok for 1.4.0.

It worked for me. Now i can transcode videos using x265 with aac sound...:)
_________________
"Money isn't the most important thing in life, but it's reasonably close to oxygen on the 'gotta have it' scale."
Zig Ziglar
Back to top
View user's profile Send private message
digifuzzy
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2014
Posts: 80

PostPosted: Fri Jun 11, 2021 5:33 am    Post subject: Reply with quote

Ran into this problem this week and circling back to Gentoo to update information to others.

It wasn't until I reviewed handbrake log file that I found a error message I could do a web search with. That led me to this reddit post. The suggested solution was to downgrade ffmpeg to 4.3.2 but this was based on another persons usage habits rather than code knowledge. Others reported success with this action.

I reached out on handbrake forum about the matter. In a reply to forum post, a moderator put it quite succinctly: "ffmpeg 4.4 is not supported by HandBrake 1.3.3".

I have ffmpeg masked to not upgrade to version 4.4. Hopefully the next handbrake version is in the pipeline.

Basically coming at this problem completely backwards but there it is.
Back to top
View user's profile Send private message
Koyan
n00b
n00b


Joined: 07 Nov 2014
Posts: 22

PostPosted: Fri Jun 11, 2021 6:47 am    Post subject: Reply with quote

digifuzzy wrote:
Ran into this problem this week and circling back to Gentoo to update information to others.


Like fedeliallalinea said in this thread, there is a patch out already. Just download https://github.com/HandBrake/HandBrake/commit/95675c23bf42179da7f08042e60d9e98931df382.patch and put it in /etc/portage/patches/media-video/handbrake-1.3.3-r1/ and then reemerge handbrake.

I have handbrake 1.3.3-r1 running fine here with ffmpeg 4.4.
Back to top
View user's profile Send private message
digifuzzy
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2014
Posts: 80

PostPosted: Fri Jun 11, 2021 7:14 am    Post subject: Reply with quote

Koyan wrote:

Like fedeliallalinea said in this thread, there is a patch out already. Just download https://github.com/HandBrake/HandBrake/commit/95675c23bf42179da7f08042e60d9e98931df382.patch and put it in /etc/portage/patches/media-video/handbrake-1.3.3-r1/ and then reemerge handbrake.

I have handbrake 1.3.3-r1 running fine here with ffmpeg 4.4.


Great if one has time and/or patience to "experiment" with patches.
However, medium term, a tweak to the ebuild would seem prudent to prevent building packages with an incompatible dependency. That would save people grief and heartache, not to mention key pounding in forums, when things go wrong.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Fri Jun 11, 2021 7:25 am    Post subject: Reply with quote

digifuzzy wrote:
Great if one has time and/or patience to "experiment" with patches.

Apply a user patches in gentoo is really simple, just use /etc/portage/patches
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Fri Jun 11, 2021 5:03 pm    Post subject: Reply with quote

Although patching is easy, I also agree with digifuzzy: the ebuild should work out-of-the-box, either by having a blocker dependency that forbids using it with the newer ffmpeg or by including that patch as standard. Neither of those will happen until a Gentoo maintainer is advised of the problem. This could be done by filing a bug, assuming one has not already been filed.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Fri Jun 11, 2021 5:06 pm    Post subject: Reply with quote

The bug is already open
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
bug_surfer
n00b
n00b


Joined: 05 Sep 2015
Posts: 11
Location: EU

PostPosted: Thu Jul 01, 2021 5:02 pm    Post subject: handbrake no sound with ffmpeg 4.4 Reply with quote

Hi guys!

I have just tested my live ebuild version and still works for handbrake 1.4. Sound works fine too. Why did you ignore my last post?
handbrake-9999-r55 ebuild with the modification

Code:

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7,8} )

inherit autotools eutils gnome2-utils python-any-r1 xdg-utils

if [[ ${PV} = *9999* ]]; then
        EGIT_REPO_URI="https://github.com/HandBrake/HandBrake.git"
        inherit git-r3
else
        MY_P="HandBrake-${PV}"
        SRC_URI="https://download2.handbrake.fr/${PV}/${MY_P}-source.tar.bz2 -> ${P}.tar.bz2"
        S="${WORKDIR}/${MY_P}"
        KEYWORDS="~amd64 ~x86"
fi

DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
HOMEPAGE="http://handbrake.fr/"
LICENSE="GPL-2"

SLOT="0"
IUSE="+fdk gstreamer gtk libav-aac numa nvenc x265"

REQUIRED_USE="^^ ( fdk libav-aac )"

RDEPEND="
        app-arch/xz-utils
        media-libs/speex
        media-libs/zimg
        dev-libs/jansson
        dev-libs/libxml2
        media-libs/a52dec
        media-libs/libass:=
        >=media-libs/libbluray-1.0
        >=media-libs/dav1d-0.5.1
        media-libs/libdvdnav
        media-libs/libdvdread:=
        media-libs/libsamplerate
        media-libs/libtheora
        media-libs/libvorbis
        >=media-libs/libvpx-1.8
        nvenc? ( media-libs/nv-codec-headers )
        media-libs/opus
        media-libs/x264:=
        media-sound/lame
        sys-libs/zlib
        >=media-video/ffmpeg-4.2.1:0=[fdk?]
        gstreamer? (
                media-libs/gstreamer:1.0
                media-libs/gst-plugins-base:1.0
                media-libs/gst-plugins-good:1.0
                media-libs/gst-plugins-bad:1.0
                media-libs/gst-plugins-ugly:1.0
                media-plugins/gst-plugins-a52dec:1.0
                media-plugins/gst-plugins-libav:1.0
                media-plugins/gst-plugins-x264:1.0
                media-plugins/gst-plugins-gdkpixbuf:1.0
        )
        gtk? (
                >=x11-libs/gtk+-3.10
                dev-libs/dbus-glib
                dev-libs/glib:2
                dev-libs/libgudev:=
                x11-libs/cairo
                x11-libs/gdk-pixbuf:2
                x11-libs/libnotify
                x11-libs/pango
        )
        fdk? ( media-libs/fdk-aac )
        x265? ( >=media-libs/x265-3.2:0=[10bit,12bit,numa?] )
        "

DEPEND="${RDEPEND}
        ${PYTHON_DEPS}
        dev-lang/yasm
        dev-util/intltool
        sys-devel/automake"

PATCHES=(
        # Remove libdvdnav duplication and call it on the original instead.
        # It may work this way; if not, we should try to mimic the duplication.
        "${FILESDIR}/${PN}-9999-remove-dvdnav-dup.patch"

        # Remove faac dependency; TODO: figure out if we need to do this at all.
        #"${FILESDIR}/${PN}-9999-remove-faac-dependency.patch"

        # Fix x265 linkage... again again #730034
        "${FILESDIR}/${PN}-1.3.3-x265-link.patch"

        # Use whichever python is set by portage
        "${FILESDIR}/${PN}-1.3.0-dont-search-for-python.patch"
)

src_prepare() {
        # Get rid of leftover bundled library build definitions,
        sed -i 's:.*\(/contrib\|contrib/\).*::g' \
                "${S}"/make/include/main.defs \
                || die "Contrib removal failed."

        default

        cd "${S}/gtk"
        # Don't run autogen.sh.
        sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
        eautoreconf
}

src_configure() {
        # Libav was replaced in 1.2 with ffmpeg by default
        # but I've elected to not make people change their use flags for AAC
        # as its the same code anyway
        ./configure \
                --force \
                --verbose \
                --prefix="${EPREFIX}/usr" \
                --disable-gtk-update-checks \
                --disable-flatpak \
                --disable-gtk4 \
                $(use_enable libav-aac ffmpeg-aac) \
                $(use_enable fdk fdk-aac) \
                $(usex !gtk --disable-gtk) \
                $(usex !gstreamer --disable-gst) \
                $(use_enable numa) \
                $(use_enable nvenc) \
                $(use_enable x265) || die "Configure failed."
}

src_compile() {
        emake -C build

        # TODO: Documentation building is currently broken, try to fix it.
        #
        # if use doc ; then
        #       emake -C build doc
        # fi
}

src_install() {
        emake -C build DESTDIR="${D}" install

        dodoc README.markdown AUTHORS.markdown NEWS.markdown THANKS.markdown
}

pkg_postinst() {
        einfo "Gentoo builds of HandBrake are NOT SUPPORTED by upstream as they"
        einfo "do not use the bundled (and often patched) upstream libraries."
        einfo ""
        einfo "Please do not raise bugs with upstream because of these ebuilds,"
        einfo "report bugs to Gentoo's bugzilla or Multimedia forum instead."

        einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
        if use gtk ; then
                einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
        fi

        gnome2_icon_cache_update
        xdg_desktop_database_update
}

pkg_preinst() {
        gnome2_icon_savelist
}

pkg_postrm() {
        gnome2_icon_cache_update
        xdg_desktop_database_update
}

_________________
"Money isn't the most important thing in life, but it's reasonably close to oxygen on the 'gotta have it' scale."
Zig Ziglar
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum