{"id":28000608,"url":"https://github.com/sysprog21/vcam","last_synced_at":"2025-05-08T23:53:48.922Z","repository":{"id":37088988,"uuid":"240413289","full_name":"sysprog21/vcam","owner":"sysprog21","description":"Virtual camera device driver for Linux","archived":false,"fork":false,"pushed_at":"2024-07-15T02:22:24.000Z","size":90,"stargazers_count":108,"open_issues_count":3,"forks_count":48,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-08T23:53:44.966Z","etag":null,"topics":["camera-driver","device-driver","linux-kernel","v4l2"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysprog21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-14T02:37:12.000Z","updated_at":"2025-04-21T03:10:39.000Z","dependencies_parsed_at":"2022-07-20T00:16:54.899Z","dependency_job_id":"dccd3b22-8b58-48fb-9f7c-5674c6589b33","html_url":"https://github.com/sysprog21/vcam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvcam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvcam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvcam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvcam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysprog21","download_url":"https://codeload.github.com/sysprog21/vcam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166486,"owners_count":21864471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camera-driver","device-driver","linux-kernel","v4l2"],"created_at":"2025-05-08T23:53:48.536Z","updated_at":"2025-05-08T23:53:48.916Z","avatar_url":"https://github.com/sysprog21.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vcam: Virtual camera device driver for Linux\n\nThis Linux module implements a simplified virtual V4L2 compatible camera\ndevice driver with raw framebuffer input.\n\n## Prerequisite\n\nThe following packages must be installed before building `vcam`.\n\nIn order to compile the kernel driver successfully, package versions\nof currently used kernel, kernel-devel and kernel-headers need to be matched.\n```shell\n$ sudo apt install linux-headers-$(uname -r)\n```\n\nSince `vcam` is built with [V4L2](https://en.wikipedia.org/wiki/Video4Linux) (Video4Linux, second version),\n`v4l-utils` is necessary for retrieving more information and function validation:\n```shell\n$ sudo apt install v4l-utils\n```\n\n## Build and Run\n\nAfter running `make`, you should be able to generate the following files:\n* `vcam.ko` - Linux kernel module;\n* `vcam-util` - Sample utility to configure virtual camera device(s);\n\nBefore loading this kernel module, you have to satisfy its dependency:\n```shell\n$ sudo modprobe -a videobuf2_vmalloc videobuf2_v4l2\n```\n\nThe module can be loaded to Linux kernel by runnning the command:\n```shell\n$ sudo insmod vcam.ko\n```\n\nExpectedly, three device nodes will be created in `/dev`:\n* videoX - V4L2 device;\n* vcamctl - Control device for virtual camera(s), used by control utility `vcam-util`;\n* fbX - controlling framebuffer device;\n\nIn `/dev` directory, device file `fbX` will be created.\n\nThe device is initially configured to process 640x480 RGB24 image format.\nBy writing 640x480 RGB24 raw frame data to `/dev/fbX` file the resulting\nvideo stream will appear on corresponding `/dev/videoX` V4L2 device(s).\n\nRun `vcam-util --help` for more information about how to configure, add or\nremove virtual camera devices.\ne.g. list all available virtual camera device(s):\n```shell\n$ sudo ./vcam-util -l\n```\n\nYou should get:\n```\nAvailable virtual V4L2 compatible devices:\n1. fbX(640,480,rgb24) -\u003e /dev/video0\n```\n\nYou can use this command to check if the driver is ok:\n```shell\n$ sudo v4l2-compliance -d /dev/videoX -f\n```\n\nIt will return a bunch of test lines, with 0 failed and 0 warnings at the end.\n\nYou can check if all configured formats and emulated controls are ok with this command:\n```shell\n$ sudo v4l2-ctl -d /dev/videoX --all\n```\n\nYou will get information as following:\n```\nDriver Info:\n\tDriver name   : vcam\n\tCard type     : vcam\n\tBus info      : platform: virtual\n\tDriver version: 4.15.18\n\tCapabilities  : 0x85200001\n\t\tVideo Capture\n\t\tRead/Write\n\t\tStreaming\n\t\tExtended Pix Format\n\t\tDevice Capabilities\n```\nYou can check framebuffer format with this command:\n```shell\n$ sudo fbset -fb /dev/fbX --info\n```\n\nYou will get information as following:\n```shell\nmode \"640x480\"\n    geometry 640 480 640 480 24\n    timings 0 0 0 0 0 0 0\n    rgba 8/0,8/8,8/16,0/0\nendmode\n\nFrame buffer device information:\n    Name        : vcamfb\n    Address     : 0xffffa293438ed000\n    Size        : 921600\n    Type        : PACKED PIXELS\n    Visual      : TRUECOLOR\n```\n\nAvailable parameters for `vcam` kernel module:\n* `devices_max` - Maximal number of devices. The default is 8.\n* `create_devices` - Number of devices to be created during initialization. The default is 1.\n* `allow_pix_conversion` - Allow pixel format conversion from RGB24 to YUYV. The default is OFF.\n* `allow_scaling` - Allow image scaling from 480p to 720p. The default is OFF.\n* `allow_cropping` - Allow image cropping in Four-Thirds system. The default is OFF.\n\nWhen you load a module using insmod command, you can supply the parameters as key=value pairs for example:\n```shell\n$ sudo insmod vcam.ko allow_pix_conversion=1\n```\n\n## Related Projects\n\n* [akvcam](https://github.com/webcamoid/akvcam)\n* [v4l2loopback](https://github.com/umlaeute/v4l2loopback)\n* [vivid: The Virtual Video Test Driver](https://www.kernel.org/doc/html/latest/media/v4l-drivers/vivid.html)\n\n## License\n\n`vcam` is released under the MIT License. Use of this source code is governed by\na MIT License that can be found in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fvcam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysprog21%2Fvcam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fvcam/lists"}