Learn how to play streaming media from your website

There are several formats of videos. Every type of format has a different payer code to use on your website. Formats as WMX (MICROSOFT MEDIA PLAYER),FLW (a macronedia format file), RM, ASX, AVI, MPEG, DIVX, MOV, FLV (need Macromedia flash player), etc... How are you go to manage a player for seach format of video? In this article we will see what coe we should use for some most important and commonly used types of formats and using the plugins and skins of Microsoft.

WMV, RM and Mov and includes a variety of presets to ensure your video is of optimal size and quality for the web. Choose the format that's right for you.

Play ASX files

If the format is an ASX format then here is the code to use where yourfile.asx is the file to play and which is on a folder of your server. With this code you have some control of showing controls, autostart, the size of the player.

Another way to play an ASX file using the plugins and skins of Microsoft is the following:

Windows Media 7 is considerably more customizable than earlier players. Some modifications can be made to the player using the ASX files. Even more modifications can be made using Windows Media's new "skin" features. Skinning allows you to modify the look and feel of the player window using a XML based language.

Future generations of Windows Media will allow the developer greater control over the look and feel of the player as well as inserting need tags that increase advertising and ad insertion opportunities. Microsoft is very eager to help developers come up with new business models that allow them to make money with their video assets. Microsoft will of course take a small percentage off the top.

If your want you can add your own buttons [Start][Stop][Pause] using the code here below:



Other way to play ASX files is using the code here below with Microsoft Media player plugins and skins:



Let's take a look at this big chunk of code. The object tag at the start refers to an Active X object that Internet Explorer uses to play the video. The ID tag names the video. Later this will help us control it with JavaScript. Name it anything you like. Don't worry about the long classid number, it's a number Microsoft uses to make sure every Active X control is unique. The only part you change in the first part is the width and height of the video. Good Sizes

Size                                   Bitrate

Width=160 height=120     Use this for 28.8 kbps
Width=240 height=160     Use this for 56 kbps video
Width=320 height=240     Use this for 100kbps or higher. Consider full screen video for 300 kbps or higher.


The names are where you'll make your changes. There are a huge number of possible parameters that can be used to modify the Windows Media Player. First, we will look at the ones that are essential to embed the video in the page and get it playing. Later we'll look at the full list. Here's a short definition of the one's used here.

Name                   Definition

FileName:            Points to the .asx file, you can place the asx files in directories just like a graphic file
AutoStart:           Starts the video playing automatically when the page loads, if set to “false” the play button must be pressed to start playback
ShowControls:    Shows the basic controls for starting, stopping, fast forward, rewind, pause and audio controls such as volume and mute.

The final part of the code covers backwards compatibility with Netscape. If you are only using this to display in Internet Explorer then the whole part of the code can be removed. Netscape uses the tag to place the video in the Web page. Netscape must have the Windows Media plug-in installed in order to play the video. The plug-in is installed automatically when Windows Media Player is installed on a computer using Netscape. Notice that you have to repeat the param names here. Netscape uses "1" for True and "0" for "False.

This is all you need in order to do a simple embed of Windows Media into a Web page and have it playback in Internet Explorer or Netscape. However, Microsoft offers many other parameters. There are too many to explain in the course of this article, but I've listed some of them below and the parameter names are fairly self-explanatory. Full details on the parameters can be found at Windows Media SDK .

But the most simple way is to let run user's Microsoft media player to play the file using the following code:




WMV video format files

WMV (Windows Media Video) Files in WMV format are good quality and small size, which makes them very portable. The most obvious advantage is that videos in WMV format will play on almost any Windows computer using the default Windows Media Player. This is probably the best choice to start out.


AVI video format files



SWF Flash shockwaves video format files


FLV flash video format files

To play FLV Macromedia flash format files you need to have the flowplayer.swf file (you can download it here). Here is the code to play flv flash files:



Embed FLV flash video format files

Another way to embed flv files just copy and paste the code below in your code:



Embed Quick time movies

To embed Quick Tme movies files when the server is a webserver just copy and paste the code below in your code:



Embed Quick time movies when based on a media server

To embed Quick Tme movies files just copy and paste the code below in your code:



Embed Real Player video files

To embed Real player movies files just copy and paste the code below in your code:



Embed WindowsMedia video file

To embed Real player movies files just copy and paste the code below in your code:

Conclusion

Microsoft has made it very easy to launch Windows Media in the standalone Windows Media Player or to embed the video in a Web page. While stand-alone video can be useful, the true value comes when the video is embedded in a Web page and can be surrounded by supporting material that takes video from being an independent media type to being part of a video application. In the next article, I will show you how to further integrate Windows Media into an application so the video and the surrounding material can truly interact

For more help goto:

videohelp.com | websitehelpers.com | engagemedia.org | Free download center.com

Create your own movie from images using java code

This Java code permits to create from JPG images a Quick Time film.