Skip to main content

video-to-sqlite

PyPI

Load data about a video file into SQLite

Installation

Install this tool using pip:

pip install video-to-sqlite

Usage

To create a SQLite database with metadata about a video, run:

video-to-sqlite videos.db my_video.mp4

The tool will create two tables: videos and frames. If videos.db already exists, the video will be added to the videos table.

To create the tables with a prefix, use --prefix prefix. For example:

video-to-sqlite videos.db cool_video.mp4 --prefix cool_

This will create tables called cool_videos and cool_frames.

Extra processing

Using the library programatically allows extra columns to be added to the database via a callback. Specify the callback argument to cli.main().

The function will be called once per frame in the video. It should accept a numpy ndarray as the single argument, and return a dict. The dict's keys will be added as columns to the DB, and values will be the corresponding values for that row.

An example:

import video_to_sqlite

def my_callback(frame):
    has_a_cat_in_it = ai_cat_image_detector(frame)
    return {'cat': has_a_cat_in_it}

video_to_sqlite.main('my_database.db', 'cool_video.mp4', 'cool_', my_callback)

See callback.py for a working example.

video-to-sqlite --help

Usage: video-to-sqlite DB_PATH VIDEO_FILE PREFIX

  Load data about Python packages from PyPI into SQLite

  Usage example:

      video-to-sqlite videos.db my_video.mp4 my_

  Created tables will be videos and frames

  To create tables called cool_videos, cool_frames use
  --prefix cool_:

      video-to-sqlite videos.db my_video.mp4 --prefix cool_

Options:
  --version            Show the version and exit.
  --prefix TEXT        Prefix to use for the created database tables
  --help               Show this message and exit.

Metadata

Release files for video-to-sqlite 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for video-to-sqlite 0.0.2
File Size Uploaded Provenance Actions
video-to-sqlite-0.0.2.tar.gz 5.1 kB Without provenance Details for video-to-sqlite-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for video-to-sqlite 0.0.2
File Interpreter ABI Platform Actions
video_to_sqlite-0.0.2-py3-none-any.whl Python 3 none any Details for video_to_sqlite-0.0.2-py3-none-any.whl

Total release size: 11.1 kB

Release files / video-to-sqlite-0.0.2.tar.gz

Download URL video-to-sqlite-0.0.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f2f49080492603ea7330613382aaa838839ebf72ceed26d087250c743b0a2fa9
BLAKE2b-256 checksum
How to use checksums
74fd01bf3c4eeb0f7ccbb88b8fa3c60e146c1c84294358ca1c88cf377a49222e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / video_to_sqlite-0.0.2-py3-none-any.whl

Download URL video_to_sqlite-0.0.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
697163c93fcf9f9416514d9bde97878f6a3ed627714db718429e50d8a1ca0196
BLAKE2b-256 checksum
How to use checksums
ea73e756a9cf2fa2d4fbc22050265234c5dd5169bdd676d8e1b7ed437af61ab9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for video-to-sqlite 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page