Skip to content

Instantly share code, notes, and snippets.

@geoffeg
Last active June 17, 2016 21:28
Show Gist options
  • Select an option

  • Save geoffeg/5dfe2254363c495dc16ee224fc7f9233 to your computer and use it in GitHub Desktop.

Select an option

Save geoffeg/5dfe2254363c495dc16ee224fc7f9233 to your computer and use it in GitHub Desktop.
#!/bin/sh
function get_stream_url {
local intermediate_url=`curl -s $1 | awk -F '=' '/File1/ { print \$2 }'`
local stream_url=`curl -L -I -o /dev/null -s -w %{url_effective} $intermediate_url`
echo "$stream_url"
}
read -p "Left channel URL [KSTL App]: " left;
read -p "Right channel URL [KSTL Tower]: " right;
left_stream=$(get_stream_url ${left:-http://www.liveatc.net/play/kstl_app.pls});
right_stream=$(get_stream_url ${right:-http://www.liveatc.net/play/kstl2_twr.pls});
ffmpeg -thread_queue_size 128 -i $left_stream -i $right_stream -filter_complex "[0:a][1:a]amerge=inputs=2[aout]" -map "[aout]" -f wav pipe: | play -q -t wav -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment