Generate Flash Videos
Note: This article applies to CARMA versions 1.2.2.x and higher.
For information on changing the default flash player, or showing a flash video on a page other than view_clip.php, please see our Flash Player article.
Setting Up Flash for CARMA
Before you begin setting up CARMA to use flash, make sure the correct path for Flash is set. To do so, check the carma/includes/create_flash.sh file and make sure the correct paths to CARMA and PHP are specified. Once you have ensured that the paths are correct, use the "chmod" PHP command to change the permissions for create_flash.sh and create_flash.php to 755.
You should then check to see if the necessary files for Flash playback are installed. You can do so through the Configuration Admin. Under the "Image/Video Manipulation" section, there will be settings labeled "MENCODER" and "FLVTOOL2". Both of these programs must be installed on your server, and must have the correct path specified in the Configuration Admin.
After you have set the paths to MENCODER and FLVTOOL2, click on the "Video Formats" tab in the Configuration Admin. This will bring up additional options for converting your existing videos to Flash videos.
Next to the video format you wish to allow Flash for, check the "Flash" checkbox. This will allow you to specify the video's scale, bitrate, FPS (Frames Per Second), and its BR (Audio bitrate -- we recommend leaving this setting at 36).
You will then see two action icons-- one marked with two blue arrows, and one marked with two red arrows. The "Generate Flash Video Files" icon (blue arrows) will generate Flash videos for every set in this video format. CARMA generates Flash videos in the background, so that you can keep working while the videos are being converted. The "Re-Generate Flash Videos" icon (red arrows) allows you to re-convert the videos in that file format to Flash.
In order to display videos, you must first make sure that your site_scripts directory contains the flash_player.swf and the swfobject.js files. If you do not see these two files in your site_scripts directory, run the following commands from that directory:
ln -s ../flash/swfobject.js ./swfobject.js ln -s ../flash/player.swf ./flash_player.swf
Note in the above example that the original file here is "player.swf", and the new file is "flash_player.swf". The templates used in CARMA will look for "flash_player.swf", so make sure you change your file.
After you put your new files in site_scripts, you will then need to link them to the specific site where they will be used.
To do so, go to the document root for your members area and run the following command:
ln -s /path/to/carma/site_scripts/* ./
This will update your symbolic links (symlinks) for the specified site, including the new links that are required by Flash.
The final step to complete before you use the Flash player is setting up your templates. If you are creating a new site in CARMA, this should already be set up. However if you are adding Flash capabilities to a site that you have already customized, you may need to make some changes in your view_clip template. You can find this template in the Members Area Templates.
The following code is an example of changes you may need to make to your view_clip template. These are a series of 'elseif' statements in the template, which tell CARMA what to display depending on the video type.