mirror of
https://github.com/tiyn/wiki.git
synced 2025-04-19 22:17:45 +02:00
Compare commits
No commits in common. "cf7502ed6ae2138d410c1729ed1500f91d452a2b" and "4f872ce5fb19c4aed6eef48bae89433dbf9fb4dd" have entirely different histories.
cf7502ed6a
...
4f872ce5fb
@ -8,12 +8,12 @@ It enables a [smartphone](/wiki/smart_devices.md) to be used as [webcam](/wiki/w
|
|||||||
|
|
||||||
DroidCam needs to be set up on the phone aswell as on the computer to be used.
|
DroidCam needs to be set up on the phone aswell as on the computer to be used.
|
||||||
|
|
||||||
On [Android](/wiki/android.md) DroidCam is available on the
|
On [Android](/wiki/android.md) Gadgetbridge is available on the
|
||||||
[Google Play Store](/wiki/android.md#app-store) in a package called
|
[Google Play Store](/wiki/android.md#app-store) in a package called
|
||||||
[DroidCam Webcam](https://play.google.com/store/apps/details?id=com.dev47apps.droidcam).
|
[DroidCam Webcam](https://play.google.com/store/apps/details?id=com.dev47apps.droidcam).
|
||||||
|
|
||||||
On the computer setup files for both [Linux](/wiki/linux.md) and [Windows](/wiki/windows.md) can be
|
On the computer setup files for both [Linux](/wiki/linux.md) and [Windows](/wiki/windows.md) can be
|
||||||
found on the [official website](https://www.dev47apps.com/).
|
found on the [official Dev47Apps](https://www.dev47apps.com/).
|
||||||
Alternatively most [Linux systems](/wiki/linux/package_manager.md) feature a package named
|
Alternatively most [Linux systems](/wiki/linux/package_manager.md) feature a package named
|
||||||
`droidcam`.
|
`droidcam`.
|
||||||
|
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
# IP Webcam
|
|
||||||
|
|
||||||
[IP Webcam](https://play.google.com/store/apps/details?id=com.pas.webcam&hl=de&gl=US) is an App
|
|
||||||
developed and published by Pavel Khlebovich for [Android](/wiki/android.md) systems.
|
|
||||||
It enables a [smartphone](/wiki/smart_devices.md) to be used as [webcam](/wiki/webcams.md).
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
On [Android](/wiki/android.md) IP Webcam is available on the
|
|
||||||
[Google Play Store](/wiki/android.md#app-store) in a package called
|
|
||||||
[IP Webcam](https://play.google.com/store/apps/details?id=com.pas.webcam&hl=de&gl=US).
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
To initiate a connection between the [smartphone](/wiki/smart_devices.md) and the computer first
|
|
||||||
start the app on the smartphone.
|
|
||||||
Make sure to be connected to the same W-LAN as the computer or alternatively connect them with an
|
|
||||||
USB-cable.
|
|
||||||
After starting the application an IPv4 link be displayed.
|
|
||||||
This link can be pasted into a [browser](/wiki/web_browser.md).
|
|
||||||
There the video aswell as various settings will be available.
|
|
||||||
An example link will look like the following.
|
|
||||||
|
|
||||||
```txt
|
|
||||||
http://192.168.178.66:8080
|
|
||||||
```
|
|
||||||
|
|
||||||
Additionally it can be piped into [OBS](/wiki/obs.md) to edit it or into
|
|
||||||
[ffmpeg](/wiki/linux/ffmpeg.md) on [Linux](/wiki/linux.md) systems to create a virtual webcam
|
|
||||||
device as explained in the
|
|
||||||
[ffmpeg entry](/wiki/linux/ffmpeg.md#create-a-virtual-camera-using-an-ip-video-stream).
|
|
||||||
The link used for applications like this will be the previously displayed IPv4 link aswell as an
|
|
||||||
appended `/videofeed`.
|
|
||||||
An example link will look like the following.
|
|
||||||
|
|
||||||
```txt
|
|
||||||
http://192.168.178.66:8080/videofeed
|
|
||||||
```
|
|
@ -1,20 +0,0 @@
|
|||||||
# scrcpy
|
|
||||||
|
|
||||||
[scrcpy](https://scrcpy.org/) is an application that allows remote
|
|
||||||
mirroring of an [Android phones](/wiki/android.md) screen aswell as controlling it.
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
scrcpy needs to be set up on the computer that displays the mirror of the smartphone used.
|
|
||||||
|
|
||||||
Setup files for [Windows](/wiki/windows.md) can be found on the
|
|
||||||
[official website](https://scrcpy.org/download/).
|
|
||||||
Alternatively most [Linux systems](/wiki/linux/package_manager.md) feature a package named
|
|
||||||
`scrcpy`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Connect the phone which is to be controlled with the computer via USB.
|
|
||||||
Make sure USB debugging is enabled in the phones setting.
|
|
||||||
Afterwards start up scrcpy.
|
|
||||||
It is possible that debugging has to be confirmed on the phone again after starting the application.
|
|
@ -63,20 +63,3 @@ Note that the bitrate for videos is split amongst a bitrate for video and a
|
|||||||
bitrate for audio.
|
bitrate for audio.
|
||||||
The target bitrate has to be equal to or greater than the sum of both video
|
The target bitrate has to be equal to or greater than the sum of both video
|
||||||
bitrate and audio bitrate.
|
bitrate and audio bitrate.
|
||||||
|
|
||||||
### Create a Virtual Camera Using an IP Video Stream
|
|
||||||
|
|
||||||
The following section will create a virtual [webcam](/wiki/webcams.md) from an IP video stream like
|
|
||||||
the one provided by [IP Webcam](/wiki/android/ip_webcam.md) [Android](/wiki/android.md) app.
|
|
||||||
For this a free [V4L2](/wiki/linux/v4l2.md) video device will be needed.
|
|
||||||
To information on how to create it navigate to the V4L2 entry and its sections on
|
|
||||||
[permanent](/wiki/linux/v4l2.md#create-permanent-v4l2-devices) and
|
|
||||||
[temporary creation of V4L2 video devices](/wiki/linux/v4l2.md#create-temporary-v4l2-devices).
|
|
||||||
The following command will create a video device using the pixel format planar YUV 4:2:0.
|
|
||||||
In this example it is assumed that the IP link is `http://192.168.178.66:8080/videofeed` and the
|
|
||||||
V4L2 video device that is not used but exists is `/dev/video8`.
|
|
||||||
If any of those differs on a given system adjustments are needed.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ffmpeg -i http://192.168.178.66:8080/videofeed -f v4l2 -pix_fmt yuv420p /dev/video8
|
|
||||||
```
|
|
||||||
|
@ -13,21 +13,11 @@ The following section is based on a
|
|||||||
[v4l2loopback](https://github.com/umlaeute/v4l2loopback) is a utility to create
|
[v4l2loopback](https://github.com/umlaeute/v4l2loopback) is a utility to create
|
||||||
a virtual video device.
|
a virtual video device.
|
||||||
One use of it is in [OBS Virtual Camera](/wiki/obs.md#virtual-camera).
|
One use of it is in [OBS Virtual Camera](/wiki/obs.md#virtual-camera).
|
||||||
|
|
||||||
### Setup
|
|
||||||
|
|
||||||
To use v4l2loopback an according
|
To use v4l2loopback an according
|
||||||
package needs to be installed.
|
package needs to be installed.
|
||||||
Some distributions have a package named `v4l2loopback-dkms` in the package
|
Some distributions have a package named `v4l2loopback-dkms` in the package
|
||||||
manager, making the manual installation process unnecessary.
|
manager, making the manual installation process unnecessary.
|
||||||
|
Afterwards v4l2loopback can be manually started by running:
|
||||||
### Usage
|
|
||||||
|
|
||||||
This section focusses on various use-cases for the v4l2loopback software.
|
|
||||||
|
|
||||||
### Create Temporary V4L2 Devices
|
|
||||||
|
|
||||||
v4l2loopback can be manually started by running:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
modprobe v4l2loopback card_label='V4L2 Loopback' video_nr=7 exclusive_caps=1
|
modprobe v4l2loopback card_label='V4L2 Loopback' video_nr=7 exclusive_caps=1
|
||||||
@ -38,15 +28,6 @@ modprobe v4l2loopback card_label='V4L2 Loopback' video_nr=7 exclusive_caps=1
|
|||||||
This can be changed according to the needs.
|
This can be changed according to the needs.
|
||||||
It is important that the device is not already in use by another application.
|
It is important that the device is not already in use by another application.
|
||||||
|
|
||||||
To create more than one device more labels or numbers can be appended.
|
|
||||||
An example command with 2 V4L2 video devices will look like the following command.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
modprobe v4l2loopback card_label='OBS Virtual Camera','IP Webcam' video_nr=7,8 exclusive_caps=1
|
|
||||||
```
|
|
||||||
|
|
||||||
### Create Permanent V4L2 Devices
|
|
||||||
|
|
||||||
For an automatic start at boot via [SystemD](./systemd.md) a service can be
|
For an automatic start at boot via [SystemD](./systemd.md) a service can be
|
||||||
created - as described in [the SystemD entry](./systemd.md#run-command-on-boot).
|
created - as described in [the SystemD entry](./systemd.md#run-command-on-boot).
|
||||||
For v4l2loopback create the file `/etc/systemd/system/v4l2loopback.service`
|
For v4l2loopback create the file `/etc/systemd/system/v4l2loopback.service`
|
||||||
@ -59,15 +40,15 @@ Description=V4L2 Loopback
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/bin/modprobe v4l2loopback card_label='OBS Virtual Camera' video_nr=7 exclusive_caps=1
|
ExecStart=/bin/modprobe v4l2loopback card_label='V4L2 Loopback' video_nr=7 exclusive_caps=1
|
||||||
ExecStop=/bin/rmmod v4l2loopback
|
ExecStop=/bin/rmmod v4l2loopback
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
```
|
```
|
||||||
|
|
||||||
Note the line starting with `ExecStart=/bin/` is the same line described in the
|
Note the line starting with `ExecStart=/bin/` is the same line described above
|
||||||
[above section](#create-temporary-v4l2-devices).
|
to change the device path.
|
||||||
Make sure to change it if needed.
|
Make sure to change it if needed.
|
||||||
|
|
||||||
Afterwards enable the service to start at every boot process by running:
|
Afterwards enable the service to start at every boot process by running:
|
||||||
|
@ -20,22 +20,3 @@ They can include biomonitoring and other applications.
|
|||||||
Smartwatches and bands are often connected to a smartphone.
|
Smartwatches and bands are often connected to a smartphone.
|
||||||
On [Android phones](/wiki/android.md) [Gadgetbridge](/wiki/android/gadgetbridge.md) can be used as
|
On [Android phones](/wiki/android.md) [Gadgetbridge](/wiki/android/gadgetbridge.md) can be used as
|
||||||
an alternative to proprietary applications by the smart devices' vendor.
|
an alternative to proprietary applications by the smart devices' vendor.
|
||||||
|
|
||||||
## Smartphones and Tablet Computers
|
|
||||||
|
|
||||||
Smartphones and Tablet computers are among the most used electronic devices.
|
|
||||||
They are often used to [communicate](/wiki/communication.md) or
|
|
||||||
[surfing the internet](/wiki/web_browser.md).
|
|
||||||
|
|
||||||
### Remote Control and Screen Mirroring
|
|
||||||
|
|
||||||
[Android](/wiki/android.md) based devices can use [scrcpy](/wiki/android/scrcpy.md) to mirror the
|
|
||||||
screen and allow controlling it by a [Windows](/wiki/windows.md) or [Linux](/wiki/linux.md) system.
|
|
||||||
|
|
||||||
### Usage as a Webcam
|
|
||||||
|
|
||||||
Smartphones and Tablet computers usually are equipped with a decent camera.
|
|
||||||
If a [Linux](/wiki/linux.md) or [Windows](/wiki/windows.md) system is missing a
|
|
||||||
[webcam](/wiki/webcams.md) which is only rarely used it can be useful to repurpose the smart device
|
|
||||||
as a webcam.
|
|
||||||
This can be done as explained in the [webcam entry](/wiki/webcams.md#using-a-smartphone-as-webcam).
|
|
||||||
|
@ -27,5 +27,3 @@ A [smartphone](/wiki/smart_devices.md) and its camera aswell as flashlight can b
|
|||||||
replacement for a webcam.
|
replacement for a webcam.
|
||||||
For [Android](/wiki/android.md) smartphones this can be easily achieved by using
|
For [Android](/wiki/android.md) smartphones this can be easily achieved by using
|
||||||
[DroidCam](/wiki/android/droidcam.md).
|
[DroidCam](/wiki/android/droidcam.md).
|
||||||
An alternative to DroidCam with a with decidedly better resolution is
|
|
||||||
[IP Webcam](/wiki/android/ip_webcam.md).
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user