Skip to content

Instantly share code, notes, and snippets.

@harrisony
Created July 13, 2017 03:52
Show Gist options
  • Save harrisony/cd73c0d9473b80a40b9303393d069ace to your computer and use it in GitHub Desktop.
Save harrisony/cd73c0d9473b80a40b9303393d069ace to your computer and use it in GitHub Desktop.
Make Lecture Recordings Great Again
#!/bin/sh
filename=$(basename $1)
FNAME="${filename%.*}"
NAME="$(/usr/local/Cellar/coreutils/8.27/bin/greadlink -f $FNAME)"
echo $NAME
ffmpeg -i "$NAME.mp4" "$NAME.wav"
## http://www.conversationsnetwork.org/levelator
/Applications/Levelator.app/Contents/MacOS/Levelator "$NAME.wav"
ffmpeg -i "$NAME.mp4" -i "$NAME.output.wav" -map 0:0 -map 1:0 -map 0:1 -c:v copy -c:a:1 copy -c:a:0 mp3 "$NAME.mkv"
rm "$NAME.output.wav" "$NAME.wav"
echo "Complete: $NAME.mp4"
.section.presentations.pageContents[] | {title: .startTime, week: .week, url: "http://delivery.streaming.edu:1935/echo/_definst_/\( .thumbnails[0] | capture("https://delivery.streaming.edu/echo/(?<datecode>[0-9]+[0-9]+/[0-9])").datecode)/\(.uuid)/mp4:audio-vga-streamable.m4v/playlist.m3u8"} | "ffmpeg -i '\(.url)' -bsf:a aac_adtstoasc -acodec copy -c copy week-\(.week)-\(.title | scan("[0-9]{4}-[0-9]{2}-[0-9]{2}")).mp4"
#!/bin/sh
## Assumes you're running something along the lines of polipo diskCacheRoot='~/polipo-cache/'
http_proxy="http://127.0.0.1:8123" ffmpeg -i "$1" -acodec copy -vcodec copy -bsf:a aac_adtstoasc "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment