Last updated April 10, 2009. Created on October 30, 2007.
Edited by bsherwood, bryan kennedy, GregoryHeller, taylesia. Log in to edit this page.

Because YouTube uses the Flash video file format (FLV), you can use the swftools module and jw_media_player to create similar functionality (you need to convert your video files to FLV first. If you want the server to convert all files to FLV, you could use the FlashVideo module).

(modified from http://drupal.org/node/181998)

1. Download: http://ftp.drupal.org/files/projects/swftools-5.x-1.x-dev.tar.gz
2. Before you copy the module to your sites directory, change line 656 as follows:

Adding

$encoded = str_replace('%3A/%252F', '://', $encoded);

to

<?php
function _swftools_get_flashvars_string(&$flashvars) {

  foreach (
$flashvars AS $var => $value) {
   
$flashvars[$var] = str_replace(array('&', '=', '?'), array('%26', '%3D', '%3F'), $value);
  }
 
$encoded = drupal_query_string_encode($flashvars);

 
// '#' seems to encode as %2523, reverse this, using a more robust hex prefix..
 
$encoded = str_replace('%2523', '0x', $encoded);

 
// '://' seems to encode as %3A/%252F, reverse this back to '/'
$encoded = str_replace('%3A/%252F', '://', $encoded);

  return
$encoded;
?>

3. Install the Flash Node module or use input filter.
4. Download Jeroen Wijerings Flash media player here:
http://www.jeroenwijering.com/?item=JW_Media_Player
(You only need one file mediaplayer.swf)
Unzip it and rename the folder from jw_media_player to flash_media_player and place the folder in the following directory
http://youraddress/modules/swftools/shared/

The directories should now look like this, just to be sure:
http://youraddress/modules/swftools/shared/flash_media_player

5. Configure
/admin/media/swf/generic
Important: check "Autostart FLV for Generic Player." Even if you used the Wijering media player, you need to select this, otherwise it will not work.

/admin/media/swf/handling
Use Flash Media Player - Jeroen Wijering for all

/admin/media/swf/embed
Under "JavaScript Embedding," make sure these two are checked:
*Embed Flash Directly, don't use JavaScript replacement.
*All pages.

Check here for more info: http://www.thanhsiang.org/faqing/node/84

There are several other modules for Drupal that can help you host video:

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

bukem’s picture

the ipad or iphone does not play flash ... oh no

johnprashath’s picture

Hi bukem,

Generally many video players uses Adobe Flash Technology to deliver the Video over internet. But still the mobile devices doesn't have support for Adobe Flash. So, we are in hurry to look for the alternative to deliver the video over it. While HTML5 video is still very early in its development, It is a Good News that most of the Mobile Devices support HTML5 tag. So, flash video player need support for HTML5 fallback for Mobiles. please check HD Webplayer (www.hdwebplayer.com). It is support mobile devices by html5 fallback technology.

All you need to make your video to be compatible with IDevices is just encoding it with right codec. HD Webplayer Embedding Mechanism automatically detects the Mobile Devices and creates the fallback in HTML5.

bukem’s picture

Cheers johnprashath will look into that