superuser789 / MediaPipe-on-RaspberryPi

MediaPipe on Raspberry Pi
41 stars 3 forks source link

Build errors rpi3 #5

Closed johncblacker closed 3 years ago

johncblacker commented 3 years ago

I tried a build and got errors: cannot find -lImath cannot find -lIlmImf cannot find -lIex cannot find -lHalf cannot find -lIlmThread cannot find -ldc1394

Installed dependencies noted in other build error issue, installed ffmpeg and opencv from this repository.

johncblacker commented 3 years ago

Went back and install some of the dependencies and it built. Now, where is the .whl file located? I did python setup.py bdist_whl which was supposed to put the .whl file in the same directory as the setup.py file...but I can't find it...

johncblacker commented 3 years ago

So, build did not produce a .whl output file and no "dist" directory. So, I decided to start from scratch. I deleted the mediapipe-0.8.4 directory entirely, unzipped the .tar.gz again and tried to build using: python setup.py bdist_wheel --universal (read --universal was needed to create wheel file) but now I'm encountering problems during the build where at various places init.py file is missing. I looked through the raw source and the file is indeed missing in the places the build is complaining about. Went to the google directory for the latest mediapipe master and there are no init.py files there either. What in the heck is going on? Did I miss a step somewhere? My recollection is that the init.py is needed in packages; but I'm not sure about the requirement in package sub-directories. HELP! The first place I encountered the error was in the mediapipe/calculators directory - so I added a init.py there and also to mediapipe/modules but after I tried the build it complained about another sub-directory AND the init.py I put in mediapipe/calculators was GONE! I'm really frustrated now and apparently don't know how to proceed.

superuser789 commented 3 years ago

Thank you for trying it out. I'll build mediapipe from the latest sources to see if there is any new change and will get back to you.

johncblacker commented 3 years ago

OK, thanks. I'm specifically interested in the ability to change models. For tflite there's "front" or "back" I believe for use with android or ios phones. There used to be "full_range" and "short_range" models for face detection but as I look at the actual source out on github for google mediapipe, I don't see a way to change the model anymore - I see reference to "model_selection" but that doesn't appear in the 0.8.4 source. I'd be interested in knowing how you're able to build this given I'm having such a devil of a time doing so.

superuser789 commented 3 years ago

ok. I'll look into it. I have a rooted android phone with snapdragon 855 processor (8 cores), 6GB LPDDR4X ram & storage 128GB UFS. I have mounted raspbian filesystem image and run it in chroot environment. Just replaced the uname binary with uname script to show the uname cmd output same as visible on rpi. I first build in chroot environment, make any changes if needed for building it successfully (takes about 50 minutes which includes building opencv & mediapipe). Finally after successful build, I build on rpi system (though, I have not seen much difference in the performance between the built mediapipe ) .

johncblacker commented 3 years ago

Decided to give a rebuild from the mediapipe sources and followed the directions in your README.md. Tried running a simple face detection app and got a failure with "import mediapipe as mp" statement. The output is: *** output starts next line ** Traceback (most recent call last): File "", line 1, in File "/home/pi/ml-projects/ex-mediapipe/mymedpipeEnv/lib/python3.7/site-packages/mediapipe/init.py", line 16, in from mediapipe.python import * File "/home/pi/ml-projects/ex-mediapipe/mymedpipeEnv/lib/python3.7/site-packages/mediapipe/python/init.py", line 17, in from mediapipe.python._framework_bindings import resource_util ImportError: /home/pi/ml-projects/ex-mediapipe/mymedpipeEnv/lib/python3.7/site-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: _ZN3ruy28Pack8bitColMajorForNeon2ColsERKNS_14PackParams8bitE ***** end of output ** Don't know where to go from here, perhaps something I did or didn't do in the build? Do you have any ideas? Thanks.

johncblacker commented 3 years ago

Still trying...found a post that suggested modifying the third_party BUILD with NEON off. Rebuilt and still got same error. I'm going to uninstall the repo I built, re-install from the original mediapipe-rpi3 that I have and give my example a try. If it works, then my build is the problem; if it doesn't work, then my environment must be the issue. Will let you know.

johncblacker commented 3 years ago

The result of my experiment are: your original build works, my build does not. So, I guess I made some kind of mistake somewhere in the build. Before I undertake another build (which on my RPi takes several hours) I'd like to find out definitively what my error is (or I could just run your latest build presuming you're using the latest mediapipe sources. The latest sources support the use of the "model_selection=" parameter on the init of the FaceDetection class as documented on the mediapipe web page.

johncblacker commented 3 years ago

Tried copying the _framework...so file from your distro to my site-packages just to see if that'd make a difference and it did not. So, now I'm re-doing the build but following the instructions from one of the mediapipe support folks. This'll take a long time...hours...be done this evening sometime.

johncblacker commented 3 years ago

I give up! I've tried everything I could think of to build the mediapipe from latest sources; I even had problems that were generally diagnosed as bazel problems and had to go back and try to find and build a version of bazel that'd work. All I ended up doing was going down more and more rabbit holes and burning up time and getting frustrated at the lack of general support for both mediapipe and bazel - especially on the RPi. So, I'll fall back to your current build and move on. If you ever get the latest sources to build, let me know.

johncblacker commented 3 years ago

Well, I haven't given up - yet. I used nm -A to list the symbols in the _framework_bindings.cpython-37m-arm-linux-gnueabihf.so file in the mediapipe-rpi3 version (0.8.4) and in the version I built from current sources and the symbol that appears in the error as being undefined is the same in both of the files so I can't explain why it would be reported as an undefined symbol - IT'S THERE! Have you made any progress building from current sources?

superuser789 commented 3 years ago

Decided to give a rebuild from the mediapipe sources and followed the directions in your README.md. Tried running a simple face detection app and got a failure with "import mediapipe as mp" statement. The output is: ***** output starts next line ** Traceback (most recent call last): File "", line 1, in File "/home/pi/ml-projects/ex-mediapipe/mymedpipeEnv/lib/python3.7/site-packages/mediapipe/init.py", line 16, in from mediapipe.python import * File "/home/pi/ml-projects/ex-mediapipe/mymedpipeEnv/lib/python3.7/site-packages/mediapipe/python/init**.py", line 17, in from mediapipe.python._framework_bindings import resource_util ImportError: /home/pi/ml-projects/ex-mediapipe/mymedpipeEnv/lib/python3.7/site-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: _ZN3ruy28Pack8bitColMajorForNeon2ColsERKNS_14PackParams8bitE ***** end of output ** Don't know where to go from here, perhaps something I did or didn't do in the build? Do you have any ideas? Thanks.

The solution was posted by arron2003 here. Add those flags & rebuild it again. I also noticed that there was some vagueness in Step 8 as there are two lines with '--compilation_mode=opt'. Those flags are needed to be added in function bazel_build inside class BuildBazelExtension after '--compilation_mode=opt'. Sorry for that. I have made the changes needed for building mediapipe 0.8.7 here.

superuser789 commented 3 years ago

Well, I haven't given up - yet. I used nm -A to list the symbols in the _framework_bindings.cpython-37m-arm-linux-gnueabihf.so file in the mediapipe-rpi3 version (0.8.4) and in the version I built from current sources and the symbol that appears in the error as being undefined is the same in both of the files so I can't explain why it would be reported as an undefined symbol - IT'S THERE! Have you made any progress building from current sources?

Apologies. I was caught up with some work. I built the latest mediapipe release 0.8.7 & ran it successfully. You may test the latest package for RPi 3 from here.

johncblacker commented 3 years ago

Not a problem, I was busy with other projects as well. Thanks for the re-build. I'm building with a change suggested by mediapipe support. Unfortunately, it's 4-5hr build. After that build completes I'm going to give it a shot and if it fails I'll load your build and give it a shot. I'm still curious how you can build successfully, while I can't. Are you building on a pi? or are you building on a rooted phone? If a phone, which one and how did you set it up - just curious.

superuser789 commented 3 years ago

Not a problem, I was busy with other projects as well. Thanks for the re-build. I'm building with a change suggested by mediapipe support. Unfortunately, it's 4-5hr build. After that build completes I'm going to give it a shot and if it fails I'll load your build and give it a shot. I'm still curious how you can build successfully, while I can't. Are you building on a pi? or are you building on a rooted phone? If a phone, which one and how did you set it up - just curious.

I first build on a rooted LG G8X having snapdragon 855 processor (8 cores) & 6GB LPDDR4X ram. I have mounted Raspbian system img and run in chroot environment using chroot script available for android.

johncblacker commented 3 years ago

I have more questions in my effort to understand why your builds work and mine don't. If you could please help? 1.) are you running a raspbian lite or desktop and is it basically a minimal install? 2.) what version of bazel are you running? 3.) what version (if any) of opencv did you install via apt (if any); 4.) are you performing the build under root? 5.) are you following the "recipe" posted in the readme for rPi 3? 6.) when you test, do you create a "new" environment (presuming you're using one at all) or are you using the global one? 7.) what's in your environment when you install the mediapipe wheel; or are you letting pip load the dependencies? 8.) what version of opencv-contrib is in the python site-packages?

Thanks for your help. I'm planning on grabbing a new sd card, reinstalling raspbian and trying the build with a minimal install because I think there just has to be something in my environment that is messing up the mediapipe build. Your help has been much appreciated and answers to the above questions would go a long way towards helping me out. BTW, your build worked on my machine (0.8.7 version) and it supports the use of "model_selection=0 (or 1)" depending on whether you want to use the short-range or long-range model. THANKS!

superuser789 commented 3 years ago

No problem.

  1. raspbian lite
  2. bazel 4.0.0
  3. OpenCV 4.5.2 (Not official ; built using guide )
  4. As user Pi
  5. Yes, I build them using guides.
  6. Just the global one
  7. First I install the required dependency packages using pip. Then install the mediapipe package
  8. Same version as that of OpenCV i.e. 4.5.2

Could you describe the problem you are facing while building ?

johncblacker commented 3 years ago

I was reading the requirements for the ffmpeg install tutorial and he specifically mentions using "stretch" - is that what you're using or have you found that you can safely use the latest "buster?" I'm going to give the build another shot. If need be I can pull out another sd card and load an earlier image to it.

superuser789 commented 3 years ago

I am building on the latest Raspbian buster (10). All the packages are updated.

