This script takes a YouTube video URL as an argument and opens the video in MPC-HC. The video is streamed and not downloaded. There are downloadable builds of MPC-HC with built-in support for YouTube streaming, but these unfortunately do not support Windows XP. This script works on any operating system that can run its dependencies.
The benefits of playing YouTube videos in a real media player are many. If you have a non-widescreen monitor, you can zoom in to remove black bars (in MPC-HC, View > Video Frame > Touch Window From Outside). You can fix potential audio-video sync issues in the video. Most importantly, you don’t have to waste as much memory on displaying YouTube’s video page. (To get an idea of how much memory YouTube uses, see this comparison between YouTube and invidio.us, an alternative YouTube front end.)
The script can be started from the command prompt or the Run… window. I recommend putting it somewhere in your PATH. Then, you can easily watch videos by copying the URL, opening a Run... window with Win-R and issuing watch [video-url]. A command prompt will be visible as the script retrieves the addresses for the audio and video streams, but will be closed once MPC-HC is launched.
Tip: I’ve also made a bookmarklet that lets you YouTube links in MPC-HC directly from your browser. You can get it here.
Dependencies: youtube-dl, jq, MPC-HC. The first two need to placed somewhere in your PATH, unless you modify the script. Note that youtube-dl needs to be updated regularly; if the script stops working, then issue youtube-dl -U from a command prompt.