Skip to main content

Edit videos with a text editor

Project description

vi-video

Edit videos with vi or your favorite text editor.

Overview

Editing a video or audio file with this tool consists of three steps:

  • Run one command to transcribe the media you want to edit
  • Edit the text transcription file in vi or your favorite text editor
  • Run another command to cut the video

Example commands

To install this package, run:

pip install vivideo

To generate a trascription text file, you can run this command:

vivideo-transcribe -i samples/jfk.wav -t samples/jfk.txt

After you have edited the transcription (we recommend you save it with another name), run something like this:

vivideo-edit -i samples/jfk.wav -t samples/jfk.edited.txt -o samples/jfk.edited.wav --no-greedy

Vi-Video uses FFMpeg as audio and video processing tools. In order to execute the steps above, it is required to have FFMpeg library installed (read more).

You will also need to run pip install vosk to generate the transcriptions.

Algorithm

MVP aligns each word in the desired transcript to its first occurrance in the original transcription. It only looks for matches that occur after the last matched word/timestamp, so transpositions are not allowed.

To make the result seem nicer, it will include a margin before and after each cut, as in auto-editor. If the margin of one cut would overlap with the margin of the following cut, then we don't make a cut.

We will probably want to use something like Damerau–Levenshtein distance to find the best possible alignment between original string (transcription) and desired output string (edited script).

If the desired transcript contains words not in the original (inclusions), we could do overdub or speech synthesis with something like VALL-E.

Alternatives

This is the poor man's version of descript, which allows you to edit a video like it's a text document.

The best open source tool we could find that do something similar to this are auto-editor and videogrep

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

vivideo-0.0.1.tar.gz (394.9 kB view details)

Uploaded Source

Built Distribution

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

vivideo-0.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vivideo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7ad9104830a4578c4cb6e17bf5401a50098711313a163ffda9e76ae0d0906d04
MD5 e2ab4b74dcc18ff672429c040c4ef752
BLAKE2b-256 d9daa2a4733f40429f4a7801232620dd746292bf2edd1e89dc63f3e6c682a007

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vivideo-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fcb07d60883d9c663bdc34f73223a21433eda7f196e95b7eddf76478541352cd
MD5 0c2cb2c313b6047a8d1946638d60b59e
BLAKE2b-256 43f5e1167feba630e7f91a6c4ac85df4ae50dbbf8dee9b85e6c4f11bb57810bb

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