{"id":13711998,"url":"https://github.com/tetsu-koba/v4l2capture","last_synced_at":"2026-02-13T18:39:30.132Z","repository":{"id":157797468,"uuid":"630316506","full_name":"tetsu-koba/v4l2capture","owner":"tetsu-koba","description":"v4l2 video capturer written in Zig ","archived":false,"fork":false,"pushed_at":"2025-03-06T07:25:03.000Z","size":69,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T21:41:04.617Z","etag":null,"topics":["v4l2","video-streaming","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/tetsu-koba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-04-20T06:00:48.000Z","updated_at":"2025-04-17T20:34:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2196246-898e-43f1-ac40-228015849fee","html_url":"https://github.com/tetsu-koba/v4l2capture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tetsu-koba/v4l2capture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsu-koba%2Fv4l2capture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsu-koba%2Fv4l2capture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsu-koba%2Fv4l2capture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsu-koba%2Fv4l2capture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tetsu-koba","download_url":"https://codeload.github.com/tetsu-koba/v4l2capture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsu-koba%2Fv4l2capture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["v4l2","video-streaming","zig"],"created_at":"2024-08-02T23:01:13.838Z","updated_at":"2026-02-13T18:39:30.116Z","avatar_url":"https://github.com/tetsu-koba.png","language":"Zig","funding_links":[],"categories":["Data \u0026 Science"],"sub_categories":["Sensor and Communication Interface"],"readme":"#  V4L2 video capturer written in Zig\n\nCapture video frames from V4l2 camera device.\n\n## How to Build and Show Usage\n\n```shell-session\n$ zig version\n0.11.0-dev.2777+b95cdf0ae\n$ zig build\n$ ./zig-out/bin/v4l2capture \nUsage: ./zig-out/bin/v4l2capture /dev/videoX URL [width height framerate pixelformat max_frames]\n\tURL is 'file://filename', 'tcp://hostname:port' or just filename.\n\tDefault width, height and framerate is 640x480@30fps\n\tpixelformat is FourCC such as MJPG and YUYV. Defaut is MJPG.\n\tmax_frames is the number of frames to capture. Default is unlimited(0). Stop by Control-C.\n```\n\n## Save to local file\n\n```shell-session\n$ ./zig-out/bin/v4l2capture /dev/video0 out.mjpg 320 240 30\nwarning: Requested format is 320x240 but set to 320x180.\n^Cinfo: 1682150185282:Got SIGINT\ninfo: 1682150185304:duration 24769ms, frame_count 743, 30.00fps\n```\nStop the process by entering ^C at an appropriate point.\nAlthough 320x240 was requested, the camera did not support it, so the message states that it has been changed to 320x180.\n\n## Playing the generated mjpg file\n\n```shell-session\n$ ffprobe out.mjpg\n\n...\n\nInput #0, jpeg_pipe, from 'out.mjpg':\n  Duration: N/A, bitrate: N/A\n    Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 320x180, 25 fps, 25 tbr, 25 tbn, 25 tbc\n```\n\nAlthough it shows 25fps here, this is incorrect. The default value for ffprobe when the frame rate is unknown is 25fps.\nWhen playing this with ffplay, you need to explicitly specify the frame rate.\n\n```shell-session\n$ ffplay -framerate 30 out.mjpg\n```\n\n## Sending MJPEG over TCP and remote playback\n\nWith the update of 2023/04/24, MJPEG can now be sent over TCP.\n\nOn the receiver:\n\n```shell-session\n$ ffplay -hide_banner -autoexit \"tcp://:8999?listen\"\n```\n\n\nOn the sender:\n\n```shell-session\n$ zig-out/bin/v4l2capture /dev/video0 tcp://host:8999 320 240 15\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetsu-koba%2Fv4l2capture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftetsu-koba%2Fv4l2capture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetsu-koba%2Fv4l2capture/lists"}