johncblacker commented 3 years ago

I tried building ffmpeg using the vidware script and ran into an error: dpkg: error processing archive /home/pi/Vidware_Build/x264/x264_0.155-1_armhf.deb (--install): trying to overwrite '/usr/include/x264.h', which is also in package libx264_dev:armhf 2:0.155.2917+git0a84d98-rpi1. I'm wondering if this might have to do with the fact that I already had libx264-dev/oldstable,now 2:0.155.29+git0a84d98-2+rpi1 armhf installed? I believe I already had a ffmpeg and it's pre-req's installed; but I don't remember if it was via your repo or just simply by using apt. I'm going to try again from a fresh buster img instead of the one I've been mucking with. BTW, when you build on your LG PHONE are you using vnc from a p/c or mac?

superuser789 commented 3 years ago

You can try this guide. Make sure that the packages fdk-aac, mp3lame, libass, x264 are already installed and remove any pre installed x264 package. I run ssh server (in chroot raspbian) on my LG phone and run commands over ssh using putty ssh client on windows.

johncblacker commented 3 years ago

I'm a little confused. Your comment says to ensure the 4 packages listed are already installed, but then you say remove any pre-installed x264 package. So, removed the x264 but leave the others installed? BTW, I've tried with a vanilla raspbian-lite Buster image, but not everything completed successfully and the ffmpeg .deb package wasn't built nor did the "mpv" command test work either. Don't know if there's any support on github for this, but there's the caveat about test with "stretch" only so I don't expect the developer to support on Buster.

johncblacker commented 3 years ago

I read the guide and copied the script – that’s what I was using to build; however, I keep getting errors near the end, beginning with the build of ffmpeg and onward. I think I’m about done trying to build mediapipe – I’ve spent way too much time on it and have other things to do. I even read most of the dialog following the tutorial looking for an answer, but didn’t find one from RPi-Mike the producer of the script to build ffmpeg, etc. While I can understand he put a lot of work into it, I also believe

that it’s going to become “stale” unless a solution for Buster and beyond becomes available.

Thanks for your help. Your build of mediapipe works well and I was able to switch the model to the longer-range one in order to detect faces at a greater distance – which is exactly what I needed from the latest release – THANKS AGAIN!

John

