Last active
August 29, 2015 14:11
-
-
Save jamjon3/ec4a1f692a7430c05985 to your computer and use it in GitHub Desktop.
Records a radio show. This show sometimes has video and sometimes doesn't. The Webm version is for ones that have video. The MKV version just adds a still with the audio. The audio is preserved as a MP3 incase it has to be manually clipped and merged with a still (otherwise, edit the webm version)
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 | |
NOW=$(date +"%b-%d-%y") | |
STREAM="mms://63.246.156.74/wtan" | |
WORKINGDIR="/home/user/Videos/" | |
FILENAME="${WORKINGDIR}revolutionary_road_radio_show_$NOW" | |
IMAGE="${WORKINGDIR}The Revolutionary Road/RevolutionStar.jpg" | |
DURATION="3600" | |
#cd $WORKINGDIR | |
rm -rf "${FILENAME}.wma" | |
rm -rf "${FILENAME}.mp3" | |
rm -rf "${FILENAME}.webm" | |
rm -rf "${FILENAME}.mkv" | |
cvlc --run-time=$DURATION $STREAM --sout "#duplicate{dst=std{access=file,mux=asf,dst=${FILENAME}.wma}" vlc://quit ; | |
pkill vlc | |
ffmpeg -i "${FILENAME}.wma" "${FILENAME}.mp3" | |
ffmpeg -i "${FILENAME}.wma" "${FILENAME}.webm" | |
ffmpeg -loop 1 -i "$IMAGE" -i "${FILENAME}.mp3" -shortest -c:v libx264 -c:a copy "${FILENAME}.mkv" | |
rm -rf "${FILENAME}.wma" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment