some stuff

This commit is contained in:
2020-12-08 22:31:22 +01:00
parent 6337ee7229
commit 9a440a38d7
3 changed files with 19 additions and 2 deletions

13
delete_vidoes_without_sub.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
cd ../original
for f in *; do
if [ ! -f "../subs/${f%.*}.de.vtt" ]; then
rm "$f"
fi
done
cd ../subs/
for f in *; do
if [ ! -f "../original/${f%.*}.mp4" ]; then
rm "$f"
fi
done

View File

@ -5,8 +5,8 @@ mkdir ../original
#download subs
cd ../subs
youtube-dl --write-auto-sub --yes-playlist --skip-download -o '%(playlist_index)s.%(ext)s' $1
youtube-dl --write-auto-sub --sub-lang de --yes-playlist -i --skip-download -o '%(playlist_index)s.%(ext)s' $1
# download videos
cd ../original
youtube-dl -f 22 --yes-playlist -o '%(playlist_index)s.%(ext)s' $1
youtube-dl -f 22 --yes-playlist -i -o '%(playlist_index)s.%(ext)s' $1

4
render_video.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
cd ../out
find *.mp4 | sed 's:\ :\ :g'| sed 's/^/file /' > list.txt
ffmpeg -f concat -safe 0 -segment_time_metadata 1 -i list.txt -vf select=concatdec_select -af aselect=concatdec_select,aresample=async=1 final.mp4