Skip to content

Instantly share code, notes, and snippets.

@ehudbaumatz
Last active August 31, 2016 11:41
Show Gist options
  • Save ehudbaumatz/081cb8a5941de253d2c1ad5588174780 to your computer and use it in GitHub Desktop.
Save ehudbaumatz/081cb8a5941de253d2c1ad5588174780 to your computer and use it in GitHub Desktop.
#!/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