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

Raspberry PI #6

Closed
RockNHawk opened this issue Jul 16, 2017 · 47 comments
Closed

Raspberry PI #6

RockNHawk opened this issue Jul 16, 2017 · 47 comments

Comments

@RockNHawk
Copy link

RockNHawk commented Jul 16, 2017

Seems not supports Raspberry PI.

root@lx-desktop:/tmp/droidcam-32bit# sudo ./install
Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory '/tmp/droidcam-32bit/v4l2loopback'
make -C /lib/modules/uname -r/build M=pwd
make[1]: Entering directory '/tmp/droidcam-32bit/v4l2loopback'
make[1]: *** /lib/modules/4.4.38-v7+/build: No such file or directory. Stop.
make[1]: Leaving directory '/tmp/droidcam-32bit/v4l2loopback'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/tmp/droidcam-32bit/v4l2loopback'

@SoxxZ
Copy link

SoxxZ commented Dec 30, 2017

same problem here, couldn't fix it with that comment thread

@aramg
Copy link
Collaborator

aramg commented Jan 1, 2018

The required package is linux-headers-uname -r
I am not sure what the correct way to get this on a Pi is. Someone once mentioned this link
https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/

@RanKey1496
Copy link

is this solved?

@interknighterrant
Copy link

I got the linux header issue resolved on a pi...

From
sudo apt install raspberrypi-kernel-headers

Rest of the instructions worked well!

However... the binary packages pre-compiled on the Linux install instructions are for x64_86 ... not arm. So, dev mentioned you have to compile this git on the Pi. I haven't had time to play around with that...

@kichel98
Copy link

kichel98 commented Jul 13, 2020

I managed to install droidcam on Raspberry Pi 4B. Here is the list of steps:

  1. For testing purpose, install droidcam on a phone. After you enter IP number that is shown in app into the browser's address bar, you should see image from your camera.

  2. In order to use droidcam, you need to install libjpeg-turbo.
    Download it from this link and extract.
    Unfortunately, I guess it is required to compile it from source by oneself on Pi. BUILDING.md (Build Procedure > Un*x) is helpful.
    Execute these commands:

cd {build_directory}
cmake -G"Unix Makefiles" {source_directory}
make

where {build_directory} is /opt/libjpeg-turbo/lib32 (if doesn't exist, create these empty directories) and {source_directory} is path to directory which you extracted libjpeg-turbo to.

  1. Now we can install droidcam, according to instructions on GitHub and this site (still we need to compile from sources, due to different architecture).
  • download droidcam from GitHub
  • install linux-headers by executing sudo apt install raspberrypi-kernel-headers
  • install required dependencies (warning: gtk is huge library used to GUI, i don't know if there is some way to omit installing this 2 GB):
gtk+-3.0
libavutil-dev
libswscale-dev
libasound2-dev
libspeex-dev
libusbmuxd-dev
libplist-dev
  • go to droidcam source directory
  • make
  • ./install
  • run ./droidcam-cli <ip> <port>, instead of <ip> and <port> type data shown on your phone

If everything went well, you should be able to take a photo: fswebcam image.jpg

Feel free to add improvements and updates to this answer.

@aramg
Copy link
Collaborator

aramg commented Jul 13, 2020

Thanks!
You can omit gtk+ and just run make droidcam-cli to skip the GUI build.

@archisman-panigrahi
Copy link

archisman-panigrahi commented Aug 10, 2020

Is it possible to use the package libjpeg-turbo-progs in Raspberry Pi instead of building libjpeg-turbo from source, which @kichel98 did? That package installs in /usr/bin instead of /opt/libjpeg-turbo/bin. Also, it does not have the .h files, unlike the libjpeg-turbo package from sourceforge.

@SA7BNT
Copy link

SA7BNT commented Sep 8, 2020

I was trying your "Howto" but always running in to this issue. Am i missing something??

pi@octopi:~/droidcam/linux $ uname -a
Linux octopi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux

Bildschirmfoto 2020-09-08 um 20 53 46

@aramg
Copy link
Collaborator

aramg commented Sep 9, 2020

Is libjpeg-turbo in /opt/libjpeg-turbo/lib32?
Whats the output of find /opt/libjpeg-turbo/lib32

@SA7BNT
Copy link

SA7BNT commented Sep 9, 2020

Is libjpeg-turbo in /opt/libjpeg-turbo/lib32?
Whats the output of find /opt/libjpeg-turbo/lib32

Hey, thats the output of libjpeg-turbo/lib32

pi@octopi:~ $ find /opt/libjpeg-turbo/lib32
/opt/libjpeg-turbo/lib32
/opt/libjpeg-turbo/lib32/gastest.o
/opt/libjpeg-turbo/lib32/djpeg-static
/opt/libjpeg-turbo/lib32/jpegtran-static
/opt/libjpeg-turbo/lib32/rdjpgcom
/opt/libjpeg-turbo/lib32/djpeg
/opt/libjpeg-turbo/lib32/jconfig.h
/opt/libjpeg-turbo/lib32/libturbojpeg.so.0
/opt/libjpeg-turbo/lib32/CTestTestfile.cmake
/opt/libjpeg-turbo/lib32/libturbojpeg.a
/opt/libjpeg-turbo/lib32/jcstest
/opt/libjpeg-turbo/lib32/tjexampletest
..........

@aramg
Copy link
Collaborator

aramg commented Sep 9, 2020

There is a supported to be an 'include' directory there (part of the libjpeg-turbo tar file).
Your screenshot doesn't show all errors, but it seems to be missing the include files

@SA7BNT
Copy link

SA7BNT commented Sep 9, 2020

There is a supported to be an 'include' directory there (part of the libjpeg-turbo tar file).
Your screenshot doesn't show all errors, but it seems to be missing the include files

Thanks for your replay. I start from zerro. Buster 32bit on a Raspberry. Then step by step kichel98 howto. But still getting issue. Inside the "libjpeg-turbo tar file" i can´t find any 'include'
Here is what i get.
Bildschirmfoto 2020-09-09 um 20 41 08
Bildschirmfoto 2020-09-09 um 21 04 35

And this is the last issue. Seems you are right with the include directory. But where do i get it from?

Best

Tim

@aramg
Copy link
Collaborator

aramg commented Sep 9, 2020

mkdir /opt/libjpeg-turbo/include && cp ~/libjpeg-turbo-2.0.4/turbojpeg.h /opt/libjpeg-turbo/include

edit: fixed src file in cp command

@SA7BNT
Copy link

SA7BNT commented Sep 10, 2020

Thanks @aramg you make my day. But im still having a lot of questions. Possible to contact you somewhere? Hitting your email, will this be ok for you?

@aramg
Copy link
Collaborator

aramg commented Sep 10, 2020

Hitting your email, will this be ok for you?

Yes, email is preferred. dev47apps at gmail.

@pinkobalinko
Copy link

Hello!

When I try to run command make droidcam-cli i get following error:

g++ -std=c++11 -x c++ -Wall -fPIC -no-pie 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 -I/opt/libjpeg-turbo/include /opt/libjpeg-turbo/libgetconf LONG_BIT/libturbojpeg.a pkg-config --libs --cflags libswscale libavutil -lspeex -lasound -lpthread -lm -lusbmuxd -o droidcam-cli
/usr/bin/ld: /opt/libjpeg-turbo/lib32/libturbojpeg.a(turbojpeg.c.o): relocations in generic ELF (EM: 3)
/usr/bin/ld: /opt/libjpeg-turbo/lib32/libturbojpeg.a(turbojpeg.c.o): relocations in generic ELF (EM: 3)
/usr/bin/ld: /opt/libjpeg-turbo/lib32/libturbojpeg.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make: *** [Makefile:39: droidcam-cli] Error 1

@DanieleLupo94
Copy link

Thanks!
You can omit gtk+ and just run make droidcam-cli to skip the GUI build.

If you skip GUI build you have to comment cp droidcam /usr/bin/ line in the install-client script.

@DanieleLupo94
Copy link

DanieleLupo94 commented Dec 24, 2020 via email

@derfel1989
Copy link

derfel1989 commented Jan 8, 2021

I managed to install droidcam on Raspberry Pi 4B. Here is the list of steps:
[snip]
cmake -G"Unix Makefiles" {source_directory}

I used the command cmake -G"Unix Makefiles" -S {source_directory} , otherwise had been receiving that the path was not found.

@derfel1989
Copy link

I have this issue here. Is there someone ever had?

image

@DanieleLupo94
Copy link

DanieleLupo94 commented Jan 8, 2021 via email

@derfel1989
Copy link

Have you compiled source code? Il giorno ven 8 gen 2021 alle ore 17:35 derfel1989 notifications@github.com ha scritto:

I have this issue here. Is there someone ever had? [image: image] https://user-images.githubusercontent.com/46175778/104040154-4ee4c000-51a5-11eb-8c1c-de12576485fe.png — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#6 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALG335GJTWQWZOCF444LV53SY4X4PANCNFSM4DTFMAJQ .

Hi Daniele,
I downloaded droidcam_latest.zip as mentioned here https://www.dev47apps.com/droidcam/linux/, and then followed the steps mentioned above.

@duckida
Copy link

duckida commented Jan 8, 2021

I am having this issue:

2021-01-08-091609_1920x1080_scrot

@DanieleLupo94
Copy link

DanieleLupo94 commented Jan 8, 2021 via email

@aramg
Copy link
Collaborator

aramg commented Jan 8, 2021

I am having this issue:

@duckida you'll need to follow the instructions in the comment further up the thread:
#6 (comment)

@aramg
Copy link
Collaborator

aramg commented Jan 8, 2021

Added the instructions to a Wiki page
https://github.com/dev47apps/droidcam/wiki/Raspberry-PI

@ursius2020
Copy link

image
Getting this error. make droidcam-cli was successfull

@aramg
Copy link
Collaborator

aramg commented Feb 9, 2021

I think you are missing raspberrypi-kernel-headers

@gopipolsani
Copy link

im having this issue
Screenshot from 2021-02-12 14-20-55
I know you have to compile the droidcam thing for ARM but how would you compile it

@luisaureliocasoni
Copy link

luisaureliocasoni commented Mar 24, 2021

Hello, I have the same error on my Raspbian installed on VirtualBox.

First, i have installed the library libjpeg62-turbo-dev, but the above error is repeating.

Seeing the ausenting library, i have installed the libturbojpeg0-dev using apt. The above error is not appearing more, but, I have seen other error:

Edit: removed images for readability

@aramg
Copy link
Collaborator

aramg commented Mar 24, 2021

Please follow the Wiki (linked from the README), you need to install libjpeg-turbo from sourceforge, the apt packages for it are inconsistent.

https://github.com/dev47apps/droidcam/wiki/Raspberry-PI

@luisaureliocasoni
Copy link

First, I have also installed the lib-jpegturbo for sourceforge, on the manner described in your guide.

image

But the error of "turbojpeg.h" not found is appearing.

@gopipolsani
Copy link

Hello, I have the same error on my Raspbian installed on VirtualBox.

First, i have installed the library libjpeg62-turbo-dev, but the above error is repeating.

Seeing the ausenting library, i have installed the libturbojpeg0-dev using apt. The above error is not appearing more, but, I have seen other error:

Edit: removed images for readability

I have followed your instructions and am getting the same issue as you. If I uninstall both packages then I get the same first error that I got.

@gopipolsani
Copy link

Please follow the Wiki (linked from the README), you need to install libjpeg-turbo from sourceforge, the apt packages for it are inconsistent.

https://github.com/dev47apps/droidcam/wiki/Raspberry-PI

Yes I did install the libjpeg-turbo from sourceforge successfully but then the first issue comes, how can I fix that?

@aramg
Copy link
Collaborator

aramg commented Mar 24, 2021

@luisaureliocasoni @gopipolsani did you install one of the pre-compiled packages, or did get the libjpeg-turbo source files and compile the lib yourself. Whats the output of find /opt/libjpeg-turbo -type d .
turbojpeg.h should be under /opt/libjpeg-turbo/include

@luisaureliocasoni
Copy link

luisaureliocasoni commented Mar 24, 2021

@luisaureliocasoni @gopipolsani did you install one of the pre-compiled packages, or did get the libjpeg-turbo source files and compile the lib yourself. Whats the output of find /opt/libjpeg-turbo -type d .
turbojpeg.h should be under /opt/libjpeg-turbo/include

@aramg I have followed the steps.

I have unzipped the libjpeg-turbo folder on my personal folder, By example: /home/pi/libjpeg-turbo

After this, I have created and entered on /opt/libjpeg-turbo/lib32 folder, and I have executed the following code:

sudo cmake -G"Unix Makefiles" /home/pi/libjpeg-turbo
sudo make

So, I have to copy all the entire files of /home/pi/libjpeg-turbo to /opt/libjpeg-turbo/include?

Next, I send you the find /opt/libjpeg-turbo -type d output (CLICK ME):

image
image

@aramg
Copy link
Collaborator

aramg commented Mar 24, 2021

@luisaureliocasoni thank you. Can you copy the "include" folder from /home/pi/libjpeg-turbo to /opt/libjpeg-turbo/.
So that you have:

/opt/libjpeg-turbo/include  # <- turbojpeg.h will be here
/opt/libjpeg-turbo/lib32    # libturbojpeg.a will be here

@luisaureliocasoni
Copy link

Okay,

First, I have copied all the entire content of /home/pi/libjpeg-turbo to /opt/libjpeg-turbo/include. After this, I have uninstalled the libjpeg62-turbo-dev and libturbojpeg0-dev.

After all this, I have run the make commands and install... It Works!

image

I have installed the android-tools-adb android-tools-fastboot packages to test the cellphone connection with adb.

Thanks for your help @aramg. I suggest to edit the Raspbian instructions to put the copy the source files to headers folder, for to register this.

@aramg
Copy link
Collaborator

aramg commented Mar 25, 2021

@luisaureliocasoni great, thank you. I updated the Wiki with the extra notes.

@gopipolsani
Copy link

gopipolsani commented Mar 25, 2021

@luisaureliocasoni thank you. Can you copy the "include" folder from /home/pi/libjpeg-turbo to /opt/libjpeg-turbo/.
So that you have:

/opt/libjpeg-turbo/include  # <- turbojpeg.h will be here
/opt/libjpeg-turbo/lib32    # libturbojpeg.a will be here

I dont have a include folder
github droidcam issue troubleshoot

here is output of find /opt/libjpeg-turbo -type df
github troubleshoot2

Note that I am using 64bit version of Raspberry Pi OS

@gopipolsani
Copy link

I made a include folder
github
github2
I did that by first making a directory in opt/libjpeg-turbo called include. and then copying source directory's(in my case home/pi/libjpeg/libjpeg-turbo-2.0.6) files into include. Then I continue installation but when running ./install-video its gives me error
github3

@aramg
Copy link
Collaborator

aramg commented Mar 25, 2021

Did you sudo apt install raspberrypi-kernel-headers ?

@LordyHun
Copy link

So, thanks to the wonderful advices here, I've managed to successfully build & run DroidCam on my raspberry, which was an immensely cool feeling.
Now, I wonder: did anyone manage to get the microphone working? I'd like to use my old phone as a webcam/microphone combo for meetings (the berry is connected to the TV)
I'm also all ears for any workarounds or supplementary software if that's not feasible currently.

@aramg aramg closed this as completed Jul 15, 2021
@yuvrajbhaia
Copy link

I have this issue here. Is there someone ever had?

image

hey, were you able to resolve this bug? i keep running into the same error
currently working with Rpi 3B, 64bit ubuntu 22.04 os running on it (without gui)

We followed everything given in the here yet seem to run into the exact same problem everytime. It would be great if you could help us out with this problem

@yuvrajbhaia
Copy link

Added the instructions to a Wiki page https://github.com/dev47apps/droidcam/wiki/Raspberry

Hey, we've been working on a Raspberry pi 3B with ubuntu 22.04 os working on it (without the GUI)
We've been trying to install Droidcam on it for the past 3 days yet don't seem to find a solution to this error, we used the instructions given below step by step and compiled the source code as instructed.
https://github.com/dev47apps/droidcam/wiki/Raspberry-PI

Despite all these efforts we keep running into the same error again and again;
Bash: /usr/bin/droidcam-cli: cannot execute binary files: Exec format error

We have a competition in a week and this is an integral part of the challenge. I would really appreciate it if you could help us with this issue urgently.

thanking you in advance

@DanieleLupo94
Copy link

DanieleLupo94 commented Oct 9, 2022 via email

@yuvrajbhaia
Copy link

After "make droidcam-cli" try to use it locally (./droidcam-cli) to test if the compiled file works 🤔 Il 9 ott 2022, 08:43 +0200, yuvrajbhaia @.***>, ha scritto:

Added the instructions to a Wiki page https://github.com/dev47apps/droidcam/wiki/Raspberry Hey, we've been working on a Raspberry pi 3B with ubuntu 22.04 os working on it (without the GUI) We've been trying to install Droidcam on it for the past 3 days yet don't seem to find a solution to this error, we used the instructions given below step by step and compiled the source code as instructed. https://github.com/dev47apps/droidcam/wiki/Raspberry-PI Despite all these efforts we keep running into the same error again and again; Bash: /usr/bin/droidcam-cli: cannot execute binary files: Exec format error We have a competition in a week and this is an integral part of the challenge. I would really appreciate it if you could help us with this issue urgently. thanking you in advance — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

we did try that multiple times but didnt seem to get results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests