Edit videos with a text editor
Edit videos with vi or your favorite text editor.
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
vior your favorite text editor
- Run another command to cut the video
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
You will also need to run
pip install vosk to generate the transcriptions.
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.
This is the poor man's version of descript, which allows you to edit a video like it's a text document.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.