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

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

Uploaded Python 3

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