{"id":19946608,"url":"https://github.com/jacobpclouse/motion-extraction","last_synced_at":"2026-05-15T05:03:48.117Z","repository":{"id":223030633,"uuid":"759071666","full_name":"jacobpclouse/Motion-Extraction","owner":"jacobpclouse","description":"With a very simple trick you can extract the motion of a video. Uses python and OpenCV","archived":false,"fork":false,"pushed_at":"2025-06-09T19:52:17.000Z","size":194,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-29T05:39:58.146Z","etag":null,"topics":["motion-extraction","opencv","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacobpclouse.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-17T18:41:23.000Z","updated_at":"2025-09-05T17:08:53.000Z","dependencies_parsed_at":"2024-11-13T00:46:19.651Z","dependency_job_id":null,"html_url":"https://github.com/jacobpclouse/Motion-Extraction","commit_stats":null,"previous_names":["jacobpclouse/motion-extraction"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacobpclouse/Motion-Extraction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobpclouse%2FMotion-Extraction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobpclouse%2FMotion-Extraction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobpclouse%2FMotion-Extraction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobpclouse%2FMotion-Extraction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobpclouse","download_url":"https://codeload.github.com/jacobpclouse/Motion-Extraction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobpclouse%2FMotion-Extraction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33054454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"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":["motion-extraction","opencv","python3"],"created_at":"2024-11-13T00:31:21.478Z","updated_at":"2026-05-15T05:03:48.069Z","avatar_url":"https://github.com/jacobpclouse.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Motion-Extraction \u003c!-- CTRL SHIFT V to preview md in vscode --\u003e\nWith a very simple trick you can extract the motion of a video. Uses python3 and OpenCV to compare current frame of the video to a previous frame to see where changes have been made in the frames (and any changes indicate motion).\n\u003e Inspired by \u003ca href=\"https://youtu.be/NSS6yAMZF78\"\u003e this \u003c/a\u003e video by Posy\n\n### NOTE: Recommend to only test on shorter videos (ie: not greater than 5 minutes) -- current program converts in REAL TIME \n- IE: 5 hour video = at least 5 hours to convert\n\n### How to run this program (Easy Way):\n- 1) Make sure you have python 3 downloaded, installed and on path\n- 2) Move your target MP4 video into the same directory as the `motion_Extraction.py` file\n- 5) Run the easy install program with the command `python Install_and_Run_Program.py --video 'yourVideo.mp4'` \n    * you NEED to provide the video title as an argument\n    * this will automatically create a new virtual environment, install all the pip packages and then run the extraction program\n- 6) If you want to see the extraction overlay, type `yes`. If you do not, type `no`\n- 7) If you just want the frame compared to the previous one, then type `PREVIOUS`. If you want a larger delay, type `CUSTOM` (you will the be prompted to enter your custom frame delay)\n- 8) Your output will be created in a subfolder within the `OUTPUTS` folder, enjoy!\n\n### How to run this program (Long Way):\n- 1) Make sure you have python 3 downloaded, installed and on path\n- 2) Use the activateVirEnv.txt to create a virtual environment\n- 3) Make sure you `pip install -r requirements.txt` to install all the needed packages\n- 4) Move your target MP4 video into the same directory as the `motion_Extraction.py` file\n- 5) Run the program with the command `python motion_Extraction.py yourVideo.mp4` \n    - you NEED to provide the video title as an argument\n- 6) If you want to see the extraction overlay, type `yes`. If you do not, type `no`\n- 7) If you just want the frame compared to the previous one, then type `PREVIOUS`. If you want a larger delay, type `CUSTOM` (you will the be prompted to enter your custom frame delay)\n- 8) Your output will be created in a subfolder within the `OUTPUTS` folder, enjoy!\n\n### Ideas:\n- [DONE] maybe combine the two while loops?\n- [DONE] invert then immediatly overlay?\n- [DONE] check pervious frame in one video then x frames back in another video (shows slower movement)\n- cut videos larger than like 3 minutes into chunks of 1 minutes, store in folder [check multiprocessing attempt folder]\n- then use threading to individually loop through and invert videos\n- then you can paste it together at the end\n\n### Resources used:\n- Motion Extraction tutorial (attempt...): https://youtu.be/woj4vfMLpao\n- Python OpenCV – cv2.flip() method: https://www.geeksforgeeks.org/python-opencv-cv2-flip-method/\n- Adding (blending) two images using OpenCV : https://docs.opencv.org/3.4/d5/dc4/tutorial_adding_images.html\n- How to split a video in parts using Python?: https://stackoverflow.com/questions/65570944/how-to-split-a-video-in-parts-using-python\n- multiprocessing — Process-based parallelism: https://docs.python.org/3/library/multiprocessing.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobpclouse%2Fmotion-extraction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobpclouse%2Fmotion-extraction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobpclouse%2Fmotion-extraction/lists"}