{"id":37070948,"url":"https://github.com/ryanfox/video-to-sqlite","last_synced_at":"2026-01-14T08:17:12.765Z","repository":{"id":58762879,"uuid":"533604410","full_name":"ryanfox/video-to-sqlite","owner":"ryanfox","description":"Extract metadata from a video to an sqlite database","archived":false,"fork":false,"pushed_at":"2024-05-23T20:38:41.000Z","size":8,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-15T20:53:15.464Z","etag":null,"topics":["sqlite"],"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/ryanfox.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}},"created_at":"2022-09-07T04:28:20.000Z","updated_at":"2025-02-01T18:59:19.000Z","dependencies_parsed_at":"2022-09-08T03:50:27.673Z","dependency_job_id":null,"html_url":"https://github.com/ryanfox/video-to-sqlite","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ryanfox/video-to-sqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfox%2Fvideo-to-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfox%2Fvideo-to-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfox%2Fvideo-to-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfox%2Fvideo-to-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanfox","download_url":"https://codeload.github.com/ryanfox/video-to-sqlite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfox%2Fvideo-to-sqlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"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":["sqlite"],"created_at":"2026-01-14T08:17:12.095Z","updated_at":"2026-01-14T08:17:12.757Z","avatar_url":"https://github.com/ryanfox.png","language":"Python","readme":"# video-to-sqlite\n\n[![PyPI](https://img.shields.io/pypi/v/video-to-sqlite.svg)](https://pypi.org/project/video-to-sqlite/)\n\nLoad data about a video file into SQLite\n\n## Installation\n\nInstall this tool using `pip`:\n\n    pip install video-to-sqlite\n\n## Usage\n\nTo create a SQLite database with metadata about a video, run:\n\n    video-to-sqlite videos.db my_video.mp4\n\nThe tool will create two tables: `videos` and `frames`. If `videos.db` already exists, the video will be added to the\n`videos` table.\n\nTo create the tables with a prefix, use `--prefix prefix`. For example:\n\n    video-to-sqlite videos.db cool_video.mp4 --prefix cool_\n\nThis will create tables called `cool_videos` and `cool_frames`.\n\n### Extra processing\n\nUsing the library programatically allows extra columns to be added to the database via a callback. Specify the\n`callback` argument to `cli.main()`.\n\nThe function will be called once per frame in the video. It should accept a numpy ndarray of the frame in question,\nand a dict containing metadata for the frame. The callback should return a dict. The dict's keys will be added as\ncolumns to the DB, and values will be the corresponding values for that row.\n\nAn example:\n\n```\nimport video_to_sqlite\n\ndef my_callback(frame, metadata):\n    has_a_cat_in_it = ai_cat_image_detector(frame)\n    \n    if metadata['pict_type'] == 'I':  # is this frame a keyframe?\n        brightness = get_average_brightness(frame)\n    \n    return {'cat': has_a_cat_in_it, 'brightness': brightness}\n\nvideo_to_sqlite.main('my_database.db', 'cool_video.mp4', 'cool_', my_callback)\n```\n\nSee `callback.py` for a working example.\n\n\n## video-to-sqlite --help\n\n```\nUsage: video-to-sqlite DB_PATH VIDEO_FILE PREFIX\n\n  Load data about frames from a video into SQLite\n\n  Usage example:\n\n      video-to-sqlite videos.db my_video.mp4 my_\n\n  Created tables will be videos and frames\n\n  To create tables called cool_videos, cool_frames use\n  --prefix cool_:\n\n      video-to-sqlite videos.db my_video.mp4 --prefix cool_\n\nOptions:\n  --version            Show the version and exit.\n  --prefix TEXT        Prefix to use for the created database tables\n  --help               Show this message and exit.\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfox%2Fvideo-to-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanfox%2Fvideo-to-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfox%2Fvideo-to-sqlite/lists"}