{"id":24302796,"url":"https://github.com/taigrr/vidnumerator","last_synced_at":"2026-04-17T08:32:49.678Z","repository":{"id":192570917,"uuid":"659471831","full_name":"taigrr/vidnumerator","owner":"taigrr","description":"Small library for checking if a path is a valid video camera","archived":false,"fork":false,"pushed_at":"2026-03-29T06:03:14.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T08:54:11.719Z","etag":null,"topics":["golang","linux-video","v4l2"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taigrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"taigrr"}},"created_at":"2023-06-27T23:09:35.000Z","updated_at":"2026-03-29T06:03:18.000Z","dependencies_parsed_at":"2024-06-02T03:25:49.739Z","dependency_job_id":null,"html_url":"https://github.com/taigrr/vidnumerator","commit_stats":null,"previous_names":["taigrr/vidnumerator"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/taigrr/vidnumerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fvidnumerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fvidnumerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fvidnumerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fvidnumerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taigrr","download_url":"https://codeload.github.com/taigrr/vidnumerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fvidnumerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31921944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","linux-video","v4l2"],"created_at":"2025-01-17T00:19:23.986Z","updated_at":"2026-04-17T08:32:49.672Z","avatar_url":"https://github.com/taigrr.png","language":"Go","funding_links":["https://github.com/sponsors/taigrr"],"categories":[],"sub_categories":[],"readme":"# VidNumerator\n\nThis is a tiny library that uses syscalls to efficiently determine which `/dev/videoN` devices\nare webcams and which are the additional metadata control handles.\nThe list of strings returned are the full filepaths to valid devices.\n\n\u003e[!IMPORTANT]\n\u003eIn order for this library to work properly, the executing user must have either root or video group privileges\n\n## Technical Details\n\nThe library works by:\n\n1. Scanning `/dev` for files matching the pattern `video*`\n2. Using the `VIDIOC_QUERYCAP` ioctl to check if each device is a video capture device\n3. Filtering out non-capture devices (like metadata control handles)\n\nThe core functionality is implemented through direct syscalls to the Linux kernel's V4L2 (Video4Linux2) API. The library uses the `VIDIOC_QUERYCAP` ioctl command to query device capabilities and determine if a device supports video capture.\n\n## Usage\n\n```go\ndevices, err := vidnumerator.EnumeratedVideoDevices()\nif err != nil {\n    // handle error\n}\n// devices will contain paths like \"/dev/video0\", \"/dev/video2\", etc.\n```\n\n## Implementation Notes\n\n- Uses direct syscalls via `golang.org/x/sys/unix`\n- Implements custom ioctl constants for V4L2 device querying\n- Checks for specific device capabilities (0x4200001) to identify capture devices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Fvidnumerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaigrr%2Fvidnumerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Fvidnumerator/lists"}