Summary: | media-video/handbrake is not really compatible with ffmpeg (even not fully compatible with system libav) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pacho Ramos <pacho> |
Component: | Current packages | Assignee: | Ian Whyman (thev00d00) (RETIRED) <thev00d00> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | arthur, polynomial-c, tsmksubc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | handbrake-1.0.7-r1.ebuild |
Description
Pacho Ramos
2017-06-08 16:47:06 UTC
If you prefer , I can try to do the changes myself It is annoying! Feel free to have a stab at it. Created attachment 480828 [details]
handbrake-1.0.7-r1.ebuild
For now it doesn't compile due to undefined symbols related with x265... probable we need to find how to pass -LX265 when internal libav is tried to be built :/
Anyway, it looks really ugly to make it not try to download libav, patch it and configure&build it during src_compile :S
All that ugly stuff is done by make/include/contrib.defs Ideally we should be able to replace most of that cruft downloading libav-12 from https://download.handbrake.fr/handbrake/contrib/libav-12.tar.gz and unpacking it to "${S}"/build/contrib/ffmpeg, also we should apply all the patches from "${S}"/contrib/ffmpeg Regarding how to configure that libav copy... for now I got the options from the generated config.log :S ./configure --prefix=/var/tmp/portage/media-video/handbrake-1.0.7-r1/work/HandBrake-1.0.7/build/contrib/ --disable-shared --enable-static --enable-gpl --disable-doc --disable-bsfs --enable-bsf=aac_adtstoasc --disable-avconv --disable-avplay --disable-avprobe --disable-avdevice --disable-muxers --disable-network --disable-hwaccels --disable-vaapi --disable-vdpau --disable-encoders --enable-libmp3lame --enable-encoder=aac --enable-encoder=ac3 --enable-encoder=eac3 --enable-encoder=flac --enable-encoder=mpeg2video --enable-encoder=mpeg4 --enable-encoder=libmp3lame --enable-libopus --enable-encoder=libopus --enable-libvpx --enable-encoder=libvpx_vp8 --disable-decoder=libvpx_vp8 --enable-encoder=libvpx_vp9 --disable-decoder=libvpx_vp9 --enable-zlib --enable-bzlib --enable-pthreads --cc=/usr/lib64/ccache/bin/gcc --extra-ldflags='-O2 -pipe -march=native -fno-stack-protector -mfpmath=sse -msse2 -L/var/tmp/portage/media-video/handbrake-1.0.7-r1/work/HandBrake-1.0.7/build/contrib/lib' --enable-nonfree --enable-libfdk-aac --enable-encoder=libfdk_aac --enable-muxer=matroska --enable-muxer=webm --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=psp --enable-muxer=ipod --disable-debug --extra-cflags='-O2 -pipe -march=native -fno-stack-protector -mfpmath=sse -msse2 -I/var/tmp/portage/media-video/handbrake-1.0.7-r1/work/HandBrake-1.0.7/build/contrib/include -DNDEBUG' But I don't know how handbrake will built against that copy and not the system one :/ (In reply to Pacho Ramos from comment #4) > All that ugly stuff is done by make/include/contrib.defs > > Ideally we should be able to replace most of that cruft downloading libav-12 > from https://download.handbrake.fr/handbrake/contrib/libav-12.tar.gz and > unpacking it to "${S}"/build/contrib/ffmpeg, also we should apply all the > patches from "${S}"/contrib/ffmpeg > > Regarding how to configure that libav copy... for now I got the options from > the generated config.log :S > ./configure > --prefix=/var/tmp/portage/media-video/handbrake-1.0.7-r1/work/HandBrake-1.0. > 7/build/contrib/ --disable-shared --enable-static --enable-gpl --disable-doc > --disable-bsfs --enable-bsf=aac_adtstoasc --disable-avconv --disable-avplay > --disable-avprobe --disable-avdevice --disable-muxers --disable-network > --disable-hwaccels --disable-vaapi --disable-vdpau --disable-encoders > --enable-libmp3lame --enable-encoder=aac --enable-encoder=ac3 > --enable-encoder=eac3 --enable-encoder=flac --enable-encoder=mpeg2video > --enable-encoder=mpeg4 --enable-encoder=libmp3lame --enable-libopus > --enable-encoder=libopus --enable-libvpx --enable-encoder=libvpx_vp8 > --disable-decoder=libvpx_vp8 --enable-encoder=libvpx_vp9 > --disable-decoder=libvpx_vp9 --enable-zlib --enable-bzlib --enable-pthreads > --cc=/usr/lib64/ccache/bin/gcc --extra-ldflags='-O2 -pipe -march=native > -fno-stack-protector -mfpmath=sse -msse2 > -L/var/tmp/portage/media-video/handbrake-1.0.7-r1/work/HandBrake-1.0.7/build/ > contrib/lib' --enable-nonfree --enable-libfdk-aac > --enable-encoder=libfdk_aac --enable-muxer=matroska --enable-muxer=webm > --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=psp --enable-muxer=ipod > --disable-debug --extra-cflags='-O2 -pipe -march=native -fno-stack-protector > -mfpmath=sse -msse2 > -I/var/tmp/portage/media-video/handbrake-1.0.7-r1/work/HandBrake-1.0.7/build/ > contrib/include -DNDEBUG' > > > But I don't know how handbrake will built against that copy and not the > system one :/ Not that I want to give up, but, at what point do we decide that it's too much an effort to provide a possible solution that supports all the features (patches) that upstream does to their libraries? On a larger scale, do we have a policy in general for packages that are impossible to completely decouple from the bundled libs? Do we have an overlay somewhere that builds HandBrake using their methods that perhaps we can steer someone towards if they want? We can build against our local libs, without all the patches, but I think it'd be sane to probably restrict them at least to the specific versions they are using (libav-12*, etc.). What we do for example with gst-plugins-libav (that uses ffmpeg and not libav in upstream side even with that name) is to rely on system libs for USE ffmpeg and bundled ffmpeg version for USE libav (to not break the tree for people having USE libav system wide). The problem here is that not only libav is bundled... but all the libs :/, then, even if I would like to be able to simply build with bundled libs optionally via a USE flag, I am not sure if all people would agree :/ Maybe we could simply rely on a "vanilla" USE flag: - vanilla -> build handbrake with all the bundled libs as upstream wants - vanilla disabled -> the current "partially working" situation What do you think about that? :/ But that still has some issues as building with upstream methods leads to ugly things to happen like downloading sources and running configure from src_compile :| If upstream could, at least, be able to provide splitted "phases" to, for example, download all sources with one call, running all configures with another, build with another... But I doubt they will want to do that :( Having myself been round that loop a few times, I am not sure what we can do here. Thankfully normally we have new enough libraries to avoid breakages, but if upstream wont work with us I think we have to do our best with what we are offered. This was finally fixed upstream as they switched to follow ffmpeg some time ago: https://github.com/HandBrake/HandBrake/issues/974 |