initial README.md version

This commit is contained in:
kolaczyn
2020-07-01 10:12:39 +02:00
parent 635f69db9c
commit baa67c408f
3 changed files with 33 additions and 33 deletions

View File

@ -1 +1,29 @@
# rough-edit # Rough Editor
It's a little program that I'm developing to help me make compilations a lot easier.
# How I want it to work
You feed the program an url of a Youtube playlist. It then downloads the subtitles for all of the videos. You can then say what phrase you want to splice (you can also search using regex).
It then downloads only nessesery files, though you can tell programm to download all of them if you want to do more compilations. You can tell what quality do you want to have - 720, 1080 or higher.
You can choose how much breathing room you want to leave; how much of the clip around the searched phrase you want ( if you want to give more context)
Program splices together the tracks and your rough edit is done. You don't need to watch hours of footage or search through subtitles to find what you want to include in the compilation.
# How it works at the moment
The Rough Editor contains a few loosely couples scripts.
* clean.sh cleanes up the files before running gen-script.py if you've run gen-script.py before.
* convert.sh converts the subtitles from .vtt to .srt, because only the latter is supported at the moment. I'm considering switching to .vtt or at the very least start supporting the format.
* download.sh download all of the subtites and then all of the .mp4 files
* gen-script.py generates a bash script which uses ffmpeg to edit out all of the clips where X says Y
* run.sh runs the scripts which were generated by gen-script.py
The program expect a certain structure of files at the moment.
# TODO
The program (I think expects files named 01.mp4, 02.mp4 etc)
Make the program run differenly if the files are .mp4 and .mkv
Support downloading only nessessary files. Will have to use a web script to generate a text file with a list of all of the videos in a Youtube playlist using web scriping with Python.
Add exception handling in gen-script.py

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# it converts the subs from .vtt to .srt # it converts subs from .vtt to .srt
for filename in ../subs/*; do for filename in ../subs/*; do
file="${filename%.*}"; file="${filename%.*}";

View File

@ -1,40 +1,12 @@
#!/bin/bash #!/bin/bash
# you give it an url, and it downloads videos, subs, converts them
# renaming should be done outside the program
#TODO make it so renaming is not nesseccary
# it should be easy to change a few things to make it possible
#also: add exception handling in gen-script.py
#TODO offtopic make it so that you only download nesseccary files.
# first the program downloads subs and converts them
# then you search for the words. if you are certain you want these parts,
# it then downloads only nesseccary videos. if you already have them downloaded,
# it doesnt download them again.
# to do this, I'll probably have to generate a file with a list of
# videos in the playlist and it couldnt find any information how to do this
# worst come to worst, I'll have to write a program myself in Python with
# web scraping
# https://www.youtube.com/playlist?list=PLFm1tTY1NA4eFO89sYmMDVghvH0m2wUmc
url=$1 url=$1
# download videos
cd ../original
youtube-dl -f 22 $url
#download subs #download subs
cd ../subs cd ../subs
youtube-dl --write-auto-sub --skip-download $url youtube-dl --write-auto-sub --skip-download $url
#convert the subs # download videos
for filename in *; do cd ../original
file="${filename%.*}"; youtube-dl -f 22 $url
in="${file}.vtt"
out="${file}.srt"
ffmpeg -i "${in}" "${out}"
done
#remove old subs
rm *vtt