Wednesday, 4 July 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 2/04/2014: The latest Odyssey web browser can now display YouTube videos within the browser. Please see my latest blog entry here for more details. The information below is still relevant if using the older MUI-OWB web browser.

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!

19 comments:

  1. Awesome, thanks for the info.

    Anthony

    ReplyDelete
  2. Fantastic, thanks for that, been using getvideo on my sam460 but this seems a more elegant solution for now.

    ReplyDelete
  3. Nice tutorial, thanks! Is there a way to make mplayer open on OWB screen instead of WB?

    ReplyDelete
    Replies
    1. Not to my knowledge, sorry. If I find a way to do it I will certainly update this article though!

      Delete
    2. I found a way to do it! You need to edit config file and add PUBSCREEN=screenname after vo_cgx_wpa. Replace screenname with whatever youre is.

      like this: vo=cgx_wpa::PUBSCREEN=Browser

      Delete
    3. I tried your suggestion but it didn't work for me - just crashed the mplayer program when clicking Option 18 on a YouTube clip in MUI-OWB. Mui-owb opens a public screen called OWB, so I used the line vo=cgx_wpa::PUBSCREEN=OWB in the config file. What did you use for this?

      Delete
    4. My OWB screen is called Browser so config line is vo=cgx_wpa::PUBSCREEN=Browser. In MUI user interface settings for OWB screen "like workbench" and "compsiting" are enabled.

      Delete
    5. Thanks for this further information! I did change the screen name in MUI preferences in MUI-OWB to Browser (By copying the default Workbench screen and renaming) and then changing the MUI screen settings you mentioned. After that, Mplayer YouTube in MUI-OWB works now instead of crashing, and it now opens a window for mplayer on a dedicated separate screen for MUI-OWB instead of the Workbench screen. This is useful for those people who like to run MUI-OWB on its own screen rather than on the Workbench screen. Thanks for the tip.

      Delete
  4. Thanks, HTML5 is the way. Everyone should check OCCUPY FLASH page on the web

    ReplyDelete
  5. Will 3D support via Gallium speed up HTML5 on AmigaOS?

    ReplyDelete
  6. Thanks for the ::PUBSCREEN=Browser tip!


    "Will 3D support via Gallium speed up HTML5 on AmigaOS?"

    I would guess so, but it will probably get speeded-up before then, as currently Timberwolf is not yet optimised at all (e.g. it currently redraws the entire window even if only one pixel changes).

    ReplyDelete
  7. no luck with this. I get "server returned 403 forbidden"

    ReplyDelete
    Replies
    1. I checked and confirmed the link is working ok. I noticed reports on AmigaWorld.net that youtube changed the url paramters recently which means the mime types need to be changed from %l to "%l" or it doesn't work. I have updated the blog entry accordingly.

      Delete
  8. Unable to open 'http://o-o---preferred---sn-5uaeznes---v14---lscache5.c.youtube.com/videoplayback?upn=0fbzDCcSgsw&sparams=cp%2Cid%2Cip%2Cipbits%'.
    Error 6: Couldn't resolve host name

    This is what I get when I try to play a video. What am I doing wrong?

    ReplyDelete
    Replies
    1. Thanks for letting me know. Looks like YouTube has changed something and broken the solution I described. I confirmed today that I can no longer stream videos as before using MUI-OWB. I have updated the blog entry to reflect this until I work out how to fix it! Sorry about that but I obviously can't control YouTube website changes!

      Delete
  9. Thanks. I thought i was going crazy. I asked for help on the Amigans website but got no
    response.

    ReplyDelete
  10. Hi great guide, but I still have problems with it. I've recently, since November, bought an X1000 machine but I have problems with playing YouTube videos, where previously with my Pegasos2 system I hadn't.

    The problem is that I followed your guide exactly as it says, but when I click on "18" to view without flash nothing happens.

    Any idea?

    ReplyDelete
    Replies
    1. Looks like it has stopped working again. It was fixed with the javascript update to counter the changes to YouTube's website, but it looks like it has stopped working again. When I have a solution I will update the blog. In the meantime I have included a warning in the blog post for anyone else reading the instructions. Ultimately the process is correct, it is just the javascript file that needs updating to work with the chnaged website format.

      Delete
  11. Wish I could get this to work on my micro A1 with Odyssey 1.16. First problem is that there is no way to enable HTML5 via the link you provide to the youtube options. There are no selections available and nothing that can be changed on that page. I have tried to spoof every type of browser available for Odyssey and nothing works except ipod, which at least shows me the youtube video pictures with a play button. But there are no buttons underneath as shown in your examples.
    So how is it possible to select HTML5 by default on youtube if it cannot be done by any existing Amiga browsers?

    ReplyDelete