.. title: Linux, mplayer and the ZDF Mediathek .. slug: linux__mplayer_and_the_zdf_mediathek .. date: 2010-04-21 12:00:00 UTC+02:00 .. tags: linux, scripts, perl .. category: linux .. link: .. description: .. type: text While the idea behind the `ZDF Mediathek `_ is not so bad at all, the actual implementation is a pain in the ass - especially the flash version of the website, which causes my Firefox to crash again and again... So I tried the HTML version of the site, which has two major advantages: 1.) Firefox doesn't crash anymore and 2.) one can watch the videos with any external program like vlc or mplayer. However, there's still a huge drawback: The videos are streamed via the `Real-Time Streaming Protocol `_ or the `Microsoft Media Server Protocol `_, so basic operations like fast-forwarding, rewinding or pausing should be avoided. Additionally, as no (significant) buffering is performed, your internet connection will be in use for the whole runtime of a video, limiting other online activities. Looking for an easy solution for this, I checked mplayer's manpage and found the *-dumpstream* option. The rest was some elementary bash scripting: .. code-block:: bash mplayer -dumpfile "$(date +%y_%m_%d_%H_%M.dump)" -dumpstream "$(curl -s "$(curl -s "$LINK" | egrep "
  • DSL\s*2000\s*`_. **Update:** Seems like this only works for just a few videos, so don't be too disappointed if it fails...