Adding new video format¶
If your server can convert a video to FLV format, vshare can support that video format.
By default vshare use mencoder to do the video converson to FLV format, this support a limit set of video formats.
To add new file format (extension), you need to edit following files.
- /cgi-bin/uu_default_config.pm
- /include/settings/uu_conlib.php
- /include/settings/upload.php
- /include/settings/video_conversion.php
For example we need to add a new video extension .mp5, then you need to do the following.
'''Edit upload.php'''
Find the line
$file_types = array("flv","3gp","mp4","mov","asf","mpg","avi","mpeg","wmv","rm","dat","divx");
Add new file extension like
$file_types = array("flv","3gp","mp4","mov","asf","mpg","avi","mpeg","wmv","rm","dat","divx","mp5");
'''Edit uu_conlib.php'''
Find
$allow_extensions = '/(3gp|3gpp|mpg|mpeg|mp4|mpeg4|avi|wmv|flv|mov|asf|qt|divx|rm)$/i';
Replace with
$allow_extensions = '/(3gp|3gpp|mpg|mpeg|mp4|mpeg4|avi|wmv|flv|mov|asf|qt|divx|rm|mp5)$/i';
'''Edit uu_default_config.pm'''
Find
allow_extensions => '(3gp|mp4|mov|asf|avi|flv|wmv|mpg|mpeg|mpeg4|xvid|divx|3gpp|rm)',
Replace With
allow_extensions => '(3gp|mp4|mov|asf|avi|flv|wmv|mpg|mpeg|mpeg4|xvid|divx|3gpp|rm|mp5)',
'''Edit video_conversion.php'''
Add new line at end like
$convert_mp5 = "CONVERT COMMAND HERE";
CONVERT COMMAND HERE is the command that can convert the new video format to FLV format.