Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DroidCam #851

Closed
open-sorcerer64 opened this issue Jul 29, 2021 · 34 comments
Closed

DroidCam #851

open-sorcerer64 opened this issue Jul 29, 2021 · 34 comments

Comments

@open-sorcerer64
Copy link
Contributor

open-sorcerer64 commented Jul 29, 2021

DroidCam on Raspberry Pi

I have created the install script, but can't find a way to make the uninstall script.

Here is the project link --> https://github.com/open-sorcerer64/Droid-Cam-RPi

@Itai-Nelken and @Botspot what do you think

BTW, Get well soon @Botspot

@open-sorcerer64
Copy link
Contributor Author

No update guys!

@Itai-Nelken
Copy link
Contributor

Sorry, I don't have time to review the scripts right now. But it's on my todo list.

@techcoder20
Copy link
Contributor

Why do use && in every command, and also why do you install every dependency with one separate command, and instead of providing the tar.gz cant you provide the pre built deb, and what should the droidcam-raspberrypi-auto-install folder have ? Also aren't you installing/building in the droidcam-raspberrypi-auto-install directory so shouldn't removing that and uninstalling the dependencies be enough for uninstalling the app?

@open-sorcerer64
Copy link
Contributor Author

open-sorcerer64 commented Aug 2, 2021

Hello

Why do use && in every command, and also why do you install every dependency with one separate command

I didn't knew that you can run the script even without using && which I will improve. I installed every dependency with a separate command because I was afraid of breaking the script, also this script will use pkg-install when it comes on Pi-Apps

and instead of providing the tar.gz cant you provide the pre built deb

I don't know how to make debs or make apt repos, so....... You can help me if you know, on my Discord

and what should the droidcam-raspberrypi-auto-install folder have

The script and the repository, I guess

@techcoder20
Copy link
Contributor

I don't know how to make debs or make apt repos, so......

Are you not making and installing a deb here

sudo make install 
sudo make deb 
sudo dpkg -i libjpeg-turbo_2.1.0_armhf.deb

Cant you just add that deb file to your repo so that your dont have to build it every time

@open-sorcerer64
Copy link
Contributor Author

debs.tar.gz

@techcoder20 what do you think, will this work

@open-sorcerer64
Copy link
Contributor Author

open-sorcerer64 commented Aug 9, 2021

Hello everyone

So, I have made the deb files as insisted by @techcoder20 you can see it at https://github.com/open-sorcerer64/Droid-Cam-RPi/tree/deb-testing
I have not created the scripts as I am not sure if this will work or not, but it should be simple. I have done other things like adding the icon and stuff
DroidCam.zip

@Itai-Nelken and @Botspot what do you think

@open-sorcerer64
Copy link
Contributor Author

Anyone who checked??

@Itai-Nelken
Copy link
Contributor

if the debs work than all that's left to do is to write the scripts.
unfortunately we don't really have time for that... so can you write the scripts? if you need help just ask.

@open-sorcerer64
Copy link
Contributor Author

I can't make the script! Things aren't working and also I have exams. Can you do it @Botspot?

@open-sorcerer64
Copy link
Contributor Author

Anyone

@Itai-Nelken
Copy link
Contributor

we don't have the time to make the scripts...

@open-sorcerer64
Copy link
Contributor Author

we don't have the time to make the scripts...

Neither do I, so..... I think we should suspend this issue for now.

@open-sorcerer64
Copy link
Contributor Author

DroidCam.zip

Hello

Guys, I have made the install and uninstall scripts for both 32 and 64 bit. Please check

Also, I know it isn't perfect as we need to add desktop icons and stuff but I'll do it after the scripts are approved by @Botspot

@cycool29
Copy link
Contributor

Not working for me, it shows the error:

Installing DroidCam...
Cloning into 'Droid-Cam-RPi'...
Running pkg-install...
Running sudo apt update...


Hit:1 https://packages.microsoft.com/ubuntu/21.04/prod hirsute InRelease
Hit:2 https://itai-nelken.github.io/weekly-box86-debs/debian  InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Hit:4 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:5 https://deb.oxen.io buster InRelease
Hit:6 http://download.opensuse.org/repositories/home:/SmartFinn:/hardcode-tray/Debian_10  InRelease
Hit:7 https://download.docker.com/linux/raspbian buster InRelease
All packages are up to date.

Installing local libjpeg-turbo package...


libjpeg-turbo is already the newest version (2.1.0-20210803).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
libjpeg-turbo set to automatically installed.

Creating dummy deb...

Installing dummy deb...


Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pi-apps-45c61c0c : Depends: gtk-3.0 but it is not installable
E: Unable to correct problems, you have held broken packages.

Apt finished.
Failed to install the packages!
APT reported these errors:
E: Unable to correct problems, you have held broken packages.
Cloning into 'droidcam'...
gcc  -Wall -O2 src/droidcam-cli.c src/connection.c src/settings.c src/decoder.c src/decoder_snd.c src/decoder_v4l2.c src/av.c src/usb.c src/queue.c -o droidcam-cli  -I/opt/libjpeg-turbo/include /opt/libjpeg-turbo/lib`getconf LONG_BIT`/libturbojpeg.a `pkg-config --libs --cflags libswscale libavutil` -lspeex -lasound -lpthread -lm -lusbmuxd
gcc  -Wall -O2 src/droidcam.c src/resources.c src/connection.c src/settings.c src/decoder.c src/decoder_snd.c src/decoder_v4l2.c src/av.c src/usb.c src/queue.c -o droidcam  `pkg-config --libs --cflags gtk+-3.0` `pkg-config --libs x11` `pkg-config --cflags --libs appindicator3-0.1` -I/opt/libjpeg-turbo/include /opt/libjpeg-turbo/lib`getconf LONG_BIT`/libturbojpeg.a `pkg-config --libs --cflags libswscale libavutil` -lspeex -lasound -lpthread -lm -lusbmuxd
src/droidcam.c: In function ‘the_callback’:
src/droidcam.c:276:4: warning: ‘gtk_menu_popup’ is deprecated: Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead [-Wdeprecated-declarations]
    gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, 0);
    ^~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtklabel.h:34,
                 from /usr/include/gtk-3.0/gtk/gtkaccellabel.h:35,
                 from /usr/include/gtk-3.0/gtk/gtk.h:33,
                 from src/droidcam.c:9:
/usr/include/gtk-3.0/gtk/gtkmenu.h:138:9: note: declared here
 void    gtk_menu_popup    (GtkMenu        *menu,
         ^~~~~~~~~~~~~~
src/droidcam.c:281:4: warning: ‘gtk_menu_popup’ is deprecated: Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead [-Wdeprecated-declarations]
    gtk_menu_popup(GTK_MENU(wbMenu), NULL, NULL, NULL, NULL, 0, 0);
    ^~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtklabel.h:34,
                 from /usr/include/gtk-3.0/gtk/gtkaccellabel.h:35,
                 from /usr/include/gtk-3.0/gtk/gtk.h:33,
                 from src/droidcam.c:9:
/usr/include/gtk-3.0/gtk/gtkmenu.h:138:9: note: declared here
 void    gtk_menu_popup    (GtkMenu        *menu,
         ^~~~~~~~~~~~~~
Copying files
+ cp uninstall /opt/droidcam-uninstall
+ cp icon2.png /opt/droidcam-icon.png
+ cp droidcam /usr/local/bin/
+ cp droidcam-cli /usr/local/bin/
+ set +x
Done
Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory '/home/pi/droidcam/v4l2loopback'
make -C /lib/modules/5.10.63-v8+/build M=/home/pi/droidcam/v4l2loopback modules
make[1]: Entering directory '/home/pi/droidcam/v4l2loopback'
make[1]: *** /lib/modules/5.10.63-v8+/build: No such file or directory.  Stop.
make[1]: Leaving directory '/home/pi/droidcam/v4l2loopback'
make: *** [Makefile:8: all] Error 2
make: Leaving directory '/home/pi/droidcam/v4l2loopback'

Failed to install DroidCam!
🔺Need help? Copy the ENTIRE terminal output or take a screenshot.
Please ask on Github: https://github.com/Botspot/pi-apps/issues/new/choose
Or on Discord: https://discord.gg/RXSTvaUvuu

@open-sorcerer64
Copy link
Contributor Author

@cycool29 your apt repos are PROBABLY corrupt. Can you please try to fix it. Also, for now you can install the dependencies from apt if pkg-install doesn't work.

@open-sorcerer64
Copy link
Contributor Author

@Botspot can you please check

@Itai-Nelken
Copy link
Contributor

That isn't a messed up apt. the package gtk-3.0 doesn't exist.
also the error that stopped the script is make[1]: *** /lib/modules/5.10.63-v8+/build: No such file or directory. Stop.

@open-sorcerer64
Copy link
Contributor Author

@cycool29 can you please install cmake and try again

@Itai-Nelken
Copy link
Contributor

Itai-Nelken commented Oct 17, 2021

@cycool29 can you please install cmake and try again

That's not the problem, the problem is this line: make[1]: *** /lib/modules/5.10.63-v8+/build: No such file or directory. Stop.
Specifically /lib/modules/5.10.63-v8+/build: No such file or directory..

@cycool29
Copy link
Contributor

@cycool29 can you please install cmake and try again

Sorry for the late reply.

Well I found I messed up my kernel and I reflashed my pi and the make[1]: *** /lib/modules/5.10.63-v8+/build: No such file or directory. Stop. problem solved.

I have improved your scripts in :

  • Use git_clone
  • Install libjpeg-turbo_2.1.0_armhf.deb with pkg-install
  • Added libasound2-dev for audio and removed gtk+-3.0 as it is not a package but regex
  • Added libplist-dev (from the dependencies list)
  • Added sudo ./install-sound for audio
  • Added few error messages
  • Use sudo if make failed
  • Use sudo for uninstallation
  • Cleanup after installation (remove Droid-Cam-RPi folder)

Tested on RPi OS armhf, works well with Google Meet, will test later with Zoom.

DroidCam.zip

@open-sorcerer64
Copy link
Contributor Author

@cycool29 can you please install cmake and try again

That's not the problem, the problem is this line: make[1]: *** /lib/modules/5.10.63-v8+/build: No such file or directory. Stop. Specifically /lib/modules/5.10.63-v8+/build: No such file or directory..

I didn't face this issue

@open-sorcerer64
Copy link
Contributor Author

@cycool29 can you please install cmake and try again

Sorry for the late reply.

Well I found I messed up my kernel and I reflashed my pi and the make[1]: *** /lib/modules/5.10.63-v8+/build: No such file or directory. Stop. problem solved.

I have improved your scripts in :

  • Use git_clone
  • Install libjpeg-turbo_2.1.0_armhf.deb with pkg-install
  • Added libasound2-dev for audio and removed gtk+-3.0 as it is not a package but regex
  • Added libplist-dev (from the dependencies list)
  • Added sudo ./install-sound for audio
  • Added few error messages
  • Use sudo if make failed
  • Use sudo for uninstallation
  • Cleanup after installation (remove Droid-Cam-RPi folder)

Tested on RPi OS armhf, works well with Google Meet, will test later with Zoom.

DroidCam.zip

Thanks 😊
It works with zoom. I am going to see if there's a new version of libjpeg-turbo that we can use

Also, can anyone test it on 64 bit? The process should be same except you'll have to install the arm64 version of libjpeg-turbo.

@open-sorcerer64
Copy link
Contributor Author

I just found a new version of libjpeg-turbo. I am adding it to the script and project file

@open-sorcerer64
Copy link
Contributor Author

@Botspot
DroidCam.zip
DroidCam is now completely ready for testing and merging it to Pi-Apps

@open-sorcerer64
Copy link
Contributor Author

open-sorcerer64 commented Oct 19, 2021

Also, I think gtk+-3.0 is important but I am not sure

It gave me an error without it

@cycool29
Copy link
Contributor

Also, I think gtk+-3.0 is important but I am not sure

It gave me an error without it

The gtk+-3.0 is not a apt package, it is a regex.
The name for it on apt is libgtk-3-dev. I think libgtk-3-dev and build-essential should be added to the pkg-install

But sometimes pkg-config can't find the gtk+-3.0. This often occurs if the PKG_CONFIG_PATH variable is not set correctly. So I added these few lines on my improved script:

#unset PKG_CONFIG_PATH if pkg-config unable to find gtk+3.0
if ! pkg-config --modversion gtk+3.0 &>/dev/null; then
  unset PKG_CONFIG_PATH
fi

This will check if pkg-config is able to find gtk+-3.0, if false, unset PKG_CONFIG_PATH .
This solution is from this stackoverflow answer.

However, from the stackoverflow link, unsetting PKG_CONFIG_PATH sometimes won't fix the problem. It needs further debug and check for the correct path for PKG_CONFIG_PATH, but this is a bit hard for the script to do so for the user. Maybe we can add these lines in the install script:

# Check again if pkg-config is able to find gtk+-3.0 module
if ! pkg-config --modversion gtk+3.0 &>/dev/null; then
  error "pkg-config failed to find gtk+-3.0 module! \nPlease follow the instruction from https://stackoverflow.com/a/50038996 and run the script again."
fi

@cycool29
Copy link
Contributor

cycool29 commented Nov 2, 2021

Any updates on this? I think it is ready to put on pi-apps. @Botspot

@cycool29
Copy link
Contributor

cycool29 commented Nov 2, 2021

Except for the gtk+-3.0 problem. Everything works

You said you got an error without it, what is the error?

@cycool29 cycool29 mentioned this issue Dec 3, 2021
@open-sorcerer64
Copy link
Contributor Author

@Botspot DroidCam is ready to be added to Pi-Apps

@Botspot
Copy link
Owner

Botspot commented Jan 1, 2022

@Botspot DroidCam is ready to be added to Pi-Apps

PR #1323 still has open suggestions to be made. Once all discussion is done I'd expect it can be merged.

@cycool29
Copy link
Contributor

cycool29 commented Jan 3, 2022

#1239

@Ankan-cyber
Copy link

I have seen the repo uses libjpeg 2.1.3 I have compiled in 2.1.4 version repo for libjpeg
I have another repo that have droidcam cli and gu but the executable is compiled from only arm64

Droidcam repo

Libjpeg rpo

@theofficialgman
Copy link
Collaborator

See #1239 (comment)

@theofficialgman theofficialgman closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants