Tuesday, July 3, 2012

How to watch YouTube videos using MUI-OWB on X1000

Today I want to detail an easy solution to viewing YouTube videos using MUI-OWB web browser on AmigaOne X1000 that works for most videos I have tested, as the below MUI-OWB screenshot shows working well:


This solution can also display these videos in Full Screen!

Update 5/05/2013: JavaScript update has now fixed YouTube links and these instructions now work again!
First, some explanation about this YouTube issue on the X1000 and recent developments.

YouTube videos do not work on the X1000 using MUI-OWB, OWB, Timberwolf or iBrowse. This is because there is no Adobe Flash support on AmigaOS4 web browsers and YouTube uses Adobe Flash (FLV) to playback most video content on it's website. This also stops playback of Flash content on other websites too. Adobe Flash is proprietary software and Adobe does not support AmigaOS4 so this situation is unlikely to be fixed in the future.

Fortunately for us, current Apple iOS devices such as iPad and iPhone do not support Adobe Flash either. Due to their widespread global popularity YouTube has had to find a solution using HTML5 instead of Flash, to enable non-Flash browsers and Operating Systems to view their video content - which in turn can in the future benefit AmigaOS users using HTML5 enabled web browsers like Timberwolf as well!

To this end YouTube has a new beta HTML5 program in progress which you can opt-in at http://youtube.com/html5 . If you are running Timberwolf Beta 4 web browser (available on OS4depot.net) and using this opt-in HTML5 mode in YouTube, it is possible to view a few videos on YouTube using Timberwolf (as per the Timberwolf screenshot below), but in my testing of the small range of videos that did work, they were unbearably slow, audio was choppy, etc. Clearly this needs more work before it can be usable on the X1000:


Most YouTube videos in Timberwolf Beta 4 in my testing get this next result which means it is not a solution we can currently use for general use of YouTube on the X1000:



So having exhausted this possibility as not yet ready for prime time, we now look to MUI-OWB web browser for the solution to watch YouTube videos!

As regular readers would know, I run the MUI-OWB web browser on the X1000 (available on OS4Depot.net) and it works fantastic for most things, but not for YouTube videos. You can see what happens when trying to play a YouTube video in MUI-OWB in the screenshot below:



So now I will show you what you need to do to get YouTube videos to play using MUI-OWB!

Please note that I am aware of other solutions such as getvideo (using wget, etc), clipdown, tubexx, etc, but all of them are painful to setup and I found the method I am showing below much easier to do and much closer to the YouTube experience people expect when using it on PC or Mac, etc..

To do this setup for YouTube you will need the following programs (if you don't have them already):

In my case, I extracted MUI-OWB to System:internet/muiowb , MUI-Mplayer to System:utilities/mplayer and I put the YouTube.js & YouTube_EZDownload.js file in the System:internet/muiowb/scripts folder. (if you previously put YouTube.js into the main muiowb folder, just overwrite with the newer file.

So now we have some configuration work to do. Let's get started!

Now, in a previous blog entry here I detailed how to configure MUI-Mplayer to playback videos on X1000. This works well when using the GUI mode of Mplayer, but does not work when using MPlayer through the command line which is what is needed for this. We also need additional optimisations for streaming YouTube internet video content using Mplayer. MPlayer uses two separate config files, one for GUI mode (gui.conf), and one (config) for the default options when run on the command line.

So first of all, let's configure Mplayer default options as follows. Navigate to the System:Utilities/Mplayer/Altivec folder (or wherever you put MPlayer). Then change the view of the folder to show all files. You should then see a hidden conf folder which you need to go into. In this folder is a file called config which we need to edit using Notepad (or similar). Modify until it looks the same as the below screenshot (click to expand if you need):


Ok, with that done, we need to do some configuration work in MUI-OWB. So next, run MUI-OWB. Once loaded, right click on the top menu and go into the Settings Menu and select the Preferences option.

In the Settings window that appears we need to select Mime Types on the list on the left side. Then click on Add to add a new entry. We need to enter information for the MP4 video Mime Type to launch MPlayer from MUI-OWB. Basically, to do this the contents of the new entry should match the screenshot below. Click in each greyed out field to modify it's contents. Please take note to press enter at the end of entering text in each field to make sure the data is kept before moving to the next field:


If the new video/mp4 entry looks like the above screenshot, then click on Save.

22/9/2012 Update NOTE: With recent YouTube url changes you need to modify the %l parameter in the screenshot above to be "%l" (with the quotes) or it doesn't work.

Ok, now we need to add the YouTube.js script into MUI-OWB. What this script does is to provide a extra option list below YouTube videos when visting the YouTube website to allow us to display videos in HTML5 (which doesn't work in MUI-OWB yet) or to Download (Stream) the content to our computer which will work.

To add the YouTube.js script in MUI-OWB, right click on the top menu and highlight the Windows Menu and click on the Scripts... option. You should then see this window:


Click on the Add button, which should then give you a window (like below) to locate the YouTube.js file, and either double click on the file, or click once to highlight it and then click on OK.



You should then see the YouTube HTML5 converter script showing in the Scripts window as per the screenshot below. Make sure the Enable option box is ticked, and then click on the close gadget to finish this step:



Ok, so now we can browse to YouTube.com and try this out. I search for Top Gear Lamborghini Aventador for my first test (Cool car!). When you click to play the video, you should see something similar to the below screenshot:


YouTube.js script now adds a Download section and View without Flash section below the video with some various numbers as links to click. In our case we have only configured Option 18 (Mp4) under the Download section. If you click on the Option 18 in the download section, you will see the YouTube video running in a window with a Shell window hidden behind it! With the configuration I used, please only use Option 18 to play videos in MUI-OWB. 

Note: View without Flash section is used for HTML5 video playback within the YouTube website, which MUI-OWB cannot do as yet as it doesn't support HTML5.

If you are interested, the shell window that appears is the OWB Output Window when clicking Option 18 shows the output of the Mplayer command line we added to the Mimetypes earlier, which shows the details of the video being streamed and any problems, etc (as shown below):


For the sake of prettiness, I resize the OWB output shell window to minimum size and I move the YouTube video window to line up with the location of the video display on the YouTube website in MUI-OWB. It then looks like this:


You can also double click on the video to view it full screen, or double click while full screen to return to the window view. This works well enough for most videos I tested.

So I can now watch YouTube videos on my X1000! Finally!

As mentioned in another blog entry of my initial review of the X1000, I know that MPlayer cannot play back full HD video content as yet, so YouTube playback using standard MP4 video size (Option 18) is the way to go until the updated Graphics Drivers for the X1000 are released which should fix this and allow streaming of bigger resolutions.

Here are some other YouTube video examples I tested and confirmed play ok with no lag in video or audio (click to expand if you need):





I should mention that a small number of YouTube videos I tried had speeded up audio for some reason, but only a few videos seem to be affected by this. Not sure the reason for this though!

As a side note if you are interested in the Korean Pop videos I showed here (Recently I am enjoying listening and watching K-Pop music artists) you can view my K-Pop YouTube playlist here!

Perhaps in time I will work out how to setup the other video streaming file types in MUI-OWB to play other content but YouTube is the focus here!

I hope this information is of help to you in viewing YouTube videos on your X1000!

No comments:

Post a Comment