FLV Embed
FLV Embed is a WordPress plugin made to simplify the process of adding Flash videos (FLV) into your blog using Jeroen’s FLV Player.
For commercial use and implementation, you need to purchase a license for the player. If you want information about encoding videos into FLV and why you should use FLV, Jeroen has also written an excellent article which you can find on his site.
First of all, I do know there are already quite a few plugins that does similar things but I decided to make my own plugin for several reasons:
- to enforce a standard plugin tag style (all of my other plugins use the same tag style)
- no bells and whistles, this plugin embeds an FLV file and does it the easiest way
- uses highly portable, extensible and future proof tags
- XHTML compliant for those who cares about validation
Starting from version 1.0, FLV Embed supports Google video sitemap generation, the first WordPress plugin that does it for you! ;)
Features
- uses simple, intuitive tags to generate Flash video (FLV) movies for your posts
- supports video sitemap generation
- standards compliant: valid XHTML
- many options are configurable, such as autostart, show/hide control bar, player colour, poster image, full screen button etc.
- highly interactive admin option panel for player configuration
- supports text only output for RSS that prompt readers to visit the original post for Flash content
- supports outputting poster image for RSS if desired
- accessibility: requires Javascript to display FLV player, but will prompt user to enable Javascript when disabled
- accessibility: prompt user to download latest Flash player if it is not installed or too old
- accessibility: no annoying “click to activate” for IE users
Usage
This plugin uses one universal, standard tag style:
- url – the URL of the FLV file you want to embed, the path can either be site-relative or absolute
- width – width of the FLV movie
- height – height of the FLV movie
Jeroen’s FLV Player supports poster frame so you can turn on this feature via options if desired. The following two examples show FLV embed with and without poster frame.
Without poster frame
The poster frame feature is turned off by default.
Example input:
Example output:
With poster frame
In order to use this poster frame feature, you will need to turn it on via options. Once turned on, the player will look for preview image that share the same filename as the embedded FLV file. For example, if your embedded FLV file is “demo.flv”, the player will display “demo.jpg” as preview image. By default, the filetype of preview image is “jpg”, but this can be changed via options.
Example input:
Example output:
Version 0.3 onwards
Starting from version 0.3, it is possible to have your poster image at a different location than your FLV files. To achieve that, an optional 4th argument for the input tag and a new option $flv_posterpath were introduced. Below shows the tag syntax that should be used to provide a poster path:
- movie – the URL of the FLV file, the path can either be site-relative or absolute
- poster – the URL of the poster image, the path can either be site-relative or absolute
- width – width of the FLV movie
- height – height of the FLV movie
It is recommended that you try different settings for $flv_posterpath (found in option panel) and poster argument to have a feel how they work. There are several different ways how you could combine $flv_posterpath and optional poster path tag parameter to tell the plugin the poster location is not the same as the flv location.
If all your poster images are put within the same directory but not the same as the FLV files, change $flv_posterpath to point to your image directory, and no poster argument is required when using the embed tags. Make sure all the poster images have the same filename as the FLV files. If your poster images are scattered all over the places i.e. not within the same directory and not necessarily has the same filename as your FLV files, then use the poster argument to indicate where the poster image is.
The plugin detects the path used in the tags to determine if $flv_posterpath and $flv_flvpath should be used. In cases where absolute or site relative path are given as argument for the tags, $flv_posterpath and $flv_flvpath will have no effect on the output.
Users without Flash or Javascript
Unfortunately, about 2% of your users might not have Flash installed and about 10% of them might not have Flash 8 or above according to Adobe. For these users, the ufo.js will detect and output appropriate message that prompts these users to download and install latest Flash player onto their computers. Here’s an example screenshot that show you how this works:
While most modern browser supports Javascript, some users are too afraid that Javascript will screw up their computer so they turn it off just to be safe. This becomes a problem because this WordPress plugin relies on Javascript to display the FLV Player. To solve this problem, “noscript” tags are used to prompt these users to enable their Javascript and refresh the page for the Flash player to show up. Here’s an example screenshot:
Text only output:
By default, this plugin will output text that reads “[See post to watch Flash video]” for your RSS feeds only. If you wished you could display the poster image in your RSS feeds by setting $flv_posterinfeed option (see below) to 1.
Sitemap
Starting from version 1.0, FLV Embed supports video sitemap generation. In order to see the video sitemap option panel, you need to turn on the sitemap feature under your FLV Embed option panel.
The plugin will try to create a video sitemap file in your blog root but this might not be successful depending on your server configuration. If the plugin is unable to create the video sitemap file for you, then you will need to manually upload the video sitemap file to your blog root, chmod it “664″ (or “666″ depending on your server configuration) and tell the plugin where to locate your video sitemap under options.
Custom field data are used by the plugin to generate the video sitemap. If you have been using FLV Embed in the past, you can tell the plugin to insert missing custom field data for all published post by clicking the “Update Custom Fields” button within your video sitemap option page. This will also update any existing custom fields should there be any noticeable changes.
Automatic custom field insert can be disabled on a per post basis by putting [flv:skip] at the end of your blog post. Each time video sitemap is rebuilt successfully, Google will be pinged about the sitemap updates automatically. This plugin will try not to ping Google more than once per hour (as per Google’s suggestion), but you can override this by manually pinging via the “Force Ping” button found in sitemap option panel.
Click on the demo below to have a look how the generated video sitemap will look like. You might want to “view source” to see the actual XML content.
Options
Starting from version 1.0, you can change just about everything this plugin does using the plugin option panel. Below list some of the parameters that might be confusing for you when changing different options.
$flv_useposter: 0 to disable poster frame, 1 to display poster frame i.e. preview image$flv_posterinfeed: 0 to show text only output in feeds, 1 to display poster frame i.e. preview image in feeds$flv_imagetype: Preview image extension, can be “jpg”, “png” or “gif”$flv_posterpath: Path to poster images, trailing slash required$flv_flvpath: Path to FLV movie files, trailing slash required$flv_backcolor: Background color of the FLV Player *$flv_frontcolor: Texts / buttons color of the FLV Player *$flv_lightcolor: Rollover/ active color of the FLV Player *$flv_screencolor: Background color of the display of the FLV Player *$flv_logo: URL to watermark logo that will be displayed at the bottom right corner$flv_link: URL to go to when the logo is clicked$flv_overstretch: Defines how to stretch images/movies to make them fit the display.- “true” will stretch them proportionally to fill the display
- “false” will stretch them to fit
- “fit” will stretch them disproportionally to fit both height and width
- “none” will show all items in their original dimensions.
$flv_largecontrols: 0 to disable, 1 to make the controlbar twice as large for visually impaired users$flv_showdigits: 0 to hide the digits, 1 to show the digits for % loaded, elapsed and remaining time in the FLV Player$flv_showicons: 0 to hide icons, 1 to show the play/loading icon in the middle of the display$flv_showfsbutton: 0 to hide fullscreen button, 1 to show fullscreen button$flv_show_stop: 0 to hide stop button, 1 to show stop button$flv_showvolume: 0 to hide volume button, 1 to show volume button$flv_showcontrolbar: 0 to hide control bar, 1 to show control bar$flv_autostart: 0 to disable autostart, 1 to enable autostart (strongly discouraged as it’s annoying from a user perspective)$flv_bufferlength: Number of seconds an FLV should be buffered ahead before the player starts it$flv_volume: Startup volume for FLV Player
* These settings can be found in fullscreen.php as well which set the player appearance in full screen mode for older Flash users
Installation
- Download and extract the “flv-embed” folder
- Upload the “flv-embed” folder to your WordPress plugin directory, usually “wp-content/plugins”
- Activate the plugin in your WordPress admin panel
- For video sitemap feature to work properly, you should follow the instruction here
Upgrade
- Deactivate the plugin in your WordPress admin panel
- Remove the “flv-embed” folder in your WordPress plugin directory
- Follow the installation guide above
Download
FLV Embed plugin 1.2.1 for WordPress 2.5+
If you are using older version of WordPress, please download FLV Embed 1.0 from here instead.
| Support high quality yet free plugin by donating, thank you! |
If you like this plugin, express your love by donating and sharing this plugin with your readers!
Support
If you have any questions, suggestions, or found any bugs in this plugin, feel free to post them in your comments. I’ll try my best to answer them but there’s no guarantee, so don’t be disappointed if you do not hear back from me promptly. :/ Always include a URL to the problem page whenever you are asking for help, it will make it easier for me to figure out your problem. Lastly, if you find this plugin useful and feel like donating some money for my effort, please use the PayPal donate button above, thank you! <3
FAQs
I keep getting “Get the latest Flash Player to see this player.” message even though I have the latest Flash player. Why?
It is very likely that wp_head() function is missing in your theme’s header. To fix this, put the following code into your WordPress theme’s header file (usually header.php, under Presentation -> Theme Editor), right before the </head>:
<?php wp_head(); ?>
Why doesn’t my flash video stretch properly?
You need a better encoder, or you can also try different settings for $flv_overstretch option.
Why are those ugly embed code showing up on my category, tags etc. page?
This is because those entries do not have their excerpt defined, and WordPress is trying to generate one for you based on the post content, and you happen to have the FLV embed tags at the top of the page! Unfortunately, I have yet to fix this problem because WordPress does not provide an easy hook for excerpt handling and I would need to literally hack WordPress to get this fixed. I will try to put this on my todo list but in the mean time, you can fix this yourself by manually adding excerpt to those posts affected.
How can I change the location of the logo?
Unfortunately you cannot, by default the logo will show at the top right corner. You might be able to manually add transparent padding to your png logo to shift the logo to where you want it to be, though it is not recommended.
How can I align the video in the middle?
Put the following code into your theme’s stylesheet (for easy way of doing this, see MyCSS):
#player1, #player2, #player3 {text-align: center;}
Is (insert feature name) supported by this plugin?
If you know that a certain feature is supported by JW FLV Player but is not supported by this plugin yet, feel free to make a request. Otherwise, it might be hard for me to provide such functionality especially those related to player’s functionality and appearance.
How can I embed a video from YouTube?
Use the YouTube URL as the file argument when using the embed tags, e.g. [flv:http://youtube.com/watch?v=fLV3MB3DpWN 480 360]
How long will it take for my videos to show up in Google’s search results once I submitted my video sitemap?
Nobody can tell for sure, but Google has definitely started putting video sitemap into action i.e. indexing the flv and including them as search results. Each new video added to the video sitemap can take as little as a day or two to show up in the search results depending on your site’s crawl rate.
I have duplicate/bad entries in my video sitemap?!
Check the post with duplicate entries and manually delete the “flv” custom fields that are either empty or corrupted.
I really like this plugin, what can I do to help?
It will be highly appreciated if you can donate whatever you think this plugin is worth, or you can also spread the love by sharing this hopefully useful plugin with your readers. 
History
1.2 [2009.01.13]
- Fixed: Poster image issues with YouTube embed
1.2 [2008.07.18]
- Upgraded FLV Player to 3.16
- Added: Custom FLV player location support
- Added: YouTube video support
- Added: Google Analytics support
- Added: Video smoothing option
- Added: Show download button option
- Added: Optional raw embed code for RSS
- Changed: Several options in admin panel to be more user friendly
- Fixed: wmode transparency issues
- Fixed: Poster image issues with non FLV files (e.g. mp4)
1.1 [2008.04.22]
- Upgraded FLV Player to 3.14
- Added: New video sitemap appearance
- Added: Auto remove invalid FLV files from custom field during custom field update
- Changed: Admin option panel for WordPress 2.5+
- Fixed: Only published post will be included in the video sitemap
1.0 [2007.12.30]
- Upgraded FLV Player to 3.12
- Added: Admin option panel
- Added: Video sitemap support
- Added: Option to show/hide volume button
- Added: Option to show/hide stop button
- Added: Option to show large control bar for visually impaired users
0.3.2 [2007.05.31]
- Added: Option to show poster image in feeds
0.3.1 [2007.05.19]
- Fixed: Poster path problem
0.3 [2007.05.10]
- Upgraded FLV Player to 3.7
- Switched to SWFObject instead of ufo.js
- Added: Option to show/hide logo with link
- Added: Option to set poster and flv movie path
- Added: Option to show/hide icons
- Added: Option to set volume
- Added: Optional tag parameter for poster path
0.2 [2007.02.16]
- Upgraded FLV Player to 3.5
- Added: Option to show/hide controller bar
- Added: Option to change buffer length
- Added: Option to set overstretch
- Fixed: IE display problem
0.1 [2007.01.09]
- Initial release







{ 112 trackbacks }
{ 506 comments… read them below or add one }
← Previous Comments
Is it possible to get an update with all the tweaks posted here? What I’d like to see especially is the compatibility with the newest JW Player and SWFOBJECT! If the one provided with wordpress is loaded first, flv-embed won’t work anymore..
How should i make description for the video in sitemap what custom field should i use?!
Plugin does NOT work well with newer versions of JW player. I cant somehow disable the download button anymore?
Please help.
Great plugin! Been looking for something like this for ages.
I have been using this plugin for awhile and it works nicely. I still need to figure out how to get the poster frame to show the picture so I don’t have a big black screen for the vistor to look at.
Randy
Great work! Thanks for giving this plugin. Now including flv videos to my blog is so easy.
Cool!! Thanks so much. This plugins’s helpful for me.
Excellent and very easy to use plug in.
I’m stumped on how to use it with a lightbox or thickbox effect? I’m using Shadowbox as my effect and when I try to embed it with the link at rel=”shadowbox” or rel=”Shadowbox” I get a blank screen where the video should be. If I take out the rel statement all woks fine.
Appreciate finding a solution for this. – Thanks.
Hi,
I deselected the “Show download button” but I still see it (also after clearing cache). Is there any other way to prevent downloading. (Changing source of plugin somewhere?)
thanks
Absolutely great plug in! I would like to use it on a website I am designing for a start up company. How much would you ask for me to donate for the license?
Hello,
since wordpress 2.8.4, I think, my videos could not appear any more. I look at the source code in the browser and I saw many html tags like p and br in the javascript code, which display the player :
document.getElementById(”player1″).style.display = “”;
I changed this line in flv_embed.php :
add_filter(’the_content’, ‘flv_parse’, 100);
and the videos came back.
Maybe something to add in the future version ?
I’m getting this error in the middle of the player:
http://onthestreetwithmichaelspotts.com/live-material/
Error #2032
Any ideea what this means?
I have been using FLV embed but the problem is wordpress security sandbox violation in the Player ? What is that now ?
I was unable to get the flv to display in the excerpt until I changed this:
add_filter('the_excerpt', 'flv_excerpt');to this:add_filter('the_excerpt', 'flv_parse');Thanks,
very good plugin. i am now trying to use on my own web blog. thanks
regards,
shahid
First.. Awesome plugin, I have use some other video plugins and by far i think that yours is maybe the best.
Second… the only thing that I have found that is missing is that it won’t work with the function do_shortcode of wordpress, imagine that you want to add a video using a custom field so you cant put it in some other place, is there any way to achieve that?
As I said at the begining, your plugin rocks, but it would rock even more with that functionality :P
Thanks for the Plugin! It work great. I had it run on wordpress 2.8.3
However my category list is still messed-up, did you find a solution yet?
“you can fix this yourself by manually adding excerpt to those posts affected.”
-what/how you mean by this.
TIA
Hi, I’ve added HTTPS support to your plugin. I currently have certain sections of my site that reside within a secure server, and the FLV-Embed plugin automatically calls HTTP, therefore breaking the lock icon.
The function i modified is: flv_make_absolute
Here is the fullfunction code:
function flv_make_absolute($path)
{
$url = parse_url(get_settings(’siteurl’));
// check for SSL
if(preg_match(’/https/i’, $_SERVER['SERVER_PROTOCOL']))
$site = “https://” . $url["host"];
else
$site = “http://” . $url["host"];
if (substr($path,0,1) == ‘/’)
$path = $site . $path;
return $path;
}
Thanks for the very helpful plugin.But i found it isn’t work for wp2.8.2 Please tell me how to do
Thanks
Your plugin works perfectly well. Thanks so much for it. I find especially the options very smart, the logo option and the possibility to preconfigure the video and posterframe directories, which keeps the text between brackets very tiny.
In addition to needing flv playback from posts, I also need a video that is called from my site header. It’s a single video that’s available from the entire site. How can I add this player inside header.php?
Hi
Thank you for this plugin. I have a quastion please , can I use this plugin for videos other than Youtube and hosting? For ex. from Vimeo (http://www.vimeo.com)? I mean video sites sharing?
Thank again
Best regards
Karar
Is there a way to NOT load this on the home page. It doesn’t ever have a flv file on it so there is no need for it to be loaded.
Can you help me out here on where to put something like if is_home() don’t send.
Great Plugin – thank you.
Just wondered if we could add a POSTER to a YouTube Video. I understand that you can have a poster in a different folder but it has to have the same filename as the video.
This is NOT possible with a YouTube video – or am I wrong?
Dave
After upgrading to WP 2.8 I had a problem getting a new FLV to play. It would display the first second or so of the video and then revert to 00:00. I tried deactivating all the plug-ins except FLV Embed and had the same result. Only after deactivating and then re-activating FLV Embed did the flv video display correctly. I’m using a Vostok theme.
Doesnt seem to work in Firefox for me, does anyone have any suggestions?
Thanks in advance!!
Jase
Do I need to create the Custom Fields or the Custom Fields are created automatically. Because I can’t see any custom fields related to the plugin in my Post page. I am using wordpress 2.8. I am embedding Youtube video. Here is a example Page I am talking about.
http://www.newsnidea.com/4703/john-ensign-and-cindy-hampton-affair-news-video/
When I try to create Sitemap it says “No custom field data found!”
Hi Suman, you only get the “Video sitemap built successfully!” message if you try to build the video sitemap when you have no embedded videos published.
All you need to do is make sure that the posts containing embedded video are published – you’ll then be able to build the video site map no problem.
Nice plugin. How about also looking for the meta description fields (”description” custom field) before using the content in flv_fake_excerpt()?
Nothing shows up in my post.
I have also tried to disable all the other plugins to check for conflicts. No positive results.
http://gabrielecripezzi.com/lavoro/tuscan-jewels/tuscan-jewels-promo-video
I’m having the same problem as Randy. I enabled poster frames, made sure the image file was named identical to the video file, but no luck. Then I tried creating a separate poster image folder and giving it that as a relative url. Then as an absolute URL. I simply cannot get a poster image to appear! I’d appreciate any help you can give in this regard.
I’ve tracked down some more info on this problem by looking at the source code, which seems to be spewing out ‘image=demo.flv’ regardless of what is entered in the options for poster images. I went through the plugin source code and found no sign of any variable that was accidentally hardcoded or anything… it all looks like it SHOULD work. I haven’t been able to get any further than this.
thanks very musch
Sorry my apologize … It is working with WP2.8, another plugin make problem.
I think FLV Embed plugin is having problem with WP 2.8… It is not showing video :(
Please, when we can expect update of plugin ?
In order to use the poster frame feature, I had to turn it on which i did. However, I see no image. Where is the player loking for the image? Did you add the preview images and if so where do you add? Do you add them to your host in the same file as the video is located?
Thanks
Randy
Ok. I’ve read all the comments on your site hoping to find my answer but I’m lost.
I got the plug in to work fine in the content area of my wordpress page but it’s a no go when I try to add video in a custom field (which is what I need).
I’m guessing (I know) my problem is related to the actual source index.php page. Problem is I have no idea what kind of coding I should place in the index page to get it to read the custom video field.
I figured out the coding to show images (jpeg, tec.) in a custom field. But I have no clue what code/script is needed in order to have the video embeded. Can someone, anyone PLEASE help. Hours of my life have been lost.
Looking through the code, I realized it’s actually just a different location for the default player. It would be great if the plugin also supported skins.
Thanks for the very helpful plugin. There’s a mistake when when using a custom skin. Instead of replacing the SWFObject() with the new player, it should just add another parameter.
Here’s the corrected code:
s1.addVariable(’skin’, ’skin.swf’);
← Previous Comments