Open knosso2919 opened 3 years ago
Make sure you have libraries required for GUI build sudo apt-get install intltool libappindicator-dev libdbus-glib-1-dev libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgtk-3-dev libgudev-1.0-dev libnotify-dev libwebkitgtk-3.0-dev
Try specific version I used - if it works than you know that problem is with version you try to compile
I do not have Twister OS - so cant try myself
I should say that the reason why I'm trying to compile it in the first place is that the version included in the repository (1.2) does crash with no errors and warnings at the second pass encoding. That problem was known to the developing team but no solution was given. I was hoping to test a newer version to see if the problem was resolved.
Also at the moment I have RPi without GUI so can't test GUI build.
- sudo apt-get install intltool libappindicator-dev libdbus-glib-1-dev libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgtk-3-dev libgudev-1.0-dev libnotify-dev libwebkitgtk-3.0-dev
Thanks for the super fast reply.
1) Yes those libraries are installed and up to date. 2) I used the version 1.3.3 that you used (i copied each command) and i tired later a newer version in a separate folder just to see if the problem was with that specific version. 3) ok if we don't come to a solution ill try again in raspian directly on a spare sd card ... but really the system under the hood should be the same except for the different interface.
Try also to install libgtk2.0-dev
let me know if you succeeded with raspbian
Yes libgtk2.0-dev is installed. I guess that time of the year has come to install raspbian again. I'll report back on that.
In any case this is the OS information of my Twister OS system: $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Check https://handbrake.fr/docs/en/1.3.0/developer/install-dependencies-debian.html
Maybe 1.3 version requires some extra libs, they list the following for GUI:
intltool
libappindicator-dev
libdbus-glib-1-dev
libglib2.0-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libgtk-3-dev
libgudev-1.0-dev
libnotify-dev
libwebkit2gtk-4.0-dev
I would just install all of them and try.
libwebkit2gtk-4.0-dev (libwebkitgtk-3.0-dev for Debian 9)
might be the clue. You are on buster (debian 10) - I used debian 9
your observation was intelligent.
libwebkit2gtk-4.0-dev was missing (all the others were already installed and up to date). libwebkitgtk-3.0-dev was already installed and after installing libwebkit2gtk-4.0-dev i now have both of them.
Also i failed to mention that x265 is in a different folder but that has nothing to do with the problem ~/HandBrake/build/contrib/x265/x265_3.2.1. The change i did was still the same with != instead of ==.
To make sure everything was just right i totally deleted the handbrake folder and started again from scratch. It still got stuck at the make clean command.
I'm now flashing the latest vanilla raspbian to see whats going on.
Ok I installed on a spare sd card a brand new raspbian with no mods whatsoever. I installed the updates and all the libraries (including the new nasm and libwebkit2gtk-4.0-dev) and.... stuck on the same error.
Ignore this error and move on. I can see that it just says that it cant clean gtk which is ok as it was not built yet.
On 24 Sep 2021, at 15:47, knosso2919 @.***> wrote:
Ok I installed on a spare sd card a brand new raspbian with no mods whatsoever. I installed the updates and all the libraries (including the new nasm and libwebkit2gtk-4.0-dev) and.... stuck on the same error.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/handbreak-RaspberryPi/issues/3#issuecomment-926686432, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHOWF4XOXSW45OJG5QBLUDSFP7ANCNFSM5EVVFIBA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
ok thanks for your support. Ill try. The first time it had only cli as a result. Lets see what happens.
which makes sense as libwebkit2gtk-4.0-dev
was missing
I will try myself and update the guide for debian 10
one hint - at least for me I also have had to add libturbojpeg0-dev
library
Ok if it works ill give you all the details needed and I'll help as much as i can. nasm seems sufficiently new so it can be installed directly with apt.
one hint - at least for me I also have had to add
libturbojpeg0-dev
library
Ok if it fails ill try again after installing that lib as well (now is in the middle of the build and i don't want to mess behind it)
Ok if it works ill give you all the details needed and I'll help as much as i can. nasm seems sufficiently new so it can be installed directly with apt.
yes I noticed it too
Ok if it fails ill try again after installing that lib as well (now is in the middle of the build and i don't want to mess behind it)
then you install missing lib and run make again, it will pick up from where it failed
I am trying to build Handbreak 1.4.1 now
It got stuck forever here so i interrupted it and installed the lib. Maybe
I'll try again from skratch this evening to make sure i did not skip any step (in the meantime i leave it working just in case it finishes).
have a look with htop or top if compilers are working - it can be quite slow sometimes on RPi
Ok it finished with some errors: this is the very last part of the errors:
I did not check with htop but the pi surely got less responsive (not warmer because I have an overkill desktop heatsynk on it) ... ill surely check when i try again.
Inside build/gtk/src there is no ghb but only ghb.ui, ghbcompat.o, and ghb-dvd.o. HandbrakeCLI is however present.
I have just compiled successfully 1.3.3 and 1.4.1. Both CLI and GUI. On latest Raspbian based on Debian 10. I will update this guide. Let me know if you still have issues.
Your latest error was related to missing appstream
.
In general it is always some challenge to compile projects like HandBreak on Debian. Very conservative in terms of used libs versions etc.
Your latest error was related to missing
appstream
.
Ouch time to compile again after installing appstream ;)
I'm now building in parallel both 1.3.3 and 1.4.1 (lol i wish i didn't).
In general it is always some challenge to compile projects like HandBreak on Debian. Very conservative in terms of used libs versions etc.
Mmmmh i guess that's what you have to pay to have a more responsive and less bloated system expecially nobody before the Pi4 (and i guess a little bit on Pi3) used handbrake on a pi.
EDIT: the 1.3.3 crashed while 1.4.1 is going strong.... maybe it was too much.... ill do one at a time.
EDIT again: Dang I moved to Twister os since now everything was supposed to be working.... i forgot about turbojpg
Ok 1.3.3 really does not want to be built... but 1.4.1 is gorgeous and it even picked up an old cue from 1.2 this probably means that when i purged 1.2 the configuration remained...shall i try and delete the configuration or its ok?
After 1.3.3 finishes ill try and encode something just to see if it crashes like 1.2 did.
Also since x265 might change again i think that in the guide the dirty hack shall be
nano ./contrib/x265/x265*/source/common/primitives.cpp
(with the asterix).
Mmmh strange behaviour... it says:
libdvdread: Encrypted DVD support unavailable. libdvdread: Can't open file VIDEO_TS.IFO.
It does not make sense since this is an mkv file created with makemkv but at the same time its performing the first pass with no problems (lets see if it crashes at the second pass like 1.2).
And nope 1.3.3 stopped again the compile.... i may delete everything there to see it starting from skratch does something.
EDIT: Lol handbrake 1.4.1 crashed in the same exact non spectacular way as 1.2 with a simple "Segmentation fault" in the terminal and nothing in the encoding log.... but that is something that is better suited to the handbrake forum.
EDIT: 1.3.3 compiled with no errors.... i guess i must have repeated a typo over and over.
I do not have much experience in using HB on RPi but first thing I would do in situation like this is to ensure that you have enough memory. I had some programs crashing on RPi for this simple reason.
Make sure you have swap enabled and its size is enough - where enough is unfortunately a bit guess. I would say for HB 8GiB (RAM + swap) maybe...
https://handbrake.fr/docs/en/1.3.0/technical/system-requirements.html
Free memory:
512 MB for transcoding standard definition video (480p/576p)
1.5 GB for transcoding high definition video (720p/1080p)
4 GB or more for transcoding ultra high definition video (2160p 4K)
I can easily see problems here especially on low RAM RPi models. Maybe 2-pass encoding uses even more?
But real crash reason might be different. As x265 code shows RPi support is often not on priority list of software creators.
I don't think it't memory because i have 4Gb and ZRAM and 4Gb of SWAP.
It may be a regression from handbrake 1.0 or even before that. I eliminated most of the languages and all of the subtitles and the encoding does not crash. Year after year people had this problem on every platform. It just comes back every now and then. https://github.com/HandBrake/HandBrake/issues/236 Here the guy changed computer before the problem was actually solved. https://github.com/HandBrake/HandBrake/issues/2594 Here they were reusing a json file with an incorrect number of chapters. https://bbs.archlinux.org/viewtopic.php?id=32061 Here it was caused by the audio track that needs to be identified with a number instead of a name. https://www.linuxquestions.org/questions/slackware-14/handbrake-segmentation-fault-on-current-4175645003/ here it seems to be related to x265.
then there are plenty of other stuff similar online. It is usually related to x264, x265, subtitles, strange languages.
Anyway thanks for your help. If you are ok I will close this issue. Just a piece of information: do you specify something to make it use all the cores? my encoding seem to use only one core.
Just a piece of information: do you specify something to make it use all the cores? my encoding seem to use only one core.
Nope. The whole HB compilation on RPi was rather experiment on my side so I did not even tried to optimize it further. Might be some switch in configure
to enable multi core support on Arm. I have no plans to research it.
And you can leave this issue open. As you noticed I do not struggle with too many issues here:)
Ok thanks. I wish you well.
Hi all, this is the first time i post in github so please tell me if i do something incorrectly. Also this is the very first time that I'm trying to build something so obvious concepts may not be obvious to me.
I tried installing handbrake following this guide but i get the follwing error during passage 7 after the "make clean" command.
/usr/bin/rm -f ./libhb/handbrake/project.h ./libhb/hbavfilter.o ./libhb/plist.o ./libhb/avfilter.o ./libhb/nvenc_common.o ./libhb/vfr.o ./libhb/eedi2.o ./libhb/common.o ./libhb/decavsub.o ./libhb/enc_qsv.o ./libhb/encx265.o ./libhb/rendersub.o ./libhb/demuxmpeg.o ./libhb/deblock.o ./libhb/ports.o ./libhb/stream.o ./libhb/vce_common.o ./libhb/colorspace.o ./libhb/bd.o ./libhb/dectx3gsub.o ./libhb/preset.o ./libhb/decsrtsub.o ./libhb/lapsharp.o ./libhb/dvdnav.o ./libhb/qsv_libav.o ./libhb/decssasub.o ./libhb/taskset.o ./libhb/colormap.o ./libhb/muxavformat.o ./libhb/encavcodecaudio.o ./libhb/qsv_filter.o ./libhb/sync.o ./libhb/hb_json.o ./libhb/ssautil.o ./libhb/nal_units.o ./libhb/rotate.o ./libhb/nlmeans.o ./libhb/chroma_smooth.o ./libhb/dvd.o ./libhb/fifo.o ./libhb/scan.o ./libhb/compat.o ./libhb/decomb.o ./libhb/nlmeans_x86.o ./libhb/cropscale.o ./libhb/lang.o ./libhb/encx264.o ./libhb/hbffmpeg.o ./libhb/mt_frame_filter.o ./libhb/hb_dict.o ./libhb/comb_detect.o ./libhb/declpcm.o ./libhb/batch.o ./libhb/muxcommon.o ./libhb/param.o ./libhb/enctheora.o ./libhb/qsv_common.o ./libhb/encavcodec.o ./libhb/work.o ./libhb/detelecine.o ./libhb/unsharp.o ./libhb/deinterlace.o ./libhb/pad.o ./libhb/reader.o ./libhb/audio_remap.o ./libhb/decavcodec.o ./libhb/qsv_filter_pp.o ./libhb/denoise.o ./libhb/audio_resample.o ./libhb/grayscale.o ./libhb/qsv_memory.o ./libhb/encvorbis.o ./libhb/hb.o ./libhb/handbrake/eedi2.h ./libhb/handbrake/decavsub.h ./libhb/handbrake/hbffmpeg.h ./libhb/handbrake/handbrake.h ./libhb/handbrake/hb_dict.h ./libhb/handbrake/h265_common.h ./libhb/handbrake/common.h ./libhb/handbrake/ports.h ./libhb/handbrake/qsv_filter.h ./libhb/handbrake/hbavfilter.h ./libhb/handbrake/colormap.h ./libhb/handbrake/avfilter_priv.h ./libhb/handbrake/hb_json.h ./libhb/handbrake/ssautil.h ./libhb/handbrake/nal_units.h ./libhb/handbrake/vce_common.h ./libhb/handbrake/hbtypes.h ./libhb/handbrake/dvd.h ./libhb/handbrake/plist.h ./libhb/handbrake/compat.h ./libhb/handbrake/decomb.h ./libhb/handbrake/nlmeans.h ./libhb/handbrake/preset.h ./libhb/handbrake/preset_builtin.h ./libhb/handbrake/internal.h ./libhb/handbrake/audio_remap.h ./libhb/handbrake/param.h ./libhb/handbrake/h264_common.h ./libhb/handbrake/qsv_common.h ./libhb/handbrake/qsv_libav.h ./libhb/handbrake/lang.h ./libhb/handbrake/bits.h ./libhb/handbrake/qsv_filter_pp.h ./libhb/handbrake/nvenc_common.h ./libhb/handbrake/audio_resample.h ./libhb/handbrake/qsv_memory.h ./libhb/handbrake/taskset.h ./libhb/handbrake/encx264.h ./libhb/libhandbrake.a /usr/bin/rm -f ./test/test.o ./test/parsecsv.o ./HandBrakeCLI make -C ./gtk/ clean make[1]: *** gtk/: No such file or directory. Stop. make: *** [../gtk/module.rules:43: gtk.clean] Error 2
If i just push through it i get with what appears to be a working HandbrakeCLI (though i did not test it) but i don't have gui.
I've tried not using that specific version of the source code you use but the latest 1.4.1 and it gets stuck at the same step leading to the same result.
In an old ubutntu post this seems related to missing libgtk2.0-dev or libgtk-3-dev but mines are installed and up to date. https://askubuntu.com/questions/397432/fatal-error-gtk-gtk-h-no-such-file-or-directory-using-make#397436
My raspberry pi 4 is up to date with Twister OS (raspbian based).
Thanks in advance for your help.