mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
Nothing to see here, move along
This commit is contained in:
24
youtube
24
youtube
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#!/bin/sh
|
||||
# script for downloading videos/audios from sites...
|
||||
# defining shell colors for distinction
|
||||
@@ -11,12 +9,12 @@ c_magenta="\033[1;35m"
|
||||
c_cyan="\033[1;36m"
|
||||
c_reset="\033[0m"
|
||||
|
||||
part(){
|
||||
printf "${c_magenta}Enter Starting Point(hh:mm:ss)or(mm:ss)${c_reset}:"
|
||||
read start
|
||||
printf "${c_yellow}Enter Upto Seconds:${c_cyan}"
|
||||
read dur
|
||||
ffmpeg -loglevel error -stats -i $(yt-dlp -f "$3" --get-url "$1") -ss $start -t $dur /sdcard/$(date +%s).$2
|
||||
part() {
|
||||
printf "${c_magenta}Enter Starting Point(hh:mm:ss)or(mm:ss)${c_reset}:"
|
||||
read start
|
||||
printf "${c_yellow}Enter Upto Seconds:${c_cyan}"
|
||||
read dur
|
||||
ffmpeg -loglevel error -stats -i $(yt-dlp -f "$3" --get-url "$1") -ss $start -t $dur /sdcard/$(date +%s).$2
|
||||
}
|
||||
|
||||
#program starts from here..
|
||||
@@ -27,9 +25,9 @@ printf "${c_yellow}Download>>\n${c_blue}[a]Audio only\n${c_magenta}[f]part of Au
|
||||
printf "\n${c_reset}Enter choice:${c_green}"
|
||||
read choice
|
||||
case $choice in
|
||||
a) yt-dlp -f 'ba' -x --audio-format mp3 "$x" -o "/sdcard/%(title)s.%(ext)s" && termux-notification -c "audio downloaded";;
|
||||
f) part "$x" "mp3" "ba" && termux-notification -c "audio downloaded";;
|
||||
v) yt-dlp "$x" -o "/sdcard/%(title)s.%(ext)s" && termux-notification -c "video downloaded";;
|
||||
p) part "$x" "mp4" "b" && termux-notification -c "video downloaded";;
|
||||
q) exit 0;;
|
||||
a) yt-dlp -f 'ba' -x --audio-format mp3 "$x" -o "/sdcard/%(title)s.%(ext)s" && termux-notification -c "audio downloaded" ;;
|
||||
f) part "$x" "mp3" "ba" && termux-notification -c "audio downloaded" ;;
|
||||
v) yt-dlp "$x" -o "/sdcard/%(title)s.%(ext)s" && termux-notification -c "video downloaded" ;;
|
||||
p) part "$x" "mp4" "b" && termux-notification -c "video downloaded" ;;
|
||||
q) exit 0 ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user