Hello, with webcams being hard to come by right now, and many people having smartphone or even lying around old one. Does somebody know how to use an android smartphone as webcam with Free Software?
On F-droid I've found https://f-droid.org/de/packages/pl.hypeapp.endoscope/ https://f-droid.org/en/packages/net.majorkernelpanic.spydroid/ https://f-droid.org/de/packages/com.dngames.mobilewebcam/
they are all a few years old and all offer wifi, but non of them an encrypted stream. And I don't know how to couple something that I can receive with vlc or so from those app, to the incomung video system my a GNU/Linux system.
And no USB solution on sight?
Has somebody seen better instructions for making this work?
Best Regards, Bernhard
"Bernhard E. Reiter" bernhard@fsfe.org wrote:
Does somebody know how to use an android smartphone as webcam with Free Software?
On F-droid I've found
Not a webcam at all.
https://f-droid.org/de/packages/pl.hypeapp.endoscope/ https://f-droid.org/en/packages/net.majorkernelpanic.spydroid/ they are all a few years old
So what?
and all offer wifi And no USB solution on sight?
Both of them stream video over RTSP, i. e. over TCP/IP which which is medium-agnostic. So feel free to use USB.
but non of them an encrypted stream.
Why do you need encryption if you are going to use USB connection?
Has somebody seen better instructions for making this work?
I have not tried pl.hypeapp.endoscope but net.majorkernelpanic.spydroid have worked out of a box for me. No instructions needed.
Dmitry Alexandrov 321942@gmail.com wrote:
"Bernhard E. Reiter" bernhard@fsfe.org wrote:
but non of them an encrypted stream.
Why do you need encryption if you are going to use USB connection?
Yet, there is thing to be concerned about in your use-case — it is missing _authorization_. And itʼs much more serious issue, since net.majorkernelpanic.spydroid listens on _any_ interface — even global if your little machine has one. And it does not provide a user interface to configure it the other way.
So youʼd better command a machine, where ‘Spydroid’ will be running, to accept connections to its port only from USB (‘rndis’ in *droid lingo). Something like that, if I am not mistaken:
# iptables -I INPUT ! -i rndis+ -p tcp --dport 8086 -j REJECT # ip6tables -I INPUT ! -i rndis+ -p tcp --dport 8086 -j REJECT
Hi Dmitry,
thanks for your helpful response!
Am Mittwoch 29 April 2020 18:10:22 schrieb Dmitry Alexandrov:
"Bernhard E. Reiter" bernhard@fsfe.org wrote:
https://f-droid.org/de/packages/pl.hypeapp.endoscope/ https://f-droid.org/en/packages/net.majorkernelpanic.spydroid/ they are all a few years old
So what?
this indicates: the chance of this being a less common use case is higher. Of course there are very good old and stable pieces of software, so this is just an heuristic.
and all offer wifi And no USB solution on sight?
Both of them stream video over RTSP, i. e. over TCP/IP which which is medium-agnostic. So feel free to use USB.
This is a good idea. I lack experience how easy it is to set up an IP connection between a regular Android phone and a GNU/Linux system. Do you have good pointers for documentation? (I wildly guess it is using USB tethering, though I do not want to use the internet connection of the phone. )
but non of them an encrypted stream.
Why do you need encryption if you are going to use USB connection?
Good point, for USB this is not needed.
Has somebody seen better instructions for making this work?
I have not tried pl.hypeapp.endoscope but net.majorkernelpanic.spydroid have worked out of a box for me. No instructions needed.
What about connecting this incoming stream to your application, e.g. firefox, if you are going to join a jitsi meet or bigbluebutton video conference? (Just installing jitsi meet app on the phone is often a bad option as elder phones will not be able to cope with the several incoming streams from the CPU side.)
For me personally, I'll probably get it sorted out at some point. It would be cool if we had instructions that can be used by more people.
So steps are a) make an network connection via USB cable between phone and GNU desktop b) run an app like endoscope or spydroid (recommended from fdroid) c) protect your network (what needs to be done on the phone? desktop?) d) connect incoming stream to application
Am Mittwoch 29 April 2020 19:44:09 schrieb Dmitry Alexandrov:
Yet, there is thing to be concerned about in your use-case — it is missing _authorization_. And itʼs much more serious issue, since net.majorkernelpanic.spydroid listens on _any_ interface — even global if your little machine has one. And it does not provide a user interface to configure it the other way.
So youʼd better command a machine, where ‘Spydroid’ will be running, to accept connections to its port only from USB (‘rndis’ in *droid lingo). Something like that, if I am not mistaken:
# iptables -I INPUT ! -i rndis+ -p tcp --dport 8086 -j REJECT # ip6tables -I INPUT ! -i rndis+ -p tcp --dport 8086 -j REJECT
As spydroid will run on the android device, this would probably need another application to manipulate the firewall rules?
Best Regards, Bernhard
"Bernhard E. Reiter" bernhard@fsfe.org wrote:
thanks for your helpful response!
Hold on, we are not finished yet. :-)
Am Mittwoch 29 April 2020 18:10:22 schrieb Dmitry Alexandrov:
Both of them stream video over RTSP, i. e. over TCP/IP which which is medium-agnostic. So feel free to use USB.
I lack experience how easy it is to set up an IP connection between a regular Android phone and a GNU/Linux system.
It is a well-supported use case. Very easy.
Do you have good pointers for documentation?
No. It just works.
(I wildly guess it is using USB tethering,
Yes.
though I do not want to use the internet connection of the phone.)
There is a dozen ways to configure networking in GNU. Until I know which you are using, I canʼt tell you anything but the obvious thing, that youʼll have to make sure that _default route_ is bound for wherever you are want to.
Why do you need encryption if you are going to use USB connection?
Good point, for USB this is not needed.
Itʼs actually hardly needed for wireless LAN either.
I have not tried pl.hypeapp.endoscope but net.majorkernelpanic.spydroid have worked out of a box for me. No instructions needed.
What about connecting this incoming stream to your application, e.g. firefox, if you are going to join a jitsi meet or bigbluebutton video conference?
Have you googled it? Making RTSP stream into virtual video device is a rather common task. Keywords are ‘v4l2loopback’ and ‘GStreamer’.
For me personally, I'll probably get it sorted out at some point. It would be cool if we had instructions that can be used by more people.
Sure, it would be very apt to make whatever youʼll achieve into a comprehensive guide. ;-)
So steps are ‹…› c) protect your network (what needs to be done on the phone?
The best of all would be patch the server (Spydroid or otherwise), so it listens only on the said interface.
Until that, we have to use firewall (not to mean that is something bad).
[on the] desktop?)
Nothing specific. We are not running any extra servers there.
Am Mittwoch 29 April 2020 19:44:09 schrieb Dmitry Alexandrov:
…spydroid listens on _any_ interface — even global if your little machine has one. And it does not provide a user interface to configure it the other way.
So youʼd better command a machine, where ‘Spydroid’ will be running, to accept connections to its port only from USB (‘rndis’ in *droid lingo). Something like that, if I am not mistaken:
# iptables -I INPUT ! -i rndis+ -p tcp --dport 8086 -j REJECT # ip6tables -I INPUT ! -i rndis+ -p tcp --dport 8086 -j REJECT
As spydroid will run on the android device, this would probably need another application to manipulate the firewall rules?
In my experience, *droid (LineageOS if distro matters) does not flush ‘filter’ table, so it would be fine to just add them at startup.
But dealing with so complicated and unfriendly system as *droid you never can be sure. I would ask this again at some *droid-related m/l.
Am Donnerstag 30 April 2020 22:53:41 schrieb Dmitry Alexandrov:
Hold on, we are not finished yet. :-)
(-:
[Step: setup USB network connection GNU-System <-> *droid device.]
Am Mittwoch 29 April 2020 18:10:22 schrieb Dmitry Alexandrov:
There is a dozen ways to configure networking in GNU. Until I know which you are using, I canʼt tell you anything but the obvious thing, that youʼll have to make sure that _default route_ is bound for wherever you are want to.
If this is going to be a general guide, I'll guess that it'll have to support network manager and a root command line. What wever Ubuntu does, when you plug-in an Android usb device.
Why do you need encryption if you are going to use USB connection?
Good point, for USB this is not needed.
Itʼs actually hardly needed for wireless LAN either.
In many situations, traffic on the WLAN is not secure from eavesdropping, so at least I would feel better with an encrypted default. (Example situations: WLAN at a drink chocolade shop; still using WPA2 with a "weak" password; one of many devices in the local WLAN is rogue.)
[Step: making incoming video/audio stream a device for other apps]
Have you googled it? Making RTSP stream into virtual video device is a rather common task. Keywords are ‘v4l2loopback’ and ‘GStreamer’.
Not yet https://metager.de/ ed it, as I was stuck earlier. Short search did not reveal a howto that was usable right away. (But lots of details, which I personally could potentially use, so thanks for the right keywords.)
Sure, it would be very apt to make whatever youʼll achieve into a comprehensive guide. ;-)
I fear I personally won't have the time for this. (This is why I did ask initially: I had hoped there were guides around already.)
[Securing the phones listening network device.]
In my experience, *droid (LineageOS if distro matters) does not flush ‘filter’ table, so it would be fine to just add them at startup.
A search seems to reveal that most *droid devices will not have an iptables command ready to be used. (old infos from https://stackoverflow.com/questions/4577268/iptables-in-android )
But dealing with so complicated and unfriendly system as *droid you never can be sure. I would ask this again at some *droid-related m/l.
:D
Best, Bernhard
Hi,
On Wed, 29 Apr 2020, Bernhard E. Reiter wrote:
with webcams being hard to come by right now, and many people having smartphone or even lying around old one. Does somebody know how to use an android smartphone as webcam with Free Software?
If you are planning to have a video conference then it is probably better to run the video conferencing software on the phone itself. At least keeping audio and video in sync sounds pretty impossible otherwise.
-Timo