{"id":25974418,"url":"https://github.com/matthewww/fpv-auto-trimmer","last_synced_at":"2025-08-02T05:08:38.897Z","repository":{"id":278915682,"uuid":"937163666","full_name":"matthewww/fpv-auto-trimmer","owner":"matthewww","description":"A bulk utility to trim the beginning and end* of FPV videos, when the drone is sitting on the ground. *Currently only the beginning.  ","archived":false,"fork":false,"pushed_at":"2025-02-25T07:34:32.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T02:33:07.075Z","etag":null,"topics":["drone","fpv","video"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewww.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":"2025-02-22T13:44:50.000Z","updated_at":"2025-02-25T07:34:36.000Z","dependencies_parsed_at":"2025-02-22T19:31:34.809Z","dependency_job_id":null,"html_url":"https://github.com/matthewww/fpv-auto-trimmer","commit_stats":null,"previous_names":["matthewww/fpv-trimmer","matthewww/fpv-auto-trimmer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matthewww/fpv-auto-trimmer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewww%2Ffpv-auto-trimmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewww%2Ffpv-auto-trimmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewww%2Ffpv-auto-trimmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewww%2Ffpv-auto-trimmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewww","download_url":"https://codeload.github.com/matthewww/fpv-auto-trimmer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewww%2Ffpv-auto-trimmer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266525116,"owners_count":23942877,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["drone","fpv","video"],"created_at":"2025-03-05T02:29:58.721Z","updated_at":"2025-07-22T16:07:30.999Z","avatar_url":"https://github.com/matthewww.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FPV Auto Trimmer\n[![PyPI version](https://badge.fury.io/py/fpv-auto-trimmer.svg?icon=si%3Apython)](https://badge.fury.io/py/fpv-auto-trimmer)\n[![Pylint](https://github.com/matthewww/fpv-auto-trimmer/actions/workflows/pylint.yml/badge.svg)](https://github.com/matthewww/fpv-auto-trimmer/actions/workflows/pylint.yml)\n[![Publish to PyPI](https://github.com/matthewww/fpv-auto-trimmer/actions/workflows/publish.yml/badge.svg)](https://github.com/matthewww/fpv-auto-trimmer/actions/workflows/publish.yml)\n- Detects frames when the drone is sitting on the ground at the start of of FPV drone video clips, and **trims the frames out.**\n- Processes **multiple videos** automatically (sequentially).\n- Uses **[Optical Flow](https://docs.opencv.org/4.x/d4/dee/tutorial_optical_flow.html)** to track motion.\n- Detects **takeoff events** based on motion intensity.\n\n![image](https://github.com/user-attachments/assets/92479965-0f6f-4f43-ae98-29b20ec7581a)\n![image](https://github.com/user-attachments/assets/8aa4c082-385c-4aac-8fd0-114df681cb33)\n\n![image](https://github.com/user-attachments/assets/e8b74f78-ecc8-45e4-a8a9-3a412144e491)\n\n#### Why?\nI had a lot of videos taking up unnecessary space, but also didn't want to delete them. I wanted to build a tool that quickly and easily keep only the main flights.\nAlso I just wanted an excuse to try out a Python / Github CI/CD workflow and OpenCV 😛\n\n#### Todo\n- [ ] Break into logical modules? Seperate concerns (e.g. 'UI' and OpenCV processing).\n- [ ] Add landing detection.\n- [ ] Parallel process if there's CPU capacity?\n    - [ ] Process in halves? End to middle? Sort of binary processing.\n    - [ ] Containers / K8s /  Cloud / Web UI\n- [ ] Accept path at prompt\n\n#### Compatibility\nSo far, only tested to be working on .MOV format H.264 codec videos (from a Runcam 3).\n\n#### Performance\nAround 60s for a 60s clip (i7 6700k, 16 GB)\n\n## Usage\n```bash\npip install fpv-auto-trimmer\n```\n#### Process all videos in a folder:\nBy default, processed videos are saved to an 'output' folder next to the input location.\n```bash\npython -m fpv_auto_trimmer [-h] [--output OUTPUT] input_path\n```\nFor example: \n```bash\npython -m fpv_auto_trimmer C:\\fpv-auto-trimmer\\input\n```\n\n#### Process a single video:\n```bash\npython -m fpv_auto_trimmer [-h] [--output OUTPUT] input_path_to_video\n```\nFor example:\n```bash\npython -m fpv_auto_trimmer C:\\fpv-auto-trimmer\\input\\video.mov\n```\n\n\n\n## Development Setup\n```bash\ngit clone https://github.com/matthewww/fpv-auto-trimmer.git\ncd fpv-auto-trimmer\npip install -e .[dev]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewww%2Ffpv-auto-trimmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewww%2Ffpv-auto-trimmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewww%2Ffpv-auto-trimmer/lists"}