obsproject / obsproject/obs-studio
Linux: Stopping Virtual Camera Requires v4l2loopback Restart to Restart Virtual Camera
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
Operating System Info
Ubuntu 24.04
Other OS
No response
OBS Studio Version
31.1.2
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/QzOiXzO43puQU00c
OBS Studio Crash Log URL
No response
Expected Behavior
After stopping the virtual camera, it should restart without issue.
Current Behavior
The virtual camera fails to start, showing the following error:
Steps to Reproduce
- Start the virtual camera after a fresh boot with v4l2loopback up and running.
- Stop the virtual camera.
- Start it again.
...
Anything else we should know?
This started for me with 31.1.0.
As shown in the logs, after stopping v4l2loopback, /dev/video has the following:
crw-rw----+ 1 root video 81, 1 Aug 14 06:01 /dev/video0
crw-rw----+ 1 root video 81, 2 Aug 14 06:01 /dev/video1
crw-rw----+ 1 root video 81, 0 Aug 14 18:43 /dev/video10
modprobe --remove v4l2loopback results in /dev/video10 going away.
modprobe v4l2loopback (reloading it) brings /dev/video10 back.
Let me know if there's any other information (such as the output of lsmod or the kernel module configuration for v4l2loopback) you may need.
Thanks so much!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked OBS log and reproduce the listed Linux sequence: start, stop, and restart the virtual camera while v4l2loopback is loaded. Inspect the virtual-camera start and stop entry points involved in the failure, using the /dev/video10 and modprobe behavior as clues. Done means the camera restarts without requiring a v4l2loopback module reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100