Skip to main content

A video clipper, cutter, and splicer.

Project description

cliparoo

drawing

A video clipper, cutter, and splicer.

install

pip install cliparoo

You need ffmpeg and ffprobe installed. That's it.

cli

Here is an example on how to extract the first 5000 frames of myout.mp4:

cliparoo -i tos_720p.mp4 --input-info --clip 0-4999 -o myout.mp4 --verbose --clip-mode approx_inner --verify

The -i flag sets the input and the -o flag sets the output.

The --clip flag takes the clip range. These can be multiple values joined by commas, which are spliced together. Integers represent frame indexes, floating point values represent times in seconds, and HH:MM:SS.MMMM format videos are similar. Keywords "start" and "end" also work. All clip ranges are inclusive.

The --clip-mode defines how to perform the clip. Values are exact (default), approx_inner, and approx_outer. Approx refers to the handling of time; counterintuitively this means to use a lossless stream copy.

The --verify flag will add additional checks to ensure the output and any temporary files have the correct frames.

The --input-info flag displays information about the video, and the --verbose adds additional fields.

There are other flags, like --dry-run, which you can find with --help.

python

The python library allows for programmatic use. It's pretty simple to use, the ClipRange takes either a string (matching the command line syntax) or a list of integers.

import cliparoo
vid = cliparoo.Video("tos_720p.mp4")
cr = cliparoo.ClipRange(vid, [0, 1, 2, 3, 4, 5]) # same as "0-5"
cr.run("output.mp4", mode="exact")

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

cliparoo-1.0.0.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

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

cliparoo-1.0.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file cliparoo-1.0.0.tar.gz.

File metadata

  • Download URL: cliparoo-1.0.0.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cliparoo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 86fa65e0a9d29706b8847d8d2b8b4e1d4f10504dc289811ad638958e397c9aed
MD5 a6aa9b058b53c90ca7e8ccd401ffce7c
BLAKE2b-256 9640f8f81f08a932c074289a5197b9f00a03e1fec4286adf3639c9df8fd86f27

See more details on using hashes here.

Provenance

The following attestation bundles were made for cliparoo-1.0.0.tar.gz:

Publisher: publish-to-pypi.yaml on Imageomics/cliparoo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cliparoo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cliparoo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cliparoo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eac991d2c99b4b802721a03174068afdf69626494588c492c52dbce92191512b
MD5 8eda9f3328a9a1b85580128ea3666507
BLAKE2b-256 9031877d487d8ae66d1fb63c6e253ead50e06c82e961c39c9e0ae84bd1b63e49

See more details on using hashes here.

Provenance

The following attestation bundles were made for cliparoo-1.0.0-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on Imageomics/cliparoo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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