aboutsummaryrefslogtreecommitdiff
path: root/index.html
blob: 1c16be6aad5edf089bb74f9ad723cc87329819a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<pre>&gt; watch [/c &lt;argument-string&gt;] &lt;video/playlist-url&gt;<br/></pre>
<p>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.<br/>
</p>
<p>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, <i>View &gt; Video Frame &gt; Touch
    Window From Outside</i>). 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, <a
    href="../plain/comparison.png?h=readme">see this comparison</a>
  between YouTube and invidio.us, an alternative YouTube
  front&nbsp;end.)</p>
<p>The program can be started from the command prompt or the <i>Run...</i>
  window. I recommend putting it somewhere in your PATH. Then, you
  can easily watch videos by copying the URL, opening a <i>Run...</i>
  window with Win-R and issuing <tt>watch &lt;url&gt;</tt>. 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.</p>
<p>If you supply an <i>argument-string</i> using the <tt>/c</tt>
  option, it will be copied verbatim directly to the youtube-dl
  command line, letting you specify extra parameters for the process
  (for example, <tt>/c "-f best"</tt>).</p>
<p>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.</p>
<p><b>Dependencies:</b> <a
    href="http://ytdl-org.github.io/youtube-dl/">youtube-dl</a>, <a
    href="https://mpc-hc.org/">MPC-HC</a>, 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 <tt>youtube-dl
    -U</tt> from a command prompt.</p>
<h3>Bookmarklet</h3>
<p>To make a bookmarklet that opens a YouTube video from your
  browser in MPC-HC, you need to download the files <i>watch.exe</i>,
  <i>watch.reg</i> and <i>watch.js</i> from the repository.<br/>
</p>
<ol>
  <li>
    <p>Install <i>watch.exe</i> as <tt>C:\watch.exe</tt>.</p>
  </li>
  <li>
    <p>Register the <i>watch:</i> protocol handler in the registry
      by downloading and running <i>watch.reg</i>.</p>
  </li>
  <li>
    <p>Copy the contents of <i>watch.js</i> to a bookmark in your
      web browser. It supports the following features:</p>
  </li>
  <ol>
    <li>Single-click the bookmark to convert all links on the page
      to <i>watch:</i> links.<br/>
    </li>
    <li>Single-click it again to revert the links. (This also
      happens automatically when you click a link.)</li>
    <li>Double-click the bookmark to open the current page as a <i>watch:</i>
      link.</li>
  </ol>
</ol>