-
-
Save c0ns0le/e8628da78b5fa258be7a0bdb2fb9f297 to your computer and use it in GitHub Desktop.
MyFreeCams on AppleTV
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 | |
ROOMID="$(curl -s $(echo "$1" | awk '{sub(/www/,"profiles"); sub(/#/,""); print $0}') | awk -F/ '/\/[0-9]{7,8}\//{print $6; exit}')" | |
if [ ${#ROOMID} -eq 7 ]; then | |
PREFIX="10"; else | |
PREFIX="1" | |
fi | |
MFCURL="http://video .myfreecams.com:1935/NxServer/mfc_$PREFIX$ROOMID.f4v_aac/playlist.m3u8" | |
for n in $(seq 340 492); do | |
STREAM=${MFCURL/ /$n} | |
if [ $(curl -s -Y1024 -y1 $STREAM | grep CODECS) ]; then | |
break | |
fi | |
done | |
echo $STREAM | |
ENCURL=$(curl -s -G -w %{url_effective} --data-urlencode $STREAM "" | awk '{print substr($0,3)}') | |
open "airflick://"; sleep 10; open "airflick://play-media?MediaLocation=$ENCURL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment