Hints to setup browser plugins to play embedded RealPlayer and Flashplayer video clips

Hints and code to embed RealPlayer and Flashplayer into HTML pages for use with different browsers and operating systems

Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum
In case a contained link has gone outdated it perhaps may still be found in the WAYBACK MACHINE (http://archive.org/web/)

Motivation

Trying to embed a video clip on a website the solutions given on the websites of the player producing companies, i.e. Real.com and adobe.com did not work for all popular browsers (Firefox, InternetExplorer, Konqueror, Mozilla, Netscape, Opera, Seamonkey) and not on all operating systems. Even other helpful hints available on internet like posted by the computer center of the university of cologne do not describe a real universal solution. For the tested constellations the RealPlayer has to be embedded in different ways while the Flashplayer plugin does not work in all versions.

Actually it is very popular to post own videos on platforms like youtube but such solution comes with some disadvantages like lost of privacy and embedding in a very commercial environment. And even youtube videos may not play without changing the default setup of used operating system and browser program. Knowing how to embed videoclips one can post them on an own website and select the audience using a password etc. This may be needed in times where media selling companies tend to criminalize people who publish media without restricting the audience.

Following is a universal solution for the mentioned browser programs. It uses PHP, but not JavaScript since the latter is often used for agressive advertisement and to spy out privacy. Though, universal embedding can be done using JavaScript instead of or additional to using PHP.

The operating Systems tested are Linux in i686 and amd64 versions and Windows 2000 and -MilleniumEdition (ME). The given code is simple and can be adjusted for experiments to cover untested constellations.

The tested RealPlayer versions are 10.0 for Linux (the most actual release) and Windows ME, RealPlayer 10.5 for Windows 2000. Real.com offers actually version 11 of RealPlayer for Windows XP and Vista. Hint: Some older RealVideo content may not be playable using RealPlayer 10 due to a change of codecs, but there is a workaround published in internet. Tested was a RealVideo file having the filename extension rv, created with the actual RealProducer Basic program version 11.

The tested Flashplayer versions are 7.0r63, 8.0.r22, 9.0.r28, 9.0.r48 and 9.0.r115. The 9.0 versions allow to play most actual content. Tested was several actual content published in internet (which mostly needs version 8 or newer) and a file produced with the SUPER file converter (based on public source software) that was able to be played using version 7 of the plugin.

Originated from a high quality source like e.g. records of a camcorder, the free RealProducer creates high quality RealVideos while the free SPECIAL converter output quality is medium, maybe the reason is the version of the used codec. High quality Flash output can be created using expensive Adobe products.

The topic of streaming media is not handled here, it depends on the used server and it's setup and does not affect browser setup nor embedding code (for RealPlayer it depends on the protocol noted in the rpm-file).

Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum

Traps

  • The video (not the sound part) performance of the actual RealPlayer available for Linux, which is version 10.0, is poor, i.e. absolutely not smooth, on an amd64 Linux, but much better for the i686 version. See this fix of that problem below.
  • Even the same Browser in the same version (Opera 9.25, e.g.) behaves different for the same embedding code when running on Linux vs. running on Windows.
  • On Linux the actual Flashplayer version for Konqueror and Opera browsers may not be newer than 9.0.r48.
  • Using different browsers it may be needed to use different plugins or remove/uninstall other/older versions. On SuSE Linux, e.g., there is a directory /usr/lib/browser-plugins, meant to collect all installed plugins. For all browsers to work it may be needed to disable the use of such common plugin directory like happened for Konqueror and Opera on Linux if the newest flashplayer-plugin (version 9.0.r115) is used for other browsers on the same system e.g. Firefox.
  • InternetExplorer, at least version 6, does not provide the "about:plugins" address so one needs to dig in the registry or MS-website to find out which plugin version is installed. Also JavaScript may be used for that purpose.
  • Since some plugins are not provided as 64-bit (Linux) operating system versions, which may be rather a topic of Microsoft's software political influence than missing manufacturer's capabilities, it may need to use the 32-bit version of your favourite browser on 64-bit systems.
  • It is not possible in any (tested) case to embed a RealPlayer or Flash video-clip according to the w3c HTML specifications; either the OBJECT tag needs non-standard parameters or the non-standard EMBED tag must be used.
  • As experienced with RealPlayer on Linux some video clips cause strange changes in their displayability due to changes of parameter. An example (as of 2008-03-30) is the alcotest.ram file as listed under Links. If the ControlPanel attribute is removed from the CONTROLS parameter, the clip plays only sound but no video. And correction of the HEIGHT parameter's value -to re-correct the aspect ratio- will also cause a RealPlayer black screen. For the named example the solution was to add the MAINTAINASPECT parameter in the Linux-embedding code. Such solutions are best called hacks, they seem not to be (officially) documented (but here).
Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum

Browser setup

Playing videoclips does not only need to present the correct HTML code in a webpage but also depends on the setup of the browser, i.e. the correct plugins used.

The RealPlayer plugin is called Helix DNA Plugin: RealPlayer G2 Plug-In, has an assigned MIME type of audio/x-pn-realaudio-plugin (even for video clips) and an assigned filename extension of rpm. The filename of the plugin is nphelix.so on Linux, nppl3260.dll on Windows 2000 an -ME.
Hint: An rpm file is a (text-) metafile that contains the URL (address) of the file to play which itself can be of various types like RealAudio, RealVideo etc. See the Real.com website for a list of file formats.

The Flashplayer plugin is called Shockwave Flash, has an assigned MIME type of application/x-shockwave-flash and an assigned filename extension of swf. The filename of the plugin is libflashplayer.so on Linux, NPSWF32.dll on Windows 2000 and -ME.

Usually browsers search in some common, predefined locations for all available plugins and commonly use the newest version they find.

For Linux, the Konqueror and Opera browsers can not handle the newest version of the Flashplayer plugin (because they keep standards), but must use the 9.0.r48 (or any older) version. Fortunately those two browsers allow to define the locations where they search for plugins so that it is possible to use the 9.0.48 version for them and a newer version for other browsers on the same system. For Konqueror this locations can be defined via MenuBar.Settings.KonquerorSetup.Plugins.NetscapePlugins.Plugins.Search where new plugins-searchpaths can be defined or predefined plugin-search-paths can be removed. For the Opera browser such functionality is available via MenuBar.Tools.Preferences.Advanced.Content.Plug-InOptions.ChangePath. The easiest way to setup the correct plugins for these browsers is to create one directory, e.g. /usr/lib/browser-plugins.KonquerorOpera, copy the appropiate plugins into that directory and set that directory as only directory to search plugins, i.e. remove all other plugin search paths from the list. Do not forget to copy (or link symbolic) all other wanted plugins into that directoy if you do so.

The other tested browsers on Linux can not easily be setup to use a special directory for plugins. They always search plugins in their own (plugins sub-) directory and in common locations. Those locations may depend on installation directory and used Linux distribution like

  • In the home directory, i.e. /root/.mozilla.plugins or /home/USERNAME/.mozilla/plugins
  • In /usr/lib[64]/browser-plugins directory (like e.g. for SuSE distribution)
  • In the installation directory like e.g. /opt/mozilla/plugins or /opt/firefox/plugins

To find all occurences where RealPlayer and Flashplayer plugins (and other plugins) are installed the commands locate nphelix.so and locate libflashplayer.so, given on console, may be helpful. All tested Linux browsers, except Opera for which the versions are reported via MenuBar.Tools.Preferences.Advanced.Content.Plug-InOptions, provide the versions of the used plugins via the about:plugins address. In case of malfunction try to remove all plugin versions handling rpm and swf filename extensions but the newest. This may need to delete the same plugin in several plugins-directories. Make backups first and note the directory locations if you do so.

The Flashplayer for Linux rejects to install itself on 64-bit Linux systems, although it will work on them (as for SuSE)! To get the newest Flashplayer download the .tar.gz version like e.g. install_flash_player_9_linux.tar.gz, unpack it with ark or any other utility (even the mc program is able to browse into that archive) and copy the flashplayer.so file manually to the plugin directories.

The Linux open source packet named gplflash can only play old versioned flash videos and should be uninstalled if you want to be able to play actual flash videos.

The Linux open source packet named mozplugger may, but must not, confuse the playback of video clips. The configuration file is usually /etc/mozpluggerrc, more information about mozplugger is available on the authors website.

There are also other Linux open source plugin helpers, some need more, others less system setup. Please feel free to try them. They are not covered here.

On Windows, all tested browsers can handle the newest (tested) version of RealPlayer and Flashplayer-plugin. An old versioned RealPlayer or [Macromedia] Flash Player can easily be uninstalled via SystemSettings.Software. Then, first, install or update all browsers you like to use beside Internet Explorer, and then (download and) install the newest RealPlayer and Flashplayer versions. Finally check for Firefox, Netscape and Seamonkey browsers if the plugin versions are as expected. Opera for Windows does not support setting of the plugin path but can handle the newest Flashplayer version anyway and reports the used plugin path via the about:plugins or opera:plugins address.

Tested constellations known to work simultaneously
Operating system Browser RealPlayer version Flashplayer version
Linux (amd64) Firefox 2.0.0.11 10.0 9.0.r115
Linux (amd64) Konqueror 3.4.0 10.0 9.0.r48
do not use any newer version
Linux (amd64) Opera 9.25 10.0 9.0.r48
do not use any newer version
Linux (amd64) SeaMonkey 1.1.7 10.0 9.0.r115
Linux (i686) Firefox 2.0.0.11 10.0 9.0.r115
Linux (i686) Konqueror 3.4.0 10.0 9.0.r48
do not use any newer version
Linux (i686) Opera 9.25 10.0 7.0.r63
Linux (i686) Opera 9.25 10.0 9.0.r48
do not use any newer version
Linux (i686) SeaMonkey 1.0.8 10.0 9.0.r115
Windows 2000 Firefox 1.5.0.11 10.5 9.0.r28
Windows 2000 Internet Explorer 6 10.5 9.0.r28
Windows 2000 Mozilla 1.7.11 10.5 9.0.r28
Windows 2000 Opera 9.25 10.5 9.0.r28
Windows Millenium Edition (ME) Internet Explorer 6 10.0 8.0.r22
Windows Millenium Edition (ME) Mozilla 1.7.5 10.0 9.0.r28
Windows Millenium Edition (ME) Netscape 8.1.2 10.0 8.0.r22
Fix to avoid un-smooth video display of RealPlayer 10 on 64bit Linux

Tested on an Amd 64 SuSE 9.3 system, as a precondition Alsa/oss sound must be installed. The first part of the fix is described here, namely to modify the file realplay, usually installed into /usr/lib/RealPlayer10, as follows:

replace the line $REALPLAYBIN "$@" by aoss $REALPLAYBIN "$@"

The second part of the fix, not mentioned there, is to modify the file aoss, usually found in /usr/bin as follows:

replace LD_PRELOAD=/usr/lib64/libaoss.so exec "@" by LD_PRELOAD=/usr/lib/libaoss.so exec "@"

If you prefer to leave the aoss file unchanged then copy it to aoss32, do the changes therein and modify the realplay file using aoss32 instead of aoss.

Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum

Embedding code

After ensuring that your browsers use appropiate versions of the RealPlayer- and Flashplayer-plugins the other side of playing video clips is to serve HTML code the used browser can handle. Unfortunately the actual situation is that one browser does not accept the HTML code another browser needs. And, even worse, none of the solutions are HTML compliant. Incompatibilities even occur between equal browser versions for different operating systems. It needs a browser- and operating-system-individual solution to provide the HTML code one special browser needs. As explained above, this solution avoids JavaScript and depends on a truly reported User-Agent by the browser. As there are, e.g. websites which show just a website on maintainance message when browsed with Opera (such websites use propietary Windows software) some users might feel the need to make their browsers fake another manufacturer. Browsers which support such are Konqueror, older free Opera versions and Firefox using an add-on. The following code relies on a correctly (and at all) reported User-Agent, which is by default sent by any browser on any HTTP-request. And such is the only solution since a faked User-Agent browser may not be able to handle the videoclip code of the browser he is faking as. Anyway, the code uses a default code for unreported User-Agent‘s, but such must fail in some cases as long as no browser-plugin keeps the W3C standards.

The code is written in PHP and is distributed under the terms of the GNU General Public License version 3. Copyright (C) Michael Besteck, 2007. It provides a RealVideo and a Flash version of a simple videoclip embedded in a HTML page. It needs a PHP enabled webserver, either on your local computer or on a website. The 2 included videoclips for demonstration purposes are Copyright (C) Michael Besteck, 2007, distributed under a non-commercial creativecommons by-nc-sa license. You can download the code as a zip-archive here. Do not forget to adjust the included rpm-file and ensure the files have read access rights.

The following is the essence of lots of tests and may be used as base for experiments if you need such. _rpm_metafile_to_play_, _height_of_videoclip, _width_of_videoclip_ and _height_of_videoclip have to be replaced by individual values.

RealVideo embedding for Opera browser running on Linux

<embed
TYPE="audio/x-pn-realaudio-plugin"
DATA="_rpm_metafile_to_play_"
SRC="_rpm_metafile_to_play_"
WIDTH="_width_of_videoclip_"
HEIGHT="_height_of_videoclip_"
CONTROLS="ImageWindow,ControlPanel,StatusBar"
AUTOSTART="true"
LOOP="true"
NOLABELS="true"
CENTER="true"
BACKGROUNDCOLOR="#000000">

RealVideo embedding for any Gecko based Browser under Linux or Windows (Firefox, Netscape, Seamonkey)

<object
TYPE="audio/x-pn-realaudio-plugin"
DATA="_rpm_metafile_to_play_"
WIDTH="_width_of_videoclip_"
HEIGHT="_height_of_videoclip_"
CONTROLS="ImageWindow,ControlPanel,StatusBar"
AUTOSTART="true"
LOOP="true"
NOLABELS="true"
CENTER="true"
BACKGROUNDCOLOR="#000000">
</object>

RealVideo embedding for Konqueror (Linux) and Opera and Internet Explorer running on Windows

<object
ID="ImageWindow"
CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
TYPE="audio/x-pn-realaudio-plugin"
DATA="_rpm_metafile_to_play_"
WIDTH="_width_of_videoclip_"
HEIGHT="_height_of_videoclip_">
<param name="CONSOLE" value="main">
<param name="SRC" value="_rpm_metafile_to_play_">
<param name="CONTROLS"
value="ImageWindow,ControlPanel,StatusBar">
<param name="AUTOSTART" value="true">
<param name="LOOP" value="true">
<param name="NOLABELS" value="true">
<param name="CENTER" value="true">
<param name="BACKGROUNDCOLOR" value="#000000">
</object>

Flashvideo embedding for all tested constellations

<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
type="application/x-shockwave-flash"
data="_swf_videoclip_to_play_"
width="_width_of_videoclip_"
height="_height_of_videoclip">
<param name="movie" VALUE="_swf_videoclip_to_play_">
<param name="quality" value="autohigh">
<param name="scale" value="default">
<param name="play" value="true">
<param name="loop" value="true">
<param name="menu" value="true">
<param name="bgcolor" value="#000000">
<embed
src="_swf_videoclip_to_play_"
quality="autohigh"
scale="default"
play="true"
loop="true"
menu="true"
bgcolor="#000000"
width="_width_of_videoclip_"
height="_height_of_videoclip_"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</object>

Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum

Demo

Unpack the zip-archive into a PHP-enabled directory on a local or remote webserver and browse the RealAndFlashvideoclipEmbedding.php page. Keep attention to set correct file access rights. The RealVideoDemoFile.rpm must be adjusted to contain a full URL, relative URLs may only work in the embedding HTML code, not in the rpm file.

Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum

Links

GNU The Gnu Public and other licenses
University of Cologne About embedding RealPlayer
Real.com RealPlayer test page
Real.com RealPlayer test page
ChemgaPedia A third party test page for a Real-One-Player videoclip
Hint: Actually, as of 2008-03-30, RealPlayer 10 (on Linux) only plays the sound but does not show any visual content. The embedding code seems to be incompatible for use under Linux. Creating an own simple webpage on your local computer using the embbedding code given above, this video clip can be viewed on Linux.
For example to let Seamonkey or Firefox play the clip without own server and without using Php or JavaScript you may save the following code as realalcoholtest.html and open it as a file.


<html><head><title></title></head><body>
<table><tr><td>
<object
TYPE="audio/x-pn-realaudio-plugin"
DATA="http://www.chemgapedia.de/vsengine/info/de/help/requirements/alcotest.ram"
WIDTH="384"
HEIGHT="288"
MAINTAINASPECT="true"
CONTROLS="ImageWindow,ControlPanel,StatusBar"
AUTOSTART="true"
LOOP="true"
NOLABELS="true"
CENTER="true"
BACKGROUNDCOLOR="#000000">
</object>
</td></tr></table>
</body></html>

Real.com RealPlayer parameter
Real.com RealPlayer file formats
RealPlayer Download
ubuntu About RealPlayer codecs used by Amazon which are not supported anymore by the actual RealPlayer version
Real.com Free download of RealProducer Basic which converts video and audio files
Adobe.com Flashplayer test
Computermagazin c‘t Archive of video files in Flash format
German non–commercial TV broadcasting magazine ‘Report’ Archive of video files for stand-alone (not embedded) RealPlayer
Adobe.com Basic Flashplayer parameters
Adobe.com Flashplayer parameters
Adobe.com Discussion about Linux Flashplayer plugin versions
Flashplayer Download
Macromedia.com Flashplayer detection kit, uses JavaScript to detect the Flashplayer plugin version
Flashplayer 9.0.r48 for Linux (rpm-packet) Download
Mozilla Plugin help for Gecko based browsers
Mozplugger Homepage of the author of mozplugger
Microsoft.com Description of Internet Explorer support for plugins
SUPER converter Free download of a converter program for various audio and video formats. The converter runs on windows and is based on open source software. This website has a somehow non-straight design, it needs some concentration to find the right download link.
Firefox browser Download
Netscape browser Download
Hint: The Netscape browser development is announced to be stopped as of January 2008.
Opera browser Download
Seamonkey browser suite incl. email-client (before called Mozilla) Download
VideoLAN / VLC media player A free multi-platform media player that can handle most media formats
mplayer A free media player under GPL license that can play most video formats, usuable as plugin, available for Linux, Windows and as source code
mplayer plugin at sourceforge.net mplayer plugin for Linux/Unix Browsers
rpmfind.net Website for Linux rpm-packages. How to extract files from a rpm-package without installing it is explained on the Linux Laptop page (see link below)
rpmfind.com Website for Linux rpm-packages.
rpmseek.com Website for Linux rpm-packages.
3GP A link-list webpage about media in 3GP format, popular with mobile ‘phones’.
Linux on Gericom Laptop How to install Linux on a Laptop
Stoppt die Vorratsdatenspeicherung Website of a group active against the increasing authorities’ web sniffing behaviour in Germany. Where ever you are, this will affect your internet freedom too, earlier or later if not already. That website is available in english, german, french and italian language, they are looking for translators...

Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum

Contact/Impressum

Email: a.b.c_at_gmx.net

Please let me know of your experiences and any improvements.

Author: Michael Besteck as of 2007-12-25

Copyright (C) Michael Besteck 2007, 2008, License: Creative Commons, some rights reserved (commercial use, must include author's name)
Anybody may freely quote from this content under the precondition that the phrase
originated by Michael Besteck, http://ContemporaryCodes.de/RealPlayerAndFlashplayerEmbedding/index.html is included in any quotation.

For reasons of privacy please email me if you feel any need of my address.

This is a german website. Since in Germany any website owner is responsible for the content behind hyperlinks i hereby state that i refuse any responsibility for any content of any linked websites and i am dissociating from any content of any linked websites.

Valid HTML 4.01 Strict

Headline  Motivation  Traps  Browser setup  Embedding code  Demo  Links  Contact/Impressum
Homepage