commit 36dbd6a75f3cae3af2a106050652ab3e65d09b35 Author: nochill Date: Fri May 5 14:26:12 2023 +0700 init diff --git a/out.mp4 b/out.mp4 new file mode 100644 index 0000000..e03d9f8 Binary files /dev/null and b/out.mp4 differ diff --git a/out.webm b/out.webm new file mode 100644 index 0000000..c819c01 Binary files /dev/null and b/out.webm differ diff --git a/yt-clip.sh b/yt-clip.sh new file mode 100755 index 0000000..f22cd56 --- /dev/null +++ b/yt-clip.sh @@ -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