Last active
August 31, 2016 11:41
-
-
Save ehudbaumatz/081cb8a5941de253d2c1ad5588174780 to your computer and use it in GitHub Desktop.
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/bash | |
mkdir extract | |
file=$1 | |
src=$2 | |
dst=$3 | |
echo processing $file | |
sudo aws s3 cp s3://aol-on-sandbox/$src/"$file" /home/ubuntu/"$file" | |
youtube-dl -i -f 'bestvideo[height=480]/best' -o 'extract/%(id)s.%(ext)s' --batch-file="$file" | |
tar -zcvf "$file".tar.gz extract | |
sudo aws s3 mv /home/ubuntu/"$file".tar.gz s3://aol-on-sandbox/$dst/"$file".tar.gz | |
rm -rf extract |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment