<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Murnong 2.43</TITLE>
<style type="text/css"><!--
body {text-align:justify}
h2 {text-align:center}
h3 {padding-top:2ex}
li {padding-bottom:2ex}
li.nopad {padding-bottom:0}
//-->
</style>
</HEAD><BODY bgcolor=white>
<table align=center border=0><tr valign=middle>
<td><img src="murnong" width=34 height=34 /></td>
<td align=center><H1>Murnong</H1><H3 style="padding-top:0">Version 2.43 (01 Oct 2017)</H3></td>
<td><img src="murnong" width=34 height=34 /></td>
</tr></table>

<p><br /></p>

<p>Given a webpage saved from the <a href="http://www.youtube.com/">YouTube</a>&trade; website, Murnong calculates a URL to
the embedded video and launches <a href="http://www.gnu.org/software/wget/">Wget</a> to fetch it. The downloaded video can be
<a href="http://www.users.on.net/~belles/software/ffmpeg/">played with FFplay or converted with FFmpeg</a>.
(Note: the !FFPlay app available at this URL is stable but old and cannot accept streams from Murnong.)</p>

<p>&quot;Murnong&quot; is an Aboriginal name for an Australian native plant also known as &quot;Yam Daisy&quot;. Once common
across a widespread region of southern Australia, its tuber was a valuable food source for Aborigines. But the wholesale
introduction of exotic grazing animals led to its near extinction. It is still endangered.</p>

<hr />

<h2 style="margin-bottom:0"><a name="Contents">Contents</a></h2>
<table align=center border=0 cellpadding=0 cellspacing=0><tr align=center>
<td><a href="#Requirements"><h3>Requirements</h3></a></td>
<td width=20></td>
<td><a href="#Download"><h3>Download</h3></a></td>
<td width=20></td>
<td><a href="#Operation"><h3>Operation</h3></a></td>
<td width=20></td>
<td><a href="#Customisation"><h3>Customisation</h3></a></td>
<td width=20></td>
<td><a href="#Caveats"><h3>Caveats</h3></a></td>
<td width=20></td>
<td><a href="#Licence"><h3>Licence</h3></a></td>
</tr></table>

<hr />

<h2><a name="Requirements">Requirements</a></h2>

<p>Any machine running RISC&nbsp;OS&nbsp;3.50 or later, with at least 2&nbsp;MB of free RAM, can run Murnong to fetch videos from
the YouTube&trade; website via Wget or a web browser. A detailed list of requirements follows with links to software current at time of writing:</p>

<ul compact>

<li>The <b>DDEUtils</b> module is <strong>essential</strong>. If your machine doesn't already have it, a suitable version can be obtained through
<a href="http://www.riscosopen.org/content/downloads/other-zipfiles"><code>http://www.riscosopen.org/content/downloads/other-zipfiles</code></a>
in the &quot;System resources&quot; archive (for pre-RISC&nbsp;OS 5 machines) or a &quot;HardDisc4&quot; archive (for RISC&nbsp;OS 5 machines).</li>

<li><b>Wget version 1.13 or greater.</b> This must be runnable as a *command; that is, either by <code>Run:wget</code> or by
<code>&lt;Alias$wget&gt;</code>. A !Wget application can be obtained through
<a href="http://www.riscos.info/packages/NetworkDetails.html"><code>http://www.riscos.info/packages/NetworkDetails.html</code></a>.
Wget must be used if you want to obtain information about a video prior to fetching it.</li>

<li><b>!FFmpeg/!FFplay release 2.00 or later</b> to convert/play the video. This application can be obtained through
<a href="http://www.users.on.net/~belles/software/ffmpeg/"><code>http://www.users.on.net/~belles/software/ffmpeg/</code></a>.
Previously, Murnong could automatically convert YouTube videos to MPEG. But recent enhancements to the YouTube system mean
that conversion is no longer a simple matter, so Murnong is now dedicated to fetching videos. To convert or play them, use FFmpeg or FFplay.
Contact the author if you would like to try an alpha-quality FFplay which can play streams directly from Murnong.</li>

<li><b>!KinoAmp</b> to play converted video. This application can be obtained through
<a href="http://users.skynet.be/Andre.Timmermans/image/kinoamp/kinoamp.htm"><code>http://users.skynet.be/Andre.Timmermans/image/kinoamp/kinoamp.htm</code></a>.</li>

</ul>

<p>Bundled inside !Murnong is <a href="http://www.sbellon.de/sw-modules.html">Stefan Bellon</a>'s RegEx 1.06 module. If you
have the same module or a newer version in <code>System:Modules</code>, that one will be loaded in preference. Documentation
for the bundled RegEx module can be found in a subfolder beneath folder <a href="../Documents"><code>!Murnong.Documents</code></a>.</p>

<p><center><a href="#Contents">[Contents]</a></center></p><hr />

<h2><a name="Download">Download</a></h2>

<p>Download the !Murnong application from
<a href="http://www.users.on.net/~belles/software/murnong/">&lt;http://www.users.on.net/~belles/software/murnong/&gt;</a>.</p>

<p><center><a href="#Contents">[Contents]</a></center></p><hr />

<h2><a name="Operation">Operation</a></h2>

<h3>Before running Murnong for the first time</h3>

<p>I recommend ensuring the following lines (or something similar) are in the file
<a href="file:///InetDBase:MimeMap"><code>InetDBase:MimeMap</code></a> on your system.</p>

<blockquote><pre style="border:thin dashed black">
video/mp4       MPEG    bf8     .mp4
video/x-flv     AVI     fb2     .flv
</pre></blockquote>

<p>Folder <code>!Boot.Resources.!Internet.files</code> is the likely location of the <code>MimeMap</code> file.
Having the above lines in this file may help Wget and web browsers to give fetched videos an appropriate filetype.</p>

<p>After editing <code>MimeMap</code>, you may need to execute the command <code>*ReadMimeMap</code>
to make your system take immediate notice of your edits.</p>

<h3>The iconbar</h3>

<p>Running !Murnong places this icon on the iconbar: &nbsp;<img src="murnong" width=34 height=34 /></p>

<p>The icon has a menu with the usual items, plus a tickable item &quot;Save to CSD&quot;. If you tick &quot;Save to
CSD&quot;, then the Fetch window (discussed below) may not need you to specify a folder to save into. &quot;Save to CSD&quot;
causes videos and webpages downloaded by Wget to be saved into the currently selected directory (as set by the
<code>*Dir</code> command, for example).</p>

<p>Murnong remembers information from the last file processed during the current session.
Click on Murnong's iconbar icon to re-open the Fetch window.</p>

<h3>The Fetch window</h3>

<p><img src="fetchurl" width=159 height=278 align=right />
YouTube publishes webpages that load browser plug-ins that in turn load players that in turn stream videos. But
because RISC&nbsp;OS is not presently supported by this scheme, Murnong will examine such a webpage and try to calculate the
URL of the video file itself. So, the process of using Murnong begins with a YouTube webpage. You might prefer to use a web
browser to search YouTube's website. When you find the webpage of a video (assuming the video is available) you can save the
webpage as filetype HTML (&amp;FAF) directly onto Murnong's iconbar icon or Fetch window. Saving onto the iconbar icon will
automatically open the Fetch window.</p>

<p>As a convenience, you can also drop the URL of a YouTube webpage onto Murnong's iconbar icon or Fetch window as filetype URL, URI or Text
(&amp;B28, &amp;F91 or &amp;FFF respectively) and Murnong will use Wget to download the webpage for you. This may not always work because
there are many forms that YouTube URLs can take these days, but Murnong will do its best to make sense of the URL and identify the video's
11-character keycode. If successful, the Fetch window will open showing the keycode of the video and a HTML file icon. On dragging the HTML
icon to a folder, or simply pressing Enter when Save-to-CSD is enabled, Murnong will launch Wget to download the webpage and save it to disk.</p>

<p>Note that after a YouTube webpage has been fetched, the linked video will be available for a limited time.</p>

<h4>Fetching video from a webpage</h4>
<p><img src="fetchvid" width=159 height=278 align=right />
Dropping a webpage from YouTube (filetype HTML or &amp;FAF) onto Murnong will open the Fetch window with
the video's title and an AVI file icon displayed in the lower section. The caret will be at the end of the writeable icon
containing the video's title. A list of the available formats (albeit somewhat cryptic) is displayed in the upper section.
Click on a format to select it. Highest quality is likely to be first on the list, lowest quality last.</p>

<p>Unfortunately, medium- and high-quality formats may not playback at all well.
Small FLV videos playback well on an Iyonix or faster machine with FFplay. All formats can be converted by FFmpeg
(if you have the patience) and FFplay may be able to manage keyframes-only playback in real-time.</p>

<p>With the format selected, there are four different actions which can be performed on the video.</p>

<p>The default action &quot;<b>Save&nbsp;by&nbsp;Wget</b>&quot; will launch Wget to download the video and save it to disk.
This action can be invoked by pressing Enter when Save-to-CSD is enabled. The saved video file will be named according to the
title displayed in the writeable icon. (Note that some titles will need editing to make a permissible file name.) This action
can also be invoked by dragging the AVI icon to a folder. Wget will run in a taskwindow so you can watch the download's
progress.</p>

<p>Clicking &quot;<b>Fetch&nbsp;Metadata</b>&quot; will also launch Wget in a taskwindow but simply to display information
(specifically, the HTTP headers) about the format selected. The most useful information (eg. size of the video file in bytes,
mime type, date of last modification) will appear at the end of the taskwindow. You might use this information in order to
decide whether to select another format or fetch the video at all. <strong>Alternatively, you may find out that the video
is <em>forbidden</em> to you</strong> due to advertising or digital rights management.</p>

<p>Clicking &quot;<b>Save&nbsp;by&nbsp;Browser</b>&quot; will use the AcornURI module to pass on the job of fetching the
video to a web browser. A suitable browser <strong>must</strong> already be running. (This is because YouTube URLs are too
long for some parts of RISC&nbsp;OS to handle.) You will need to use your browser's &quot;Save As&quot; facilities. Note that
Murnong cannot pass on the video's title/filename from the writeable icon to the browser. This action will be useful if you
don't have Wget, or want the video fetched faster than Wget will do, or if a suitable browser-based player is
developed.</p>

<p>Clicking &quot;<b>Stream&nbsp;to&nbsp;FFplay</b>&quot; will attempt to launch FFplay to play the video immediately by streaming (as
opposed to download now, play later). This is more in tune with YouTube's <a href="http://www.youtube.com/t/terms">Terms of Service</a>
because the video data is not being saved to disk. If you want to watch the video again, you must fetch it again.
A recent alpha-quality version of the <code>!FFplay</code> application <strong>must</strong> have been booted by the Filer, but it need not be running.
Note that it can take many seconds for a playback window to appear.
The video may not play at all on the first attempt; FFplay may time-out while waiting for YouTube to respond.
If the button resets but the video does not appear, and you have obtained a recent (alpha-quality) build of FFplay from the author, try the action a second time.
If the video still does not appear, fetch metadata to see if the video is actually available.
If it is available but will not stream, you can download it to play later.</p>

<p><center><a href="#Contents">[Contents]</a></center></p><hr />

<h2><a name="Customisation">Customisation</a></h2>

<p>If you need Wget to access the web through a proxy server, or otherwise change the way Wget operates, you can do this by
editing the TaskObey files <a href="../!Download"><code>!Murnong.!Download</code></a> and <a href="../!Metadata"><code>!Murnong.!Metadata</code></a>.
Suffice to say, you don't need to edit any BASIC code to make !Murnong work with a proxy server; just add any necessary
parameters and variables into these two TaskObey files. But be careful not to accidentally change other parameters.</p>

<p>Likewise, the way Murnong uses FFplay can also be customised to an extent by editing the Obey file <a href="../!Stream"><code>!Murnong.!Stream</code></a>.
Again, be careful not to accidentally change parameters.</p>

<p>Explaining the intricacies of Wget and FFplay operation is beyond this document. See your Wget and FFplay packages' documentation.</p>

<p><center><a href="#Contents">[Contents]</a></center></p><hr />

<h2><a name="Caveats">Caveats</a></h2>

<p>Murnong depends upon the internal workings and implicit norms of YouTube webpages. It is quite likely that any
changes to the YouTube website organisation will cause Murnong to stop working. Therefore, you should consider Murnong to be a
perpetual work-in-progress.</p>

<p>Murnong does not attempt to circumvent YouTube access controls, region controls or DRM. If a video is deemed forbidden to you,
Murnong cannot fetch it. Videos that would otherwise be delivered with advertising material may also be inaccessible.</p>

<p>Murnong was developed and released independently of YouTube. It is not intended to infringe the rights of YouTube nor its Users.
Nor is Murnong intended to hinder YouTube in conducting its business. This application is merely intended to narrow the gap between
RISC&nbsp;OS and other operating systems with regard to the capability of viewing content freely provided by YouTube. However, it may
be possible that in using Murnong you breach clauses <b>4.3</b> and <b>5.2</b> of the YouTube
<a href="http://www.youtube.com/t/terms">Terms of Service</a> (as last checked on 31 May 2015).
If you breach YouTube's Terms of Service, the responsibility is entirely yours.</p>

<p><center><a href="#Contents">[Contents]</a></center></p><hr />

<h2><a name="Licence">Licence</a></h2>

<p>!Murnong is Copyright (&copy;) 2008-2017 Christopher Martin. All rights reserved.
You may contact the author as &lt;iam chris martin at internode on net&gt;.
(Insert dots and the &quot;at&quot; symbol as seems appropriate, if indeed you are a human being.)</p>


<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

<p><center><a href="#Contents">[Contents]</a></center></p>
</BODY></HTML>