|streaming in mpc-hc via youtube-dl|
> watch [-c <argument-string>] <video/playlist-url>
This program takes a YouTube video/playlist URL as an argument and opens
the video/playlist in MPC-HC. The videos are streamed, not downloaded and then played.
There are downloadable builds of MPC-HC with built-in support for
YouTube streaming, but these unfortunately do not support Windows
XP. My program works on any operating system that can run youtube-dl.
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 program 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 <url>. A command prompt will be visible as the program retrieves the addresses for the audio and video streams, but will be closed once MPC-HC is launched.
If you supply an argument-string using the -c option, it will be copied verbatim directly to the youtube-dl command line, letting you specify extra parameters for the process.
If you want to interrupt the retrieval process (e.g., if there are a hundred videos in the playlist and you just want to stream the first five), press Ctrl-Break. This will open MPC-HC with the videos that have been retrieved so far. If you want to interrupt the process without launching MPC-HC, press Ctrl-C.
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, MPC-HC, the first of which must be placed somewhere in your PATH. Note that youtube-dl needs to be updated regularly; if the script stops working, then issue youtube-dl -U from a command prompt.