Last active
May 9, 2019 03:19
-
-
Save akiraaisha/58878fae0a89110733cd79e89be74773 to your computer and use it in GitHub Desktop.
Coub Downloader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
color=$(tput setaf 153) | |
color2=$(tput setaf 6) | |
set -e | |
yt -o 1.mp4 "$1" | |
yt -f html5-audio-high -o 1.mp3 "$1" | |
printf '\x00\x00' | dd of=1.mp4 bs=1 count=2 conv=notrunc | |
for i in `seq 1 $2`; do echo "file '1.mp4'" >> 1.txt; done | |
ffmpeg -nostats -loglevel error -y -hide_banner -f concat -i 1.txt -i 1.mp3 -c copy -shortest -movflags faststart "$3.mp4" | |
rm 1.mp4 1.mp3 1.txt | |
printf "$color2\nSuccess!!!\n${color}Time Duration: " | |
ffmpeg -i "$3.mp4" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,// | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment