How To Embed SWF, FLV, MP4 Flash Video In Your Web Page
85Ever since flash video became the accepted medium to show web video in websites mainly because of smaller size – and therefore faster download – and lesser distortion, the web has seen a big rush of it. The increase in popularity of video sharing sites like Hulu, YouTube, and others bears testimony to that.
While it is easy to embed YouTube video in any website, in this article I will shift the focus a little and deal on how you can embed flash video in your web page independent of any video sharing host.
I will separately talk about embedding SWF, FLV and the now-in-vogue MP4 flash videos. Viewers may keep in mind that no flash video can or must be made in one common format for the fear of abnormal file size and/or distortion in the end product.
Thus, while SWF is good for short, low-motion flash video, FLV and MP4 should be the choice for longer, full-motion screen videos.
Embedding SWF Video
There are 2 ways to embed SWF flash video in a web page – SWFObject and Macromedia plugin. SWFObject is available free for download from Google Code page.
The html codes for both SWFObject and Macromedia plugin are as below. The full html code for embedding SWF video in web page is available here.
Code: SWF With SWFObject.JS
<script type="text/javascript" src="swfobject.js"></script> <object width="400" height="300"> <param name="movie" value="example.swf"> <embed src="example.swf" width="400" height="300"> </embed> </object>
Code: SWF with Macromedia Plugin
<object id="whatever" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0"> <param name="src" value="example.swf"/> <param name="bgcolor" value="#FFFFFF"/> <param name="quality" value="best"/> <embed name="whatever" src="example.swf" width="400" height="300" bgcolor="#FFFFFF" quality="best" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed> </object>
Embedding FLV Video Using Free FLV Player
Usually, an FLV flash format is ideal for videos of longer duration having high motion in them. Camera movie is nearly always shown as FLV video in a web page, and now increasingly as MP4 video as well.
Open Source FLV player, OSFLV, is available free to embed FLV video in a web page with controls that can play/pause/stop the video.
After you download and unzip the software from the site, go to the code generator page, and fill in the form that automatically generates the necessary html code for you.Embedding FLV & MP4 Video With JW Player
JW Player is versatile and free for non-commercial website. With JW Player you can have a FLV/MP4 flash video running in a loop without any play/pause/stop controls giving the impression of a video advertisement running.
Or, you can have various types of controls, various types of player skins, and so much more. What’s really good with JW Player is that the setup wizard [http://www.longtailvideo.com/support/jw-player-setup-wizard] lets you do all these very easily.
You can then view how the video actually plays, and if you like it, you can copy the html code given by up wizard the set for embedding the player in your webpage.
The video below explains the different ways of embedding flash movies in web page. Full html codes and other details can be had from this article on embedding SWF, FLV, & MP4 videos in a web page.
Similar Posts
You may be interested in the following informational posts:
vote upvote downshareprintflag
- Useful (3)
- Funny (4)
- Awesome (4)
- Beautiful (3)
- Interesting
CommentsLoading...
does it mean that after embedding the swf video on the site the user wont have to install the plugin on his browser to view the movie. is the plugin automatically installed on the users browser or wat?
Adobe Flash Player browser plugin is always needed to view Flash via web browser.
You have to first install the plugin on your browser and then embed swf to web page.
Nice post am looking for it.I have one query can link flv files from any other web server or should be in the same server where the site is hosted?
Thanks, however, I still can't figure out how to embed a .swf file so that there are some controls the user can use, like a play button, stop, and skip around in the movie? Typical embed lets the user watch but gives them no control...
Joe,
Am also suffering from same trouble, please anyone come out with solution for playing swf file with controls like play,pause,volume and full screen.
Thanks in advance
Great! Doremisoft video to flash converter is also a good choice. http://www.doremisoft.net/Video-to-Flash-Converter
I need to know how flv is embedded in SWF files.That is,if I have to parse the swf file,what should i look for to figure out if flv is embedded in Swf or not.
This is good an informative. Embedding flash on your sites is great for capturing user attention longer and making your site more interactive. Keep it up!
Open source flash player is really a good option. This tutorial did a good job leading to this link.
Also if you can put example.swf over here to be downloaded it will be very easy and handy
teri ____ me _____
Is there is a WYSIYG solution? I can never get JW or Flowplayer to work right, what with the XML files you have to create and debug, etc.
i want to create a full page view flash website,which is the ratio of swf file ?
tenx for sharing..... that's importantn to me coz i want to show flash on my site..... keep sharing bro.....
This was the one who has long been my search, thank you very much for the information ...
I admit Google is No.1 search engine of the internet world. I always take help of Google to get any more information about latest news. I'm glad that Google Global will be useful to so many.
good
i want to embed video in .net application. i used the following code :
embed height="400" width="600" flashvars="http://localhost/RahimGreen/Videos/YouTube - Aamir Khan's next project.flv\" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" type="application/x-shockwave-flash" src=="localhost/RahimGreen/VideoPlayer/mediaplayer.swf". Video and swf player i have included in my project.But the page stucks in Postback.what could be the problem.Please suggest someone..
http://www.jandwtreeservice.com Embed video isnt working
hey,
how to add flv video in xml file of flash.
One of the most easy ways to embed FLV video into your HTML page is to use the video services like YouTube, Vimeo etc. In other words you need to upload your video to the video service and then use the share button and copy the embed code.










Sweet chilD 2 years ago
It is a great tutorial. There is also other way to do so. Check playerdiy.com, with it, not only you can easily add flash videos to web page, but also can make customized flash video player for your website - http://www.playerdiy.com/