{"id":21048472,"url":"https://github.com/torao/ivr","last_synced_at":"2026-05-19T00:42:37.430Z","repository":{"id":146622287,"uuid":"437489143","full_name":"torao/iVR","owner":"torao","description":"Multi-Purpose Video Recorder for Raspberry Pi","archived":false,"fork":false,"pushed_at":"2022-02-23T02:02:16.000Z","size":1223,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T18:12:22.685Z","etag":null,"topics":["camera","footage","gps","gps-location","gps-tracking","raspberry-pi","raspberrypi","rpi"],"latest_commit_sha":null,"homepage":"","language":"Python","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/torao.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":"2021-12-12T08:15:19.000Z","updated_at":"2022-02-04T17:44:53.000Z","dependencies_parsed_at":"2023-04-19T01:38:36.790Z","dependency_job_id":null,"html_url":"https://github.com/torao/iVR","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/torao%2FiVR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torao%2FiVR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torao%2FiVR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torao%2FiVR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torao","download_url":"https://codeload.github.com/torao/iVR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495489,"owners_count":20299921,"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","footage","gps","gps-location","gps-tracking","raspberry-pi","raspberrypi","rpi"],"created_at":"2024-11-19T14:43:36.701Z","updated_at":"2026-05-19T00:42:37.388Z","avatar_url":"https://github.com/torao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iVR: Multi-Purpose Video Recorder for Raspberry Pi\r\n\r\nThe goal of iVR is to record long-term footage, either offline or online, with information acquired\r\nfrom various sensor devices. This repository contains scripts and setups to turn your Raspberry Pi\r\ninto a homebrew footage recorder. iVR might be used for the following purposes:\r\n\r\n* **Security Camera**: for home, garage and warehouse\r\n* **Dashboard Camera**: install at the front or rear of the vehicle\r\n* **Observation**: landscape, plants, and animals\r\n\r\nhttps://user-images.githubusercontent.com/836654/152195811-4a69e739-bfb7-4dc1-8158-f9dd9cd90fbc.mp4\r\n\r\nNote, however, that iVR is intended to be a DIY footage recording device and does NOT guarantee\r\nreliable footage recording.\r\n\r\nThe current iVR version only stores video files and does NOT have the ability to distribute live\r\nstreaming. Also, audio recording is still unstable and is turned off by default.\r\n\r\n## Requirements\r\n\r\n* Raspberry Pi or Raspberry Pi Zero:\r\n  * 512MB+ memory\r\n  * H.264 hardware encoder\r\n  * Single-core CPU will work but recommends quad-core model\r\n  * Latest [Raspberry Pi OS](https://www.raspberrypi.com/software/) (raspbian)\r\n    * It may be available for other Linux operating systems with a few modifications\r\n* USB storage:\r\n  * FAT32 or exFAT formatted\r\n  * Recommends 64GB+ (requires about 280MB to 360MB per hour)\r\n    * iVR log: 500MB max\r\n    * tracklog: 8GB max\r\n  * Flash memory, SSD, HDD, etc.\r\n  * Use the one recognized as `/dev/sda1`\r\n* Camera:\r\n  * Many USB Web cameras will work, but you may need to modify the script in some cases\r\n  * MIPI camera module is also possible by directly specifying the device file\r\n* GPS Receiver\r\n  * Optional\r\n  * [Compatible with `gpsd`](https://gpsd.gitlab.io/gpsd/hardware.html)\r\n  * Possible to use without GPS receiver, then the time and location information will not be\r\n    displayed.\r\n* Speaker\r\n  * Optional, but recommended to notify system errors and drives\r\n  * USB, 3.5mm jack, HDMI, or bluetooth\r\n* RTC Module\r\n  * Optional, but recommended not to deviate the clock or GPS positioning too much if you are going\r\n    to be using this offline or turning this on/off frequently.\r\n\r\nDevices confirmed to work well:\r\n\r\n* **Raspberry Pi**: 1B+, 3B, 3B+\r\n* **Storage**: KIOXIA TransMemory \r\n* **Camera**: Logitech C270n, C922n\r\n\r\n## Features\r\n\r\n### Data Recording\r\n\r\nThe USB storage attached to the Raspberry Pi will be stored the following information:\r\n\r\n* `footage-nnnnnn-YYYYMMDDHH.avi` - Video with time and location information on it.\r\n* `tracklog-YYYYMMDD.gpx` - GPS positioning records.\r\n* `ivr-YYYYMMDD.log` - Application log.\r\n\r\nThese files will be switched every hour or day. If the total size of the files exceeds the allowable\r\nsize, they will be deleted in order starting with the oldest file.\r\n\r\n#### Footage File\r\n\r\nThe footage file is a AVI format that allows you to play back the video up to the point just before\r\nthe interruption, even if there is a sudden power failure.\r\nThis format can be played by Windows Standard Player and mac OS / Linux LVC. It can also be\r\nconverted to MP4 by `ffmpeg` as follows:\r\n\r\n```\r\n$ ffmpeg -i footage-xxx.avi footage-xxx.mp4\r\n```\r\n\r\n#### GPS Location File\r\n\r\nGPS positioning records are saved in GPX format, which can be used by some location-based services\r\nsuch as Google Earth.\r\n\r\nThe end of the file is often broken by sudden power-off, but it's a plain text (XML) file and can\r\nbe fixed manually :)\r\n\r\n### Headless and Offline Environment\r\n\r\niVR assumes to be used headless, without a display or keyboard connected, in an environment that is\r\nnot connected to the Internet.\r\nWhen an error or other event occurs, the speaker will be used to notify you. So it's recommended\r\nthat you connect a small speaker.\r\nIf you put a file named `announce.wav` in the `bin/` directory, that it will be played before every\r\nnotification.\r\n\r\nRaspberry Pi doesn't have an RTC, so if it's not connected to a network (and cannot be synchronized\r\nwith NTP server), the local time will deviate significantly when the power is turned on and off.\r\nThe iVR has the ability to adjust the local time using the GPS time.\r\n\r\n## Setup Your Raspberry Pi\r\n\r\nAttach the USB storage, USB camera, and GPS receiver. And your Raspberry Pi.\r\n\r\nIf you have just installed the Raspberry Pi OS, it's recommended that you update your firmware and\r\nsystem.\r\n\r\n```\r\n$ sudo apt-get update -y \u0026\u0026 sudo apt-get upgrade -y\r\n$ sudo rpi-update\r\n```\r\n\r\nThe iVR uses Ansible for its setup. You can setup locally on the Raspberry Pi's own localhost, or\r\nremotely from Windows/macOS/Linux etc.\r\n\r\n### Configure Locally\r\n\r\nIf you want to configure iVR on your Raspberry Pi local, you will need to install `git` and\r\n`ansible` first. After then, The `PATH` will be added in the `.profile` so that you may need to do\r\n`. .profile`, or logout/login.\r\n\r\n```\r\n$ sudo apt install -y git python3-pip\r\n$ pip3 install ansible\r\n$ . ~/.profile\r\n```\r\n\r\nBoth of local and remote, clone the iVR repository and edit `startup.sh` to set the appropriate data\r\nsize limit for the USB storage to be used. For example, if you are using 128GB of USB storage, the\r\nvalues would be as follows:\r\n\r\n```\r\n$ git clone https://github.com/torao/iVR.git\r\n$ cd iVR\r\n$ vi files/bin/startup.sh\r\n...\r\nCOORDINATE_OPTIONS+=\" --limit-footage 120G\"\r\nCOORDINATE_OPTIONS+=\" --limit-tracklog 5G\"\r\n```\r\n\r\nTo configure iVR from the localhost of Raspberry Pi itself, run Ansible as follows:\r\n\r\n```\r\n$ ansible-playbook -i hosts --connection=local site.yml\r\n```\r\n\r\n### Configure Remotely\r\n\r\nTo configure iVR from the remote machine, configure the Raspberry Pi so that you can login using ssh,\r\nand replace `localhost` in the [`hosts`](/torao/iVR/tree/main/hosts) file with the hostname or IP\r\naddress of the machine you want to setup.\r\n\r\n```\r\n$ vi hosts\r\n[all]\r\n192.168.xxx.yyy\r\n...\r\n$ ansible-playbook -i hosts site.yml\r\n```\r\n\r\nIf the connection fails, run the following command to see if the connection is established correctly. You may need\r\n`sshpass` in your runtime environment.\r\n\r\n```\r\n$ ansible all -i hosts -m ping --ask-pass\r\n```\r\n\r\n\u003e It also possible to setup iVR by manually doing the steps described in \r\n\u003e [`site.yml`](/torao/iVR/tree/main/site.yml). In this case, you could use regular Linux instead of\r\n\u003e Raspberry Pi. If you are doing this operation for the sake of learning Linux, doing everything\r\n\u003e manually may help you understand the system.\r\n\r\n### Check Your Environment\r\n\r\nAfter Ansible has been successfully finished, making sure the camera and GPS receiver are connected\r\nand reboot your Raspberry Pi.\r\n\r\nWhen iVR starts correctly, you should see the following three python processes running.\r\n\r\n```\r\n$ ps -ef | grep python\r\npi  778  1 83 01:08 ?  00:13:25 python3 /opt/ivr/bin/gpslog.py\r\npi  779  1  0 01:08 ?  00:00:00 python3 /opt/ivr/bin/coordinate.py\r\npi  780  1  0 01:08 ?  00:00:00 python3 /opt/ivr/bin/record.py\r\n```\r\n\r\nIn addition, recording should have started and footage files and logs should have been generated in\r\nthe `/opt/ivr/data/` directory. If one of the python processes fails to start, please refer to\r\n`/opt/ivr/data/ivr-YYYYMMDD.log` or `~/ivr-boot.log`.\r\n\r\n```\r\n$ espeak-ng \"hello, world\"\r\n```\r\n\r\n## System Structure\r\n\r\n![system-boundary](https://user-images.githubusercontent.com/836654/152196050-de549dc6-e55d-4c96-9122-d0dfad279cec.png)\r\n\r\n## License\r\n\r\n[MIT License](/torao/iVR/tree/main/LICENSE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorao%2Fivr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorao%2Fivr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorao%2Fivr/lists"}