Walker News

How To Embed FLV Flash In WordPress or HTML

For the start, you can easily embed FLV flash video in HTML by using JW Player with the template code below.

The sample HTML code used to embed FLV video
Do not copy the sample code and paste it directly to your post without replacing the colorized texts. It won’t work in that way, because I disable the hotlinking to prevent you and most other people from using my hosting bandwidth :-)
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="500" height="311"><param name="allowfullscreen" value="true" /><param name="movie" value="http://www.YourSite.com/player.swf" /><param name="flashvars" value="file=http://www.YourSite.com/YourFile.flv&image=http://www.YourSite.com/YourFile.gif" /><embed width="500" height="311" allowfullscreen="true" type="application/x-shockwave-flash" src="http://www.YourSite.com/player.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://www.YourSite.com/YourFile.flv&image=http://www.YourSite.com/YourFile.gif" /></object>

How to embed FLV video in WordPress or HTML?

Uses JW Player to embed FLV videoDownload JW Player (non-Viral version) and upload its player.swf to WordPress blog directory, i.e. the directory where wp-config.php is kept. Ignore this step if you’ve done so.

Add video files to WordPress blog.Login WordPress, start writing a new post and click Add Video button to upload a FLV video for it. When upload completes, click File URL button and then copy content of Link URL text box (URL of the uploaded FLV video) to replace all red texts in sample code.

Next, replace blue texts in sample code with your blog URL. Optionally:
  • Add in allowfullscreen to enable full screen playback.
  • Upload a screenshot of the flash video and replace green texts (except &image=) in sample code with content of Link URL text box. Otherwise, delete ALL the green texts (including &image=) from sample code.

Suppose the steps are done correctly, then the self-hosted flash video should be working, just like this:
UPDATE: The sample video has been removed.

Sample FLV video removed.
This FLV video is copied from WalkerNews@YouTube Channel, with reference to the trick used for retrieving YouTube video from IE cache folder.

More reference on this topic:

Embedding Flash Video into a Web Page
Macromedia Flash OBJECT and EMBED tag syntax
Flash Satay: Embedding Flash While Supporting Standards
Flash in HTML

Custom Search

  1. Nik 14-04-08@07:44

    Could you please specify how to add an image to this embedded player (snapshot for video).
    In a similar script it was done with the line


    how would that be in this case?


  2. Walker 14-04-08@11:24

    Hi Nik, you may use JW Media Player (refer to the post) where the Javascript will able to do that for your case.

    (The code template that I’ve outlined is HTML style and thus less features).

    Please refer to my correction on the next comment.

  3. Walker 14-04-08@12:31

    Hi Nik, sorry for misleading info, I might be too tired :-(

    By using JW Media Player, you could also include the snapshot / preview image of the FLV video clip by simply including the ‘image’ flashvar to that HTML-style of code (i.e. without having to use a Javascript), i.e.

    ......param name="flashvars" value="file=http://walkernewsdownload.googlepages.com/Lion-hug-Rescuer.flv&image=http://walkernewsdownload.googlepages.com/WalkerNews-Feed.jpg"......
  4. bachhoakhai 12-05-08@21:46

    Hi Nik, it run. But…how i can make it to show a playlist of these file I’ve linked

  5. John 16-05-08@15:00

    How could I get this to autoplay?

  6. John Morris 27-06-08@00:49


    Very helpful thread. Now that I can access the FLVs via HTTP and the Object embed, how can I create a “wrapper” SWF player in which to play the files? I want to create a “branded” player. (Obviously, I don’t know much about Flash).

    Thanks – John

  7. Walker 27-06-08@01:05

    Hi John, do you mean to create flash player of yourself?
    To be frank, I know only little about creating flash movie. So, I can’t help you on this.

  8. John Morris 27-06-08@01:48

    I want to generalize the code as much as possible which I can probably do by creating a .js file of the enbed object code and pass the name of the target FLV file in as a parameter. I want to use a single code base to access a library of FLV files. The “player” (the single_video_player.swf) file is what I was really referring to. I want to create a new one with some additional controls and branding. Since I’m not a Flash expert by any means, I wondered if you had advice on creating the SWF player.

    Thanks – John

  9. How To Extract Audio Music From A Video Clip In Windows Movie Maker – Walker News 30-06-08@22:35

    […] short flash video showing a simple trick on how to do […]

  10. How To Edit And Rewrite Post Slug / Permalink In WordPress 2.5? – Walker News 30-06-08@23:51

    […] just upgraded or is running WordPress powered blog for the first time, do you know that WordPress allows author to edit or rewrite the post slug to a search engine friendly […]

  11. World Time Clock: How Many Time Zones Are Used In USA Or Russia? – Walker News 14-07-08@02:38

    […] too hard for you to visualize the world clock on the world map, you may refer to this simple Shockwave Flash gadget provided by […]

  12. QueenEve 21-07-08@16:28

    hi walker
    How can i change the skin , i want to add a different skin that has more buttons is there a way to do it

  13. WordPress 2.6: What Does The Commenter IP Tells? – Walker News 18-08-08@00:04

    […] those who are using WordPress powered weblog, do you click the commenter IP address each time before approving it? If you never […]

  14. paul 17-09-08@10:43

    hi there, i have 1 problem in the code at the top, when i copy and paste the code, the video didn’t play..i already change the URL of the video, but nothings happen.. this is my example “URL:http://localhost/request/DK.flv” please someone here to help me, this is for my thesis..

  15. Walker 17-09-08@21:53

    Hi Paul,

    do you have a copy of JW Media Player (i.e. the mediaplayer.swf) in your local web server?

    If you do, you should also replace the URL of mediaplayer.swf (written in light-blue text) to test all in local web server.

    If you doubt the local web server working, just place the the URL you’re using in web browser Address bar (I think the working web server will prompt you to download).

  16. Chris 28-11-08@02:38

    Is there any way to get the player to autoplay?

  17. How Easy To Change WordPress 2.7 Post Permalink With Post Slug – Walker News 16-12-08@00:53

    […] / truncation logic). If you have a reason to change the default “Pretty Permalink”, WordPress allows you to edit or change the permalink, just as you […]

  18. Vince 28-01-09@10:43

    Thanx for the code. I saw this code a while back but I never needed it until today. I’m starting a new site and the wordpress theme I am using only excepts this one without showing code on home page. All I need to do now is figure out how to get the full screen access turned on. Thanx again.

  19. Darius 25-02-09@14:36

    Copied and pasted the code and it worked fine except that it doesn’t allow full screen. How do I enable full screen viewing?

  20. Walker 26-02-09@00:45

    Try set the allowfullscreen to true (my sample code above doesn’t include this), e.g.

    ......param name="flashvars" value="file=http://walkernewsdownload.googlepages.com/Lion-hug-Rescuer.flv&allowfullscreen=true"......
  21. Tracy 28-02-09@11:25

    I’m trying to add a flash player to my site. I’m self-taught, so i tend to intermingle different types of code. i’ve tried a few different versions of code for players, yours included, and I have the same problem every time, – I can’t hear any audio. Is there a common mistake I’m making that you can think of?

  22. Walker 28-02-09@11:42

    HI Tracy, have you tried to browse the page embedded with flash on different PC or different browser?

  23. Tracy 28-02-09@14:12

    yes, I’m on a Mac, so initially I thought that was the problem, and had my friends go to the link too. No audio in any browser…

  24. manwith 01-03-09@04:16

    Hi ,

    I am trying to add this code in php file and I am not able to

    Can anyone help me out with it

  25. Gneteel 19-03-09@17:15


    i’ve been racking my brain over embedding my own videos with my own flash player. my question is how do i make a video URL such as youtube, and how can i make a video id such as youtube?

    can anyone help? I appreciate it.

  26. mike 17-04-09@03:19

    thanks man …helped alot…got it working…replaced the player on my server….all is well…much respect!!

  27. Walker 18-04-09@15:35

    Thanks JW Media Player!

  28. How To Embed SWF File Or Shockwave Flash Object In Microsoft Word 2007? 24-04-09@01:29

    […] 01:29 How do you open SWF file or Shockwave Flash game? Well, if you able to watch YouTube or any flash video embedded on a web page, most likely you could open the SWF file with that web browser. But, people seldom receive SWF […]

  29. Paul 30-04-09@21:01

    Thanks to your guidelines I have included a “flv’ video file to the site – after much heartache I will admit – the main problems encountered on the way was getting a suitable swf file. It works fine in safari and firefox on mac osx and ie but firefox on windows has a problem ??? I am still looking at this (the site is under development obviously if you look).

    What I really want to know is the params or flashvars to turn off the controller – I have tried “name = controller value=false” but it does not seem to have any affect. If you have a list of params that apply to your swf it would be appreciated.

    All in all it is great and simple – thanks again.


  30. Anis uddin Ahmad 04-06-09@02:30

    Thanks man.
    Thanks for the straight-cut solution. :)

  31. Ziah J 15-06-09@10:20

    Hey thanks much for the tutorial. I’m having troubles though and want to know if you can help me out. What if I want to host the video in the same directory as my blog but then embed it on the blog itself? I’ve tried using your code and it just shows the code in the preview….no video. So let me see if I can make what I’m trying to do a bit more clear. I’ve uploaded the video to the same public_html directory and just want to post it live on my blog. What would be the correct way to go about doing this? Thanks in advance.

  32. Walker 16-06-09@04:32

    Please take note that the block of code in the post is referring to files hosted at Google Pages, which imposes quota of bandwidth per month. I.e. it won’t work if the bandwidth limit is hit.

    For your case, you should host the mediaplayer.swf file too instead of using mine copy at Google Pages. Note, you need to update the path to video and mediaplayer.swf accordingly.

  33. Sridhaarr 19-06-09@00:03

    Hi ,
    I am using above code to dynamically add flash to my page by appending object tag to div.But I need to save this into database.While iam using div.innerhtml iam not getting
    flash vars value.I am getting like this
    How can i get this value.Any help appreiciated?

  34. dee 27-06-09@02:58


    I created a banner in Flash and saved it as a swf. How can I upload it ( the new banner) into wordpress to replace the old one?


  35. Walker 28-06-09@19:36

    I have just updated this post today:

    1) The block of code is now using my own hosting server instead of Google Pages.

    2) The revised steps.

  36. How To Embed SWF In HTML Code Or WordPress Post? 18-07-09@01:32

    […] Flash game in the HTML page or blog post, here is a template of code for reference. Unlike embedding Flash Video file (FLV) in HTML code, the template code used to embed SWF file is relatively “easier” and […]

  37. brendan 27-07-09@00:42

    I’m going crazy here.. I put a FLV in a SWF and made a Mojave External style for it or whatever, then i went under publish and published the swf and the html and everything, and uploaded the entire folder to my website and nothing is showing up..

    What am I doing wrong, here?

  38. sophia 13-11-09@09:38

    Hi..thanks for this article..i’ve been trying so many times and it cannot work..
    but becoz of your article, now it works…

    <3 gbu

  39. Nilesh 17-11-09@21:05


    Can i change play button? if, its possible so please let me know how to chagne it.


  40. Jason 20-11-09@05:06


    I am new to blogging, etc, and have been pulling my hair out trying to figure out how to make FLV play on my wordpress blog. Your post was the first thing I found that walked me through step by step – I especially appreciate you telling me in what folder to upload the player.sfw, which was my biggest source of frustration.

    Many Blessing!!

  41. ash 10-01-10@01:46

    Hi there,

    This was just what I was looking for. Thanks for sharing.

  42. Ed 15-02-10@01:44

    Is it possible to download and install a free mediaplayer.swf to my server? Where do I find one?
    Thank you.

  43. Walker 15-02-10@20:16

    You could download a copy of mediaplayer.swf from Jeroenwijering website.

  44. 4lb3rt 28-02-10@21:48

    Another simple way to add flash content to wordpress pages and posts is to embed it into a HTML page and then recall it with an iframe. The iframe src code can be easily added as HTML into the wordpress text editor and it can be customized with all kind of formats …..size, borders, transparency.

  45. Aijaz 06-03-10@04:40

    By following your nice tutorial I added the video.swf to my project. It is working on local I mean in Frontpage. But after uploading to my website there is nothing appearing.

    Another question : Is mediaplayer.swf is free to use for comm. and pers. website.

    thanks a lot for make this nice tutorial;

  46. Walker 06-03-10@13:24

    Please refer to JW Media Player developer regarding the license issue.

  47. Katie 21-04-10@11:05

    Hi there,

    I am still having trouble trying to put a WMV file on my webpage and have it play on the site. I’ve tried some of your codes, but for some reason are having difficulty.

    Please help!


  48. Matt 13-07-10@03:38

    Thanks, this is exactly what I needed. The quick setup wizard they provide was not working correctly for me. Copying and pasting your code worked perfectly.



  49. Andrew 21-09-10@06:12

    Hi There.

    I followed your instructions and my video worked first time. Any idea why the video appears smaller than the player. There is about a 50px black area all around it.

    The video is a High Quality 480 X 360 flv



  50. breanna 15-10-10@02:50

    how can i install or put a jw player on my website?im very new to this just created a website with a help from a friend but he’s gone now i dont know about installing or reading or replacing text or computer language…hope you can help me to put a jw player to my website…

  51. ZTRC 19-11-10@02:31

    One can adjust the size of the movie on the page by changing the: width=”480″ height=”360″ parameters. Black borders should only appear if the movie is smaller than the size of the frame.

  52. Johnw 01-12-10@10:45

    I used pplayer 2.0 for my word press website, it’s pretty easy if you have many of videos, it’s pity that it doesn’t support playlist

  53. Rivers 14-03-11@22:40

    Hi Walker i cannot get full screen to work i tried this code

    param name="flashvars" value="file=http://walkernewsdownload.googlepages.com/Lion-hug-Rescuer.flv&allowfullscreen=true"

    but it doesnt work-here is my code please tell me where im going wrong

  54. Walker 15-03-11@00:03

    I just tried and it is NOT working on my site too (can’t remember I did test its fullscreen feature). Have you tried with the latest JW Player 5.5?

    The full screen playback is enabled now (it wasn’t working because of my mistake in the code).

  55. Rivers 17-03-11@01:41

    The video is in my hard drive and i would like to add it to my web page using HTML

  56. Walker 17-03-11@23:38

    If the webpage is on your hard drive too, just replace http:// to file:///
    If to get webpage on hosting server to load video on your hard drive, am sorry for not able to help.

  57. MikeD 04-04-11@10:59

    Is there any way to disable the star burst when flv is download when playing, very annoying…

    Is there a listing somewhere the all of the param that are available to to set for the player?

  58. Walker 04-04-11@11:29

    You should able to find the list in JW Media Player official page.

  59. kb 25-05-11@18:45

    Is there any way I can handle the video source with a button.
    I mean like stop(); src = “new url”;play();

    Kindly tell me how can I make it happen with Javascript..I am new to this.

    I am testing this video object in android…

  60. john 01-07-11@12:46

    No good here, won’t run under any conditions, browsers and the like.

  61. Oisín 08-12-11@04:57

    Hi there, any chance you know how to upload a .swf file with a menu?

  62. Andy 22-01-12@04:58

    Finally..searched the web and tried all day to get video to play on my site but nothing worked until this..thank you soooo much.

  63. Andy 22-01-12@06:08

    Anyone know how i can add a way for people to pause the video ( i used code above)

  64. AlexKach 07-12-12@13:39

    Trying the code above to embed swf banner 1000×280 instead of same size header image in the WordPress header.php file.

    It gives me error just on the php file line starting with:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

2018  •  Privacy Policy