Overview | All Articles | Homepage |
RSS
Keywords: KDE, LaTeX, Linux, Mathematics, Society, University
Planets: Planet Fachschaftsumfeld
2007-12-30 by Thomas Fischer [en]
Due to youtube.com and other similar sites, videos on websites have become very popular.
However, Flash has several drawbacks such as closed source and limited support of non-Windows systems (see "Why Flash sucks").
Luckily, there is an alternative available based on patent-free and GPL'ed software.
Fluendo offers a java applet called Cortado that can play (streaming) multimedia files including ogg vorbis and theora files. Advantage with this approach is that is does not require to install any codes on the target computer and should run on any java-capable system.
To put a video on your website, you have to perform some simple steps:
To convert existing audio and video files, you may want to use ffmpeg2theora. This program is easy to use, but to fine-tune the conversion there is a set of parameters e.g for quality, resolution and sampling, contrast, brightness or gamma control.
Depending on where you got the .jar file from, it may have different names. In my case it is called cortado-ov-debug-0.2.2.jar for audio (ogg vorbis) only and cortado-ovt-debug-0.2.2.jar for audio and video (ogg vorbis+theora).
To embed an applet on a HTML page, there is both the applet tag and the object tag. The former one was invented by Netscape, not standardized by W3C, but works with most browsers. The latter one is standardized, but is said to be more complicated to be used. Although I favour standardized procedures, I'll stick with applet for this example.
The code for the video below looks as follows:
<applet code="com.fluendo.player.Cortado.class"
archive="cortado.jar"
width="320" height="240">
<param name="url" value="rabbits.ogg"/>
<param name="duration" value="10"/>
<param name="local" value="false"/>
<param name="keepAspect" value="true"/>
<param name="video" value="true"/>
<param name="seekable" value="true"/>
<param name="audio" value="true"/>
<param name="bufferSize" value="200"/>
</applet>
For your own video, you may have to change the following parameters:
For more details on the parameters, please refer to the README file.
Finally, the applet should appear on the website as shown here:
Update: Of course, as the java applet is a player only, the video is available as a stand-alone file on the web server, too.
Keywords: Linux
Trackback-URL: http://www.t-fischer.net/blog/20071230_Ogg_Theora_Applet_instead_of_Flash
Writing comments is currently not possible. Feel free to write me an email to the address shown on my homepage.
More social bookmarking links than anybody else ;-)![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Date of Modification: 2009-Feb-21 18:08