{"id":15680302,"url":"https://github.com/raresail/raspbian-csi-stream","last_synced_at":"2026-05-05T00:38:47.638Z","repository":{"id":179026181,"uuid":"662725509","full_name":"RaresAil/raspbian-csi-stream","owner":"RaresAil","description":"low latency rpi csi camera stream using opencv, flask, libcamera-vid","archived":false,"fork":false,"pushed_at":"2023-07-05T19:11:12.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T09:29:40.828Z","etag":null,"topics":["camera","camera-module","csi","flask","http","libcamera","libcamera-vid","mjpeg","opencv","python3","raspberry-pi","server","stream","udp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RaresAil.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":"2023-07-05T18:47:02.000Z","updated_at":"2024-02-01T05:49:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"806de12c-84f2-4af4-9781-f22615dccf86","html_url":"https://github.com/RaresAil/raspbian-csi-stream","commit_stats":null,"previous_names":["raresail/raspbian-csi-stream"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RaresAil/raspbian-csi-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresAil%2Fraspbian-csi-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresAil%2Fraspbian-csi-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresAil%2Fraspbian-csi-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresAil%2Fraspbian-csi-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaresAil","download_url":"https://codeload.github.com/RaresAil/raspbian-csi-stream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresAil%2Fraspbian-csi-stream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32631058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: 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":["camera","camera-module","csi","flask","http","libcamera","libcamera-vid","mjpeg","opencv","python3","raspberry-pi","server","stream","udp"],"created_at":"2024-10-03T16:41:23.950Z","updated_at":"2026-05-05T00:38:47.622Z","avatar_url":"https://github.com/RaresAil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# raspbian-csi-stream\nlow latency rpi csi camera stream using opencv, flask, libcamera-vid\n\n### Features!\n\n- You can open multiple browsers at the same time\n- The speed of the video is very fast, almost real time\n- The stream uses UDP\n\n### Commands to run:\n\n```bash\n$ sudo apt update --fix-missing\n$ sudo apt install -y libopenjp2-7-dev libhdf5-dev libatlas-base-dev python3-pip python3-h5py python3-opencv libqt5gui5 libqt5webkit5 libqt5test5\n$ sudo pip3 install flask\n```\n\n### Python3 Script \u0026 libcamera-vid\n\n- Check the app.py for the python script\n- The libcamera-vid command to stream from the camera as UDP is, for fast response, do not increase the resolution, i used Module 3\n```\nlibcamera-vid -t 0 --level 4.2 --denoise cdn_off --codec mjpeg --inline -o udp://127.0.0.1:5800 -n --segment 1 -q 80 --width 854 --height 480\n```\n\n### Systemd Services\n\n#### For libcamera\n\n```\nsudo nano /lib/systemd/system/pi-vid.service\n```\n\nContents\n\n```service\n[Unit]\nDescription=The Pi camera stream in UDP\nAfter=network.target\n\n[Service]\nUser=pi\nType=simple\nExecStart=/usr/bin/libcamera-vid -t 0 --level 4.2 --denoise cdn_off --codec mjpeg --inline -o udp://127.0.0.1:5800 -n --segment 1 -q 80 --width 854 --height 480\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\nTo start the service and enable it to start at boot\n```\n$ sudo systemctl start pi-vid\n$ sudo systemctl enable pi-vid\n```\n\n#### For python script\n\n```\nsudo nano /lib/systemd/system/pi-vid-stream.service\n```\n\nContents, the WorkingDirectory has to be set inside the folder with app.py\n\n```service\n[Unit]\nDescription=The Pi camera stream in HTTP\nRequires=pi-vid.service\nAfter=pi-vid.service\n\n[Service]\nUser=pi\nType=simple\nWorkingDirectory=/home/pi/raspbian-csi-stream\nExecStart=/usr/bin/python3 ./app.py\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\nTo start the service and enable it to start at boot\n```\n$ sudo systemctl start pi-vid-stream\n$ sudo systemctl enable pi-vid-stream\n```\n\n### To view the stream create a html file with the following data and open it\n\n`192.168.x.x` has to be the ip of the rpi\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eDocument\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cimg\n      id=\"bg\"\n      src=\"http://192.168.x.x:5700/video_feed\"\n      style=\"width: 88%\"\n    /\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraresail%2Fraspbian-csi-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraresail%2Fraspbian-csi-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraresail%2Fraspbian-csi-stream/lists"}