From: superuser789 @.> Sent: Tuesday, September 21, 2021 12:45 AM To: superuser789/MediaPipe-on-RaspberryPi @.> Cc: John Blacker @.>; Author @.> Subject: Re: [superuser789/MediaPipe-on-RaspberryPi] Build errors rpi3 (#5)

You can try this guide https://github.com/superuser789/MediaPipe-on-RaspberryPi/blob/main/BuildingFFMPEG%26OpenCV.md#building-ffmpeg . Make sure that the packages fdk-aac, mp3lame, libass, x264 are already installed and remove any pre installed x264 package. I run ssh server (in chroot raspbian) on my LG phone and run commands over ssh using putty ssh client on windows.

— You are receiving this because you authored the thread. Reply to this email directly, https://github.com/superuser789/MediaPipe-on-RaspberryPi/issues/5#issuecomment-923619636 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AB6WAAXVP3ZU3QP3EKCNDXDUDAEURANCNFSM5CZWFZAA unsubscribe. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub Android. https://github.com/notifications/beacon/AB6WAAQNFDZHTCIL3TSP4NTUDAEURA5CNFSM5CZWFZAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG4GVCNA.gif

superuser789 commented 3 years ago

I'm a little confused. Your comment says to ensure the 4 packages listed are already installed, but then you say remove any pre-installed x264 package. So, removed the x264 but leave the others installed? BTW, I've tried with a vanilla raspbian-lite Buster image, but not everything completed successfully and the ffmpeg .deb package wasn't built nor did the "mpv" command test work either. Don't know if there's any support on github for this, but there's the caveat about test with "stretch" only so I don't expect the developer to support on Buster.

A particular ffmpeg is built on specific versions of fdk-aac, mp3lame, libass, x264.

First remove the pre installed fdk-aac, mp3lame, libass, x264, ffmpeg packages & these also : sudo apt remove libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavutil56

Then either install from official repository : sudo apt install ffmpeg or build all the packages using guide.

superuser789 commented 3 years ago

I read the guide and copied the script – that’s what I was using to build; however, I keep getting errors near the end, beginning with the build of ffmpeg and onward. I think I’m about done trying to build mediapipe – I’ve spent way too much time on it and have other things to do. I even read most of the dialog following the tutorial looking for an answer, but didn’t find one from RPi-Mike the producer of the script to build ffmpeg, etc. While I can understand he put a lot of work into it, I also believe that it’s going to become “stale” unless a solution for Buster and beyond becomes available. Thanks for your help. Your build of mediapipe works well and I was able to switch the model to the longer-range one in order to detect faces at a greater distance – which is exactly what I needed from the latest release – THANKS AGAIN! John

Thanks for trying out the mediapipe package. I had successfully built the latest ffmpeg & mpv on raspbian buster. Could you share the error logs you are getting while building ffmpeg, mpv and mediapipe ?

johncblacker commented 3 years ago

I have attached a txt file containing the build log from building mpv -on which is where the failure is now; At the end you’ll see a list of the .deb files created and what’s missing is mpv. No point in trying to build mediapipe until I can get this build script to complete, is there? I know I can install ffmpeg and opencv using apt, but that might just put me back to my original mediapipe runtime error which is:

“ImportError: /home/pi/ml-projects/ex-mediapipe/mymedpipeEnv/lib/python3.7/site-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: _ZN3ruy28Pack8bitColMajorForNeon2ColsERKNS_14PackParams8bitE”

It appears from my research that a number of people are getting a similar error (although the symbol itself differs) and mediapipe support is blaming it on a problem in tf-lite. I opened an issue on the mediapipe git, but the response was “there’s nothing we can do” and someone suggested I open a new issue regarding a request for new functionality, which I did (I asked them for full build support of mediapipe on Raspberry Pi). I also relayed my dismay for the fact that mediapipe and tensor-flow and tf-lite are all Google creations; therefore, it’s appalling that the groups can’t communicate amongst themselves to fix the problem! Now what’s interesting is that you’re able to build on the Raspberry Pi, whereas I’m not. So, that begs the question about what is it that’s different about my environment (I’m presuming it’s software related) compared to yours that results in the error. I’m using a recent version of Raspbian Desktop, running on a Raspberry Pi 3b+. I do admit that I’ve been working on a number of projects relating to motion and face detection and have installed supporting software. I also have a Google Coral USB device to support tf-lite – that’s my “normal environment” but I did recently create a Raspbian Buster lite image with nothing added to it but what seems to be required to support the vidware script (namely, checkinstall in order to create the .deb packages). So, once I get this ffmpeg build to work (if I ever do) then I’ll move on to the opencv build, then the mediapipe build and see what happens with the “vanilla” Raspbian-lite environment. Of course the mediapipe build on the rpi takes over 5 hours!

Sorry about the long story, but I’ve spent weeks on this (with some time off to try to get a raspberry pi image to work on QEMU running in a VBox virtual Ubuntu 20.04 system – my hope was to then try to build mediapipe there much faster than on the “pi” itself; but no luck making that work, too slow.

thanks for your help!

jb

From: superuser789 @.> Sent: Wednesday, September 22, 2021 3:36 AM To: superuser789/MediaPipe-on-RaspberryPi @.> Cc: John Blacker @.>; Author @.> Subject: Re: [superuser789/MediaPipe-on-RaspberryPi] Build errors rpi3 (#5)

I read the guide and copied the script – that’s what I was using to build; however, I keep getting errors near the end, beginning with the build of ffmpeg and onward. I think I’m about done trying to build mediapipe – I’ve spent way too much time on it and have other things to do. I even read most of the dialog following the tutorial looking for an answer, but didn’t find one from RPi-Mike the producer of the script to build ffmpeg, etc. While I can understand he put a lot of work into it, I also believe that it’s going to become “stale” unless a solution for Buster and beyond becomes available. Thanks for your help. Your build of mediapipe works well and I was able to switch the model to the longer-range one in order to detect faces at a greater distance – which is exactly what I needed from the latest release – THANKS AGAIN! John

Thanks for trying out the mediapipe package. I had successfully built the latest ffmpeg & mpv on raspbian buster. Could you share the error logs you are getting while building ffmpeg, mpv and mediapipe ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/superuser789/MediaPipe-on-RaspberryPi/issues/5#issuecomment-924665293 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6WAAQVLD3CVJ3ZFAPLD6DUDGBMLANCNFSM5CZWFZAA . 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 . https://github.com/notifications/beacon/AB6WAATIOKQM6JZYH2ACOHLUDGBMLA5CNFSM5CZWFZAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG4OULTI.gif


Now preparing to build mpv. This will take about 1 minute.

Setting top to : /home/pi/Vidware_Build/mpv Setting out to : /home/pi/Vidware_Build/mpv/build Checking for waf version in 1.8.4-2.1.0 : ok Checking for program 'cc' : /usr/bin/cc Checking for program 'pkg-config' : /usr/bin/pkg-config Checking for program 'ar' : /usr/bin/ar Checking for program 'rst2html' : /usr/bin/rst2html Checking for program 'rst2man' : /usr/bin/rst2man Checking for program 'rst2pdf' : not found Checking for program 'windres' : not found Checking for program 'perl' : /usr/bin/perl Checking for 'gcc' (C compiler) : /usr/bin/cc Detected target OS: : os-linux Checking for compiler flags -Werror=implicit-function-declaration : yes Checking for compiler flags -Wno-error=deprecated-declarations : yes Checking for compiler flags -Wno-error=unused-function : yes Checking for compiler flags -Wempty-body : yes Checking for compiler flags -Wdisabled-optimization : yes Checking for compiler flags -Wstrict-prototypes : yes Checking for compiler flags -Wno-format-zero-length : yes Checking for compiler flags -Werror=format-security : yes Checking for compiler flags -Wno-redundant-decls : yes Checking for compiler flags -Wvla : yes Checking for LGPL (version 2.1 or later) build : disabled Checking for GPL (version 2 or later) build : yes Checking for internal audio filter chain : yes Checking for mpv CLI player : yes Checking for shared library : disabled Checking for static library : disabled Checking for static build : disabled Checking for whether to include binary compile time : yes Checking for whether to optimize : yes Checking for whether to compile-in debugging information : yes Checking for manpage generation : yes Checking for html manual generation : disabled Checking for pdf manual generation : disabled Checking for dynamic loader : yes Checking for C plugins : yes Checking for zsh completion : disabled Checking for inline assembly (currently without effect) : yes Checking for test suite (using cmocka) : disabled Checking for generate a clang compilation database : disabled Checking for compiler support for noexecstack : yes Checking for linker support for --nxcompat --no-seh --dynamicbase : no Checking for -lm : yes Checking for MinGW : os-win32 not found Checking for POSIX environment : yes Checking for Android environment : no Checking for development environment : yes Checking for Universal Windows Platform : disabled Checking for win32 desktop APIs : os-win32 not found Checking for internal pthread wrapper for win32 (Vista+) : posix found Checking for POSIX threads : yes Checking for GNU C extensions : yes Checking for stdatomic.h : yes Checking for stdatomic.h support or slow emulation : yes Checking for linking with -lrt : yes Checking for iconv : yes Checking for w32/dos paths : os-win32 not found Checking for spawnp()/kill() POSIX support : yes Checking for spawnp()/kill() Android replacement : posix-spawn-native found Checking for any spawnp()/kill() support : yes Checking for Windows pipe support : posix found Checking for glob() POSIX support : yes Checking for glob() win32 replacement : posix found Checking for any glob() support : yes Checking for fchmod() : yes Checking for vt.h : yes Checking for gbm.h : no Checking for GLIBC API for setting thread name : yes Checking for OSX API for setting thread name : glibc-thread-name found Checking for BSD API for setting thread name : glibc-thread-name found Checking for BSD's fstatfs() : no Checking for Linux's fstatfs() : yes Checking for Samba support (makes mpv GPLv3) : disabled Checking for Lua : yes (version found: luajit) Checking for Javascript (MuJS backend) : no ('mujs >= 1.0.0' not found) Checking for SSA/ASS support : yes Checking for libass OSD support : yes Checking for dummy OSD support : libass-osd found Checking for zlib : yes Checking for Bluray support : yes Checking for dvdread support : yes Checking for dvdnav support : yes Checking for DVD/IFO support : yes Checking for cdda support (libcdio) : yes Checking for uchardet support : no ('uchardet' not found) Checking for librubberband support : no ('rubberband >= 1.8.0' not found) Checking for LCMS2 support : no ('lcms2 >= 2.6' not found) Checking for VapourSynth filter bridge (Python) : no ('vapoursynth >= 24 vapoursynth-script >= 23' not found) Checking for VapourSynth filter bridge (Lazy Lua) : no ('vapoursynth >= 24' not found) Checking for VapourSynth filter bridge (core) : vapoursynth not found Checking for libarchive wrapper for reading zip files and more : no ('libarchive >= 3.0.0' not found) Checking for SDL2 : disabled Checking for OSS : yes Checking for RSound audio output : no Checking for sndio audio input/output : disabled Checking for PulseAudio audio output : yes Checking for JACK audio output : no ('jack' not found) Checking for OpenAL audio output : disabled Checking for OpenSL ES audio output : no Checking for ALSA audio output : yes Checking for CoreAudio audio output : no Checking for AudioUnit output for iOS : no Checking for WASAPI audio output : os-win32 not found Checking for Cocoa : no Checking for DRM : no ('libdrm' not found) Checking for DRM Prime ffmpeg support : yes Checking for GBM : gbm.h not found Checking for wayland-scanner : yes Checking for wayland-protocols : no ('wayland-protocols >= 1.14' not found) Checking for Wayland : wayland-protocols not found Checking for X11 : yes Checking for Xv video output : yes Checking for OpenGL Cocoa Backend : cocoa not found Checking for OpenGL X11 Backend : yes Checking for OpenGL X11 EGL Backend : yes Checking for OpenGL DRM EGL Backend : drm not found Checking for OpenGL Wayland Backend : wayland not found Checking for OpenGL Win32 Backend : win32-desktop not found Checking for OpenGL/DirectX Interop Backend : gl-win32 not found Checking for OpenGL ANGLE headers : os-win32 not found Checking for OpenGL Win32 ANGLE Library : egl-angle not found Checking for OpenGL Win32 ANGLE Backend : egl-angle not found Checking for VDPAU acceleration : yes Checking for VDPAU with OpenGL/X11 : yes Checking for VAAPI acceleration : yes Checking for VAAPI (X11 support) : yes Checking for VAAPI (Wayland support) : gl-wayland not found Checking for VAAPI (DRM/EGL support) : egl-drm not found Checking for VAAPI GLX : yes Checking for VAAPI EGL on X11 : yes Checking for VAAPI EGL : yes Checking for CACA : no ('caca >= 0.99.beta18' not found) Checking for JPEG support : yes Checking for Direct3D support : win32-desktop not found Checking for libshaderc SPIR-V compiler (shared library) : no Checking for libshaderc SPIR-V compiler (static library) : no Checking for libshaderc SPIR-V compiler : shaderc-shared not found Checking for libcrossc SPIR-V translator : no ('crossc' not found) Checking for Direct3D 11 video output : win32-desktop not found Checking for Raspberry Pi support : yes Checking for iOS OpenGL ES hardware decoding interop support : no Checking for OpenGL without platform-specific code (e.g. for libmpv) : libmpv-shared not found Checking for MALI via Linux fbdev : no Checking for OpenGL context support : yes Checking for Vulkan context support : no ('vulkan' not found) Checking for EGL helper functions : yes Checking for FFmpeg/Libav present : yes Checking for libav is FFmpeg : yes Checking for libav is Libav : no Checking for Libav/FFmpeg library versions : yes Checking for libavdevice : yes Checking for libavcodec videotoolbox hwaccel : gl-cocoa not found Checking for Videotoolbox with OpenGL : gl-cocoa not found Checking for D3D11VA hwaccel : os-win32 not found Checking for DXVA2 hwaccel : d3d-hwaccel not found Checking for OpenGL/DirectX Interop Backend DXVA2 interop : gl-dxinterop not found Checking for CUDA Headers and dynamic loader : no ('ffnvcodec >= 8.1.24.1' not found) Checking for CUDA hwaccel : ffnvcodec not found Checking for TV interface : disabled Checking for videoio.h : tv not found Checking for videodev2.h : tv not found Checking for Video4Linux2 TV interface : tv not found Checking for libv4l2 support : tv-v4l2 not found Checking for audio input support : tv-v4l2 not found Checking for DVB input module : disabled Checking for w32 executable : os-win32 not found Checking for Apple Remote support : cocoa not found Checking for macOS Touch Bar support : cocoa not found Checking for macOS opengl-cb backend : cocoa not found Writing configuration header: : config.h 'configure' finished successfully (18.902s)


Now building mpv. This will take about 2 minutes.

Waf: Entering directory `/home/pi/Vidware_Build/mpv/build' [1/1] Compiling version.sh [ 2/225] Compiling TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns [ 3/225] Compiling etc/mpv-icon-8bit-16x16.png [ 4/225] Compiling etc/mpv-icon-8bit-32x32.png [ 5/225] Compiling etc/mpv-icon-8bit-64x64.png [ 6/225] Compiling etc/mpv-icon-8bit-128x128.png [ 7/225] Compiling etc/input.conf [ 8/225] Compiling etc/builtin.conf [ 9/225] Compiling sub/osd_font.otf [ 10/225] Compiling player/lua/defaults.lua [ 11/225] Compiling player/lua/assdraw.lua [ 12/225] Compiling player/lua/options.lua [ 13/225] Compiling player/lua/osc.lua [ 14/225] Compiling player/lua/ytdl_hook.lua [ 15/225] Compiling player/lua/stats.lua [ 16/225] Compiling player/javascript/defaults.js [ 17/225] Creating build/ebml_types.h [ 18/225] Creating build/ebml_defs.c [ 19/225] Compiling libmpv/mpv.def [ 20/225] Compiling DOCS/man/mpv.rst [ 21/225] Compiling audio/audio_buffer.c [ 22/225] Compiling audio/chmap.c [ 23/225] Compiling audio/filter/af_lavcac3enc.c [ 24/225] Compiling audio/out/ao.c [ 25/225] Compiling common/version.c [ 26/225] Compiling filters/frame.c [ 27/225] Compiling video/out/bitmap_packer.c [ 28/225] Compiling sub/draw_bmp.c [ 29/225] Compiling sub/dec_sub.c [ 30/225] Compiling video/out/vo_vaapi.c [ 31/225] Compiling sub/ass_mp.c [ 32/225] Compiling video/out/vo_tct.c [ 33/225] Compiling stream/stream_rar.c [ 34/225] Compiling stream/stream_null.c [ 35/225] Compiling stream/stream_mf.c [ 36/225] Compiling stream/stream_memory.c [ 37/225] Compiling video/out/vo_libmpv.c [ 38/225] Compiling video/out/vo_lavc.c [ 39/225] Compiling video/out/vo_rpi.c [ 40/225] Compiling video/out/vo_null.c [ 41/225] Compiling video/out/vo_image.c [ 42/225] Compiling stream/stream_file.c [ 43/225] Compiling stream/stream_edl.c [ 44/225] Compiling video/out/vo.c [ 45/225] Compiling video/out/vo_gpu.c [ 46/225] Compiling stream/stream_dvdnav.c [ 47/225] Compiling stream/stream_dvd_common.c [ 48/225] Compiling video/out/opengl/utils.c [ 49/225] Compiling stream/stream_dvd.c [ 50/225] Compiling stream/stream_cdda.c [ 51/225] Compiling video/out/opengl/libmpv_gl.c [ 52/225] Compiling stream/stream_cb.c [ 53/225] Compiling video/out/opengl/hwdec_vaegl.c [ 54/225] Compiling stream/stream_bluray.c [ 55/225] Compiling stream/stream_avdevice.c [ 56/225] Compiling video/out/opengl/hwdec_rpi.c [ 57/225] Compiling stream/stream.c [ 58/225] Compiling video/out/opengl/egl_helpers.c ../video/out/opengl/hwdec_vaegl.c: In function 'mapper_map': ../video/out/opengl/hwdec_vaegl.c:373:24: error: 'EGL_DMA_BUF_PLANE1_FD_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_FD_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:373:24: note: each undeclared identifier is reported only once for each function it appears in ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:375:24: error: 'EGL_DMA_BUF_PLANE1_OFFSET_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_OFFSET_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _OFFSET_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:377:24: error: 'EGL_DMA_BUF_PLANE1_PITCH_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_PITCH_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _PITCH_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:373:24: error: 'EGL_DMA_BUF_PLANE2_FD_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_FD_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:385:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(2); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:375:24: error: 'EGL_DMA_BUF_PLANE2_OFFSET_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_OFFSET_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _OFFSET_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:385:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(2); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:377:24: error: 'EGL_DMA_BUF_PLANE2_PITCH_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_PITCH_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _PITCH_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:385:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(2); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:373:24: error: 'EGL_DMA_BUF_PLANE3_FD_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_FD_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:387:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(3); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:375:24: error: 'EGL_DMA_BUF_PLANE3_OFFSET_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_OFFSET_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _OFFSET_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:387:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(3); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:377:24: error: 'EGL_DMA_BUF_PLANE3_PITCH_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_PITCH_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _PITCH_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:387:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(3); ^~~~~

Waf: Leaving directory `/home/pi/Vidware_Build/mpv/build' Build failed -> task in 'objects' failed with exit status 1 (run with -v to display more information)


Now installing mpv. This will take about 1 minute.

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL.

The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: y

Preparing package documentation...OK


* Debian package creation selected


This package will be built according to these values:

0 - Maintainer: [ @.*** ] 1 - Summary: [ Package created with checkinstall 1.6.2 ] 2 - Name: [ mpv ] 3 - Version: [ 0.29.0 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ armhf ] 8 - Source location: [ mpv ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ mpv ] 12 - Conflicts: [ ] 13 - Replaces: [ ]

Enter a number to change any of them or press ENTER to continue:

Installing with ./waf install...

========================= Installation results =========================== Waf: Entering directory `/home/pi/Vidware_Build/mpv/build' [1/1] Compiling version.sh [ 19/238] Compiling demux/demux_rar.c [ 20/238] Compiling video/out/opengl/hwdec_vaegl.c [ 21/238] Compiling filters/f_auto_filters.c [ 22/238] Compiling filters/f_decoder_wrapper.c [ 24/238] Compiling video/out/opengl/formats.c [ 27/238] Compiling demux/demux_playlist.c ../video/out/opengl/hwdec_vaegl.c: In function 'mapper_map': ../video/out/opengl/hwdec_vaegl.c:373:24: error: 'EGL_DMA_BUF_PLANE1_FD_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_FD_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:373:24: note: each undeclared identifier is reported only once for each function it appears in ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:375:24: error: 'EGL_DMA_BUF_PLANE1_OFFSET_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_OFFSET_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _OFFSET_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:377:24: error: 'EGL_DMA_BUF_PLANE1_PITCH_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_PITCH_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _PITCH_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:383:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(1); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:373:24: error: 'EGL_DMA_BUF_PLANE2_FD_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_FD_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:385:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(2); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:375:24: error: 'EGL_DMA_BUF_PLANE2_OFFSET_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_OFFSET_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _OFFSET_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:385:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(2); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:377:24: error: 'EGL_DMA_BUF_PLANE2_PITCH_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_PITCH_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _PITCH_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:385:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(2); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:373:24: error: 'EGL_DMA_BUF_PLANE3_FD_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_FD_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _FD_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:387:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(3); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:375:24: error: 'EGL_DMA_BUF_PLANE3_OFFSET_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_OFFSET_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _OFFSET_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:387:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(3); ^~~~~ ../video/out/opengl/hwdec_vaegl.c:377:24: error: 'EGL_DMA_BUF_PLANE3_PITCH_EXT' undeclared (first use in this function); did you mean 'EGL_DMA_BUF_PLANE0_PITCH_EXT'? ADD_ATTRIB(EGL_DMA_BUF_PLANE ## plane ## _PITCH_EXT, \ ^~~~~ ../video/out/opengl/hwdec_vaegl.c:334:31: note: in definition of macro 'ADD_ATTRIB' attribs[num_attribs++] = (name); \ ^~~~ ../video/out/opengl/hwdec_vaegl.c:387:13: note: in expansion of macro 'ADD_PLANE_ATTRIBS' ADD_PLANE_ATTRIBS(3); ^~~~~

Waf: Leaving directory `/home/pi/Vidware_Build/mpv/build' Build failed -> task in 'objects' failed with exit status 1 (run with -v to display more information)

**** Installation failed. Aborting package creation.

Cleaning up...OK

Bye.


Almost finished! The Debian package files are now in the Vidware_Packages folder. You can use them at any time in the future to install all the programs my script just built! Now downloading youtube-dl and a brief 1080p demonstration video from YouTube. All of this should take less than 2 minutes. After the looped video starts playing, feel free to press the q key to quit.

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already up-to-date: youtube_dl in /usr/local/lib/python3.7/dist-packages (2021.6.6)

[youtube] x_Akn8fUBeQ: Downloading webpage ERROR: requested format not available

./vidware: line 600: mpv: command not found

./vidware: line 604: mpv: command not found @.***:~ $ ls Vidware_Packages fdk-aac_0.1.6-1_armhf.deb ffmpeg_4.0.2-1_armhf.deb libass_0.14.0-1_armhf.deb mp3lame_3.100-1_armhf.deb x264_0.155-1_armhf.deb

johncblacker commented 3 years ago

***update 9/22 & 11:19 ****

Tried running the build script on my Raspbian lite image and it failed to complete, but differently than on my Raspbian desktop version.

A message was issued about “libass” missing and indicating that an option was require if libass support is not wanted. I had tried to remove

libass as you suggest, but it wasn’t included on the “lite” version of Raspbian. I might install it and then uninstall it just to see what happens – maybe

I’ll get a different error. Anyway, worth a try.

jb

From: superuser789 @.> Sent: Wednesday, September 22, 2021 3:36 AM To: superuser789/MediaPipe-on-RaspberryPi @.> Cc: John Blacker @.>; Author @.> Subject: Re: [superuser789/MediaPipe-on-RaspberryPi] Build errors rpi3 (#5)

I read the guide and copied the script – that’s what I was using to build; however, I keep getting errors near the end, beginning with the build of ffmpeg and onward. I think I’m about done trying to build mediapipe – I’ve spent way too much time on it and have other things to do. I even read most of the dialog following the tutorial looking for an answer, but didn’t find one from RPi-Mike the producer of the script to build ffmpeg, etc. While I can understand he put a lot of work into it, I also believe that it’s going to become “stale” unless a solution for Buster and beyond becomes available. Thanks for your help. Your build of mediapipe works well and I was able to switch the model to the longer-range one in order to detect faces at a greater distance – which is exactly what I needed from the latest release – THANKS AGAIN! John

Thanks for trying out the mediapipe package. I had successfully built the latest ffmpeg & mpv on raspbian buster. Could you share the error logs you are getting while building ffmpeg, mpv and mediapipe ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/superuser789/MediaPipe-on-RaspberryPi/issues/5#issuecomment-924665293 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6WAAQVLD3CVJ3ZFAPLD6DUDGBMLANCNFSM5CZWFZAA . 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 . https://github.com/notifications/beacon/AB6WAATIOKQM6JZYH2ACOHLUDGBMLA5CNFSM5CZWFZAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG4OULTI.gif

johncblacker commented 3 years ago

Well…I went a created a Stretch image and did the build from there. It worked. I didn’t have to uninstall anything nor did I have to install anything

to make it work. Got all 6 .deb packages. Wonder if they’ll work on my Buster system? What do you think?

jb

From: superuser789 @.> Sent: Wednesday, September 22, 2021 3:36 AM To: superuser789/MediaPipe-on-RaspberryPi @.> Cc: John Blacker @.>; Author @.> Subject: Re: [superuser789/MediaPipe-on-RaspberryPi] Build errors rpi3 (#5)

I read the guide and copied the script – that’s what I was using to build; however, I keep getting errors near the end, beginning with the build of ffmpeg and onward. I think I’m about done trying to build mediapipe – I’ve spent way too much time on it and have other things to do. I even read most of the dialog following the tutorial looking for an answer, but didn’t find one from RPi-Mike the producer of the script to build ffmpeg, etc. While I can understand he put a lot of work into it, I also believe that it’s going to become “stale” unless a solution for Buster and beyond becomes available. Thanks for your help. Your build of mediapipe works well and I was able to switch the model to the longer-range one in order to detect faces at a greater distance – which is exactly what I needed from the latest release – THANKS AGAIN! John

Thanks for trying out the mediapipe package. I had successfully built the latest ffmpeg & mpv on raspbian buster. Could you share the error logs you are getting while building ffmpeg, mpv and mediapipe ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/superuser789/MediaPipe-on-RaspberryPi/issues/5#issuecomment-924665293 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6WAAQVLD3CVJ3ZFAPLD6DUDGBMLANCNFSM5CZWFZAA . 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 . https://github.com/notifications/beacon/AB6WAATIOKQM6JZYH2ACOHLUDGBMLA5CNFSM5CZWFZAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG4OULTI.gif

johncblacker commented 3 years ago

Finally was able to build mediapipe on my rPi. The short version...installed a clean raspbian stretch and used that to build ffmpeg, but opencv wouldn't build there because of cmake version; upgraded from stretch to buster; built opencv; built mediapipe. Of course along the way there were dependencies that were missing that I had to resolve, but I didn't want to just install a whole bunch of packages without their being necessary. Also found a helpful tip on mediapipe github: here's the link to that post: https://github.com/jiuqiant/mediapipe_python_aarch64/blob/main/README.md The key part of that post to me was the two "sed" commands. The fact that it was for aarch64/ rpi4 doesn't matter. After I was done with the build, I tried it out and had a problem imorting cv2! Turns out that earlier on in the whole build chain there was a "sudo apt-get install python3-numpy" which was too old, not to mention it took some time before I found out how to get rid of it. Finally, I got "import cv2" to work and "import mediapipe as mp" to work. I didn't have time to give it a shot with a real facedection.py script; that's left for today when I get time. Thanks for your help along the way. I'm really curious whether I could successfully build a different version of mediapipe with this sd card setup...

johncblacker commented 3 years ago

Finally able to successfully build ffmpeg, opencv and mediapipe from sources. I did have to rely on a binary distro of Bazel 3.7.2.