Skip to content

Instantly share code, notes, and snippets.

@rmoriz
Created February 8, 2016 23:44
Show Gist options
  • Save rmoriz/3d1633c57b21260d75c4 to your computer and use it in GitHub Desktop.
Save rmoriz/3d1633c57b21260d75c4 to your computer and use it in GitHub Desktop.
converts AC3 to mp3, uploads to VLC on iPad (http sharing needs to be enabeld)
#
# $ convert_and_send_to_ipad Billions.S01E04.720p.HDTV.x264-AVS.mkv
# ...
ac3mp3() {
file=$@
pre=${file:r}
ext=${file:e}
ffmpeg -i ${file} -acodec mp3 -vcodec copy ${pre}-ipad.${ext}
echo ${pre}-ipad.${ext}
}
send_to_ipad() {
curl --progress-bar -# -F file=@"$@" http://10.0.2.40/upload.json >/dev/null
}
convert_and_send_to_ipad() {
file=$(ac3mp3 $@)
send_to_ipad $file
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment