mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 15:25:20 +05:30
Upload youtube
This commit is contained in:
34
youtube.sh
Executable file
34
youtube.sh
Executable 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
|
||||
Reference in New Issue
Block a user