Skip to content

Instantly share code, notes, and snippets.

@paiv
Last active March 18, 2016 07:40
Show Gist options
  • Save paiv/8d08144186d33737f1df to your computer and use it in GitHub Desktop.
Save paiv/8d08144186d33737f1df to your computer and use it in GitHub Desktop.
Coursera ML: download lectures and fix audio volume
#!/bin/bash
set -e
mkdir -p "source"
curl -RL# "https://class.coursera.org/ml-005/lecture/download.mp4?lecture_id=[1-114]" -o "source/lecture#1.mp4"
rm "source/lecture94.mp4"
mkdir -p "fixed"
for f in "source/"*
do
name="${f##*/}"
echo "processing $f"
ffmpeg -y -v error -i "$f" -vcodec copy -af "compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0" -strict -2 "fixed/$name"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment