Watching »Tatort« whenever you want

16Apr12

Tatort is a famous German crime scene which is running since 1970 and playing in Swiss, Austria and Germany. I did not find any subtitles for the newer series until now. (Since you know about subtitles (in English, German or French) I would appreciate some response though.) I am describing here how to download the current series fom the stream. The stream is for non Germans just available via proxy servers.

As you have already probably heared: Whatever media you are receiving e.g. videos, pictures, music, sound or text. You will be able to copy it like using a cassette tape recorder, taking screenshots or using »CTRL + C«. It is sheer possible to do so. Nothing can stop us and them.

Accidentally while searching for some old series I found now a bash script I was searching for some time ago. It is working on linux and is downloading the movie very comfortable. For linux users it is nevertheless a workaround for the suboptimal flash player.

At first you will have to install rtmpdump and curl (your distribution includes them probably) on your system. The essential script can be used via typing

./tatort-dl.sh “http://www.ardmediathek.de/ard/servlet/content/3517136?documentId=10085922”

I am citing the content of the script file here, but you can download the file from the source, too and much easier.

#!/bin/bash
URL=$(echo -e “$1” | grep “^http”)
OUTFILE=$2

INTERACTIVE=yes
RTMPDUMP=rtmpdump
RTMPDUMPOPTS=””
#RTMPDUMPOPTS+=” –live”
#RTMPDUMPOPTS+=” –resume”
#RTMPDUMPOPTS+=” –quiet”

if test -z “$URL” ; then
echo -e “Error: missing or invalid parameters\n\nUsage:\n $0 <ARDmediathek-URL> [out-file]\nThe deafult out-file name is ./format<ard-uid>.f4v\n\nExample:\n $0 \”http://www.ardmediathek.de/ard/servlet/content/3517136?documentId=3701294\”\n” >&2;
exit 1
fi

echo -en “curl \”$URL\” ..”
RTMPURLS=$(curl -s “$URL” | grep -i rtmp)

if test -z “$RTMPURLS” ; then
echo  -e “\nError: no ‘rtmp://’ URLs were found on the given Page.\n”
exit 1;
fi

COUNT=$(echo -e “$RTMPURLS” | wc -l)
echo -e ” ..found $COUNT RTMP URL(s).”

urldecode(){
echo -e “$(sed ‘y/+/ /; s/%/\\x/g’)”
}

FLASH=$(echo “$RTMPURLS” | grep flashvars | tail -n1)
if test -n “$FLASH”; then

RTMPURL=$(echo -ne “$FLASH” \
| sed ‘s/^.*streamer=\([^&]*\)&.*$/\1/g’ \
| urldecode)
PLAYPATH=$(echo -ne “$FLASH” \
| sed ‘s/^.*file=\([^&]*\)&.*$/\1/g’ \
| urldecode)
#echo “RTMP: $RTMPURL”
#echo “FILE: $PLAYPATH”

else

# try high-qualty first
PARAM=$(echo “$RTMPURLS” | grep Web-L)
# fall-back to medium-qualty
if test -z “$PARAM”; then
PARAM=$(echo “$RTMPURLS” | grep Web-M)
fi
# 2nd fall-back: use any rtmp URL
if test -z “$PARAM”; then
PARAM=$(echo “$RTMPURLS” | tail -n 1 )
fi

RTMPURL=$(echo -ne “$PARAM” | sed ‘s/^.*”\(rtmp[t]*:[^”]*\)”,.*$/\1/g’)
PLAYPATH=$(echo -ne “$PARAM” | sed ‘s/^.*”\(mp4:[^”]*\)”).*$/\1/g’)
fi

test -z “$RTMPURL” && RTMPURL=”rtmp://vod.daserste.de/ardfs/”

if test -z “$OUTFILE”; then
OUTFILE=$(echo -ne “$PLAYPATH” | sed ‘s/^mp4:.*\/\([^\/?]*\)\?.*$/\1/g’)
OUTFILE=$(echo -ne “$OUTFILE” \
| sed ‘s/^.*\///g’ \
| sed ‘s/\?.*$//g’ \
| sed ‘s/mp4://g’ \
| sed ‘s/\.f4v$//’ \
| sed ‘s/\.flv$//’\
)
OUTFILE=”${OUTFILE}.flv”
fi

echo
echo “Parameters:”
echo ” RTMP-URL : $RTMPURL”
echo ” Playpath : $PLAYPATH”
echo ” Saving to: $OUTFILE”
echo -n ” PWD      : ”
pwd
echo

if test -z “$PLAYPATH -o -z “$OUTFILE ; then
echo “Error: empty playpath or blank output filename.”
exit 1
fi

if test -e “$OUTFILE”; then
echo “WARNING: output file “$OUTFILE” exists.”
if test -n “$INTERACTIVE”; then
echo -n “[A]bort/[d]elete it/[r]esume? [A/d/r]? ”
read -n 1 VAL
echo
if test “$VAL” == “d”; then
rm -i “$OUTFILE”;
elif test “$VAL” == “r”; then
RTMPDUMPOPTS+=” –resume”
else
exit;
fi
else # NON-INTERACTIVE
echo “Error: file exists. bailing out.”
exit
fi
fi

if test -n “$INTERACTIVE”; then
echo “rtmpdump command-line:”
echo ” #$RTMPDUMP $RTMPDUMPOPTS -o \”$OUTFILE\” –playpath \”$PLAYPATH\” -r $RTMPURL”
echo

echo -n ” Start Download ? [Y/n] ”
read -n 1 VAL
echo
if test “$VAL” == “n” -o “$VAL” == “N”;  then
exit;
fi
fi

$RTMPDUMP $RTMPDUMPOPTS -o “$OUTFILE” –playpath “$PLAYPATH” -r $RTMPURL

echo
ls -l “$OUTFILE”

Just save the content in a file called »tatort-dl.sh« and make it executeable.

Since you do not want to use the script you can also use JDownloader instead.

And voilà, you are able to watch the series whenever you want.

References:

http://rg42.org/wiki/tatort-dl

http://jdownloader.org/

http://de.wikipedia.org/wiki/Liste_der_Tatort-Folgen

http://serienjunkies.org/

Advertisements


No Responses Yet to “Watching »Tatort« whenever you want”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: