Created
June 7, 2026 23:23
-
-
Save pschichtel/85d51c3cda8baff00d5e94c09fab9db1 to your computer and use it in GitHub Desktop.
A small simple script that exposes DroidCam's video stream as a pipewire virtual camera.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| droidcam_ip="${1?no droidcam ip!}" | |
| droidcam_port="${2:-4747}" | |
| camera_name="${CAMERA_NAME:-"DroidCam"}" | |
| gst-launch-1.0 \ | |
| souphttpsrc location="http://${droidcam_ip}:${droidcam_port}/video" ! \ | |
| jpegdec ! \ | |
| videoconvert ! \ | |
| "video/x-raw,format=YUY2" ! \ | |
| pipewiresink \ | |
| mode=provide \ | |
| stream-properties="properties,media.class=Video/Source,media.role=Camera" \ | |
| client-name="$camera_name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment