Skip to main content

Memento-ize a video

Project description

Mementoizer

A python library to Memento-ize videos.

Meaning, cut the video up into scenes, pass the first half through a black-and-white filter, and interleave them.

Created for NaMoGenMo 2022. For an example, see:

The original film for comparison can be viewed here: https://en.wikipedia.org/wiki/File:The_Memphis_Belle_-_A_Story_of_a_Flying_Fortress.webm

Installation

Mementoizer can be installed from PyPI:

pip install mementoizer

Usage

Command-line usage: mementoize <video-filename>

Programmatic usage:

from mementoizer import mementoize

mementoize(video_filename, ...)

Options

--skip-start Number of seconds to ignore for cutting purposes at the beginning of the video file. For example, skipping intro credits. Default: 0

--skip-end Number of seconds to ignore for cutting purposes at the end of the video file. For example, skipping end credits. Default: 0

--min-scene-length Minimum number of seconds to count as a scene. If a cut is detected less than this many seconds after a previous one, it is disregarded. Default: 120 seconds

--threshold Parameter for tuning cut detection. Must be a float between 0 and 1. Typical values for normal shot detection are 0.4-0.6. Since we are trying to detect scene boundaries rather than plain shots, it's set a little higher by default. Default: 0.7

--overlap Number of seconds to overlap between clips (chronologically). You will see this many seconds repeated to connect the previous scene to the one you are watching now. Default: 4

--cuts Manually specify cut times, in seconds after the start of the video. If this is provided, cut detection is skipped. --skip-start, --skip-end, and --min-scene-length are still applied. Values should be comma-separated integers. NOTE: the resulting video will start at the first timestamp you provide. So you must start the list with 0 if you don't want to skip the first scene.

--verbose Print out the cut times detected (or supplied if --cuts is specified).

--dry-run Print detected cut timstamps and exit. Do not write or modify any files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mementoizer-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

mementoizer-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file mementoizer-0.0.1.tar.gz.

File metadata

  • Download URL: mementoizer-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for mementoizer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9dccf4224c9aa84d23b27c60d59f0f5fcf2c2b0675683d07612b9a4aceeb9ff4
MD5 8bd53e5e559d89f321b0fc2dd2a34e4d
BLAKE2b-256 ea54a739b686f2806a2e2902002340a549aaec4bfa46f1471353bf4138db0c65

See more details on using hashes here.

File details

Details for the file mementoizer-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mementoizer-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for mementoizer-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90229acb18817b6e7749f7d13d346733f621e91cccdf87b59d470c11ecbc80c4
MD5 cb7690a620af5ba794d3698afbf5e83a
BLAKE2b-256 1ad83d52a2bca259eadfd1561e20345fc006bf8e0de822d05d2976f70830f373

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page