Upload youtube

This commit is contained in:
CoolnsX
2021-06-24 11:25:49 +05:30
parent f95f16a36f
commit 7ce17d9c6a

34
youtube.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/sh
full_video()
{
video=$1
printf "$video"
youtube-dl -f best "$video"
}
part_video()
{
video=$1
printf "Enter Starting Point(hh:mm:ss):"
read start
printf "Enter Duration:"
read dur
ffmpeg -i $(youtube-dl -f best --get-url "$video") -ss $start -t $dur $HOME/Videos/$(date +%s).mp4
}
printf "Input Youtube link :"
read x
printf "Download>>\n[f]Full video\n[p]Part of video"
printf "\nEnter choice:"
read choice
case $choice in
f)
full_video "$x";;
p)
part_video "$x";;
q)
break;;
esac