Skip to main content

Scripts for saving and splitting video files for other projects

Project description

Overview

Utilities to handle video from camera. Contains various utilites that crop and split the video files.

Installation

In your virtual env do

$ pip install spvideoutils

Scripts

The following scripts are provided by the package.

  • video_capture.py
    • Captures a video from a camera to mp4 file on disk.
  • video_split.py
    • Splits a mp4 file into frames stored as png file on output dir.
  • video_merge.py
    • Merges the frames in png file from dir to a video file.
  • video_crop.py
    • Crops a video file from frame number i to j.

Developing VideoUtils

This involves

  • Creating a python virtual env.
  • Downloading the source code from GitHub
  • Installing all the dependencies
  • Installing the package in dev mode.

For example these are steps I typically do on my windows machine.

python -m venv venv_dev_spvideoutils  
env_spvideoutils\Scripts\activate
git clone https://github.com/sanjeevs/spvideoutils.git
cd spvideoutils
pip install -r requirements.txt
pip install -e . 

I can check that the env is correctly setup by invoking any of the scripts above from the same window.

>video_capture
usage: video_capture [-h] [--index INDEX] [--time TIME] outfile
video_capture: error: the following arguments are required: outfile

Creating a distribution package

Check the resource packaging.python.org on how to buiild the distribution.

  • Bump the version of the software in setup.py
  • Run the script to create the distribution in a new folder called dist.
python setup.py bist_wheel

This is done by publishing the changes to pypi. It involves the following steps.

  • This is a pure python project and so a wheel distribution is required. Source distribtution (sdist) is for packages with C extensions.

  • Use twine to upload the source distribution.
twine upload dist/*

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spvideoutils-0.0.3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file spvideoutils-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: spvideoutils-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for spvideoutils-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3463aa4b444c1f6e5d897c1c5134d0c497504189e90f0d0995ae1d78671eafce
MD5 e43702f4c46f7b2ce74f00f05b5c2fb4
BLAKE2b-256 6c31dbc65326fc6b6b5cc1b071a0fa10a741207ec926be574ab71317f6196e16

See more details on using hashes here.

Supported by

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