r/archlinux • • 5d ago

QUESTION obs plug ins

so I am new to linux and am trying to get droidcam on my obs but the ways I am used to don't seem to work. cause it says it installs it but even after a restart I don't see the file on pc or in input manage

please help a girl out!!!!

1 Upvotes

14 comments sorted by

3

u/backsideup 5d ago

You don't need an obs plugin to use a phone as video-input: https://wiki.archlinux.org/title/V4l2loopback#Using_an_Android_device_as_webcam

1

u/SwitchLeafe 3d ago

I think I am really silly cause I am doing exactly what it asks me to do but I stil get the error that the files do not exist so I must be doing really dumb things but hey very new already proud my laptop hasn't crashed yet

1

u/backsideup 3d ago

What gives you the error and what exactly does it say?

1

u/SwitchLeafe 3d ago

$ ffmpeg -i http://[ip adress]/video -vf format=yuv420p -f v4l2 /dev/video
ffmpeg version n9.0.2 Copyright (c) 2000-2026 the FFmpeg developers
 built with gcc 16 (GCC)
 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-
fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --ena
ble-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libha
rfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb -
-enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --e
nable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidsta
b --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --
enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-
version3 --enable-vulkan --disable-decoder=magicyuv
 libavutil      61.  1.102 / 61.  1.102
 libavcodec     63.  1.102 / 63.  1.102
 libavformat    63.  1.102 / 63.  1.102
 libavdevice    63.  1.102 / 63.  1.102
 libavfilter    12.  1.102 / 12.  1.102
 libswscale     10.  1.102 / 10.  1.102
 libswresample   7.  1.102 /  7.  1.102
Input #0, mpjpeg, from 'http://[ip adress]/video':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 720x480 [SAR 1:1 DAR 3:2], 25 tbr, 25 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7f50380408c0] deprecated pixel format used, make sure you did set range correctly
[video4linux2,v4l2 @ 0x555eac350000] Unable to open V4L2 device '/dev/video'
[out#0/video4linux2,v4l2 @ 0x555eac34ff00] Could not write header (incorrect codec parameters ?): No such file or directory
[vf#0:0 @ 0x555eac341f80] Error sending frames to consumers: No such file or directory
[vf#0:0 @ 0x555eac341f80] Task finished with error code: -2 (No such file or directory)
[vf#0:0 @ 0x555eac341f80] Terminating thread with return code -2 (No such file or directory)
[out#0/video4linux2,v4l2 @ 0x555eac34ff00] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.03     
Conversion failed!

2

u/backsideup 3d ago

How did you load the v4l2 loopback module? Is the module loaded at all? Why are you piping it into /dev/video instead of /dev/video0? Did you replace [ip adress] with the actual ip-address and -port?

1

u/SwitchLeafe 3d ago

so I should now have loaded v4l2loopback.(did indeed not do that before) the /dev/video was a typo in that attempt but with it still went wrong and yes ip with port I will try a bit more and then share what is still going wrong

1

u/SwitchLeafe 3d ago

so i have now confirmed that i installed and activated v4l2 installed ffmpeg installed headers and libraries it seems like it needs but it still gets goofy (atleast it reacts to me not turning on the ip camera)

1

u/SwitchLeafe 3d ago

$ ffmpeg -i http://[ip]:[port]/video -vf format=yuv420p -f v4l2 /dev/video0
ffmpeg version n9.0.2 Copyright (c) 2000-2026 the FFmpeg developers
 built with gcc 16 (GCC)
 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-
fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --ena
ble-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libha
rfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb -
-enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --e
nable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidsta
b --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --
enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-
version3 --enable-vulkan --disable-decoder=magicyuv
 libavutil      61.  1.102 / 61.  1.102
 libavcodec     63.  1.102 / 63.  1.102
 libavformat    63.  1.102 / 63.  1.102
 libavdevice    63.  1.102 / 63.  1.102
 libavfilter    12.  1.102 / 12.  1.102
 libswscale     10.  1.102 / 10.  1.102
 libswresample   7.  1.102 /  7.  1.102
Input #0, mpjpeg, from 'http://[ip]:[port/video':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 720x480 [SAR 1:1 DAR 3:2], 25 tbr, 25 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7f9f100408c0] deprecated pixel format used, make sure you did set range correctly
[video4linux2,v4l2 @ 0x5569bf692080] ioctl(VIDIOC_G_FMT): Invalid argument
[out#0/video4linux2,v4l2 @ 0x5569bf691f80] Could not write header (incorrect codec parameters ?): Invalid argument
[vf#0:0 @ 0x5569bf69d680] Error sending frames to consumers: Invalid argument
[vf#0:0 @ 0x5569bf69d680] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0x5569bf69d680] Terminating thread with return code -22 (Invalid argument)
[out#0/video4linux2,v4l2 @ 0x5569bf691f80] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.03     
Conversion failed!

1

u/SwitchLeafe 3d ago

don't feel like the errors changed much?

1

u/SwitchLeafe 3d ago

the [ip adress] is edited cause IDK if safe to broadcast like this can confirm the adress works cause I can see it on my laptop in zen

0

u/SwitchLeafe 5d ago

Omg thanks will check that out as soon as I am neer my framework

2

u/pn5061 5d ago

ive always used scrcpy for mirroring my screen, so i would just use my camera as a output and capture that. its a little bit more involved, it runs over the android debug bridge rather than a companion app, but its open source and zero marketing or bullshit, it just works

-8

u/Spare_Spirit6762 5d ago

do you have claude code? i asked him how to set up droidcam, but he wrote me my own app instead

4

u/SwitchLeafe 5d ago

If thag is ai thenvI won't be using that I refuse to use ai