Smartphone as Webcam with Free Software?

Dmitry Alexandrov 321942 at gmail.com
Thu Apr 30 20:53:41 UTC 2020


"Bernhard E. Reiter" <bernhard at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 511 bytes
Desc: not available
URL: <http://lists.fsfe.org/pipermail/discussion/attachments/20200430/65825fd2/attachment.sig>


More information about the Discussion mailing list