This commit is contained in:
nochill 2023-05-05 14:26:12 +07:00
commit 36dbd6a75f
3 changed files with 9 additions and 0 deletions

BIN
out.mp4 Normal file

Binary file not shown.

BIN
out.webm Normal file

Binary file not shown.

9
yt-clip.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
#Arguments: URL, Time stamp -5 seconds, length of clip, video file name
readarray -t urls <<< "$(yt-dlp --youtube-skip-dash-manifest -g "$1")"
ffmpeg -ss $2 -i "${urls[0]}" -ss $2 -i "${urls[1]}" -ss 5 -map 0:v -map 1:a -t $3 $4
# mp4 format
# TODO: make conditional for video formatting
# ffmpeg -ss $2 -i "${urls[0]}" -ss $2 -i "${urls[1]}" -ss 5 -map 0:v -map 1:a -c:v libx264 -c:a aac -t $3 $4