DVD-Guides.com Forum

Guides => User Guides => Topic started by: JasmineT on October 30, 2008, 03:00:42 AM



Title: How to Set up Video Codecs on Linux Server (PHP)
Post by: JasmineT on October 30, 2008, 03:00:42 AM
Video sharing sites are now really hot. To build your own video sharing site is not so hard. Here we will guide you to use PHP to create a video hosting site on Linux Apache server step by step, and customize a Flash video player for this video sharing site.

(http://www.sothinkmedia.com/images/fveclinux/fvec-linux.jpg)

Who may need this article:
If you have interest on running your video hosting services, you wanna create your own video sharing site on Linux server with thousands upon thousands of visitors and video clips hosted just like YouTube, iFilm, Break or other famous video sharing sites do, this tutorial will tell you how to make the first step.

What’s needed:
• Sothink Video Encoder Engine for Adobe Flash (Linux Version)
• Apache Server
• PHP
• MySQL
• JavaScript
• Sothink Video Encoder for Adobe Flash

This is about:
1. How to build a video hosting site with php
step1 Install Apache Server and PHP
step2 Setup Directories and Files
step3 Configure PHP
step4 Setup MySQL Database
step5 Test Your Web Site


2. Create a Flash video player
step1 Installation of Sothink Video Encoder for Adobe Flash
step2 Create a Flash Video Player
step3 Deploy the Flash Video Player



How to build a video hosting site with php

Step1 Install Apache Server and PHP

Install Apache Server
Please download the Apache server from the Apache Software Foundation and follow this document to know how to install, configure and run Apache under Linux.

Install PHP
PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. Please download PHP from http://www.php.net and follow the installation and configuration guide to know how to install and configure PHP.


Step2 Setup Directories and Files
1. Log on to your server with root account.
2. Download Sothink Video Encoder Engine for Adobe Flash (Linux Version) from our Web site. You will get a file named "fvec.tar.gz".
3. Download additional codecs from our Web site. You will get a file named "mencoder.tar.gz".
4. Create a directory "fvec" under /usr/bin:

# mkdir /usr/bin/fvec
5. Extract all the files from fvec.tar.gz and mencoder.tar.gz to the directory /usr/bin/fvec.

# tar xvfz fvec.tar.gz -C /usr/bin/fvec
# tar xvfz mencoder.tar.gz -C /usr/bin/fvec
6. Use the following command to assign execution permission to users:

# chmod 755 /usr/bin/fvec -R
7. Download the PHP source of the demo site from our Web site and you will get a file named "php-demo.tar.gz"; Extract all the files to a sub-folder under your www root, for example, /var/www/html/php-demo.

; Create the directory
# mkdir /var/www/html/php-demo

; Extract the files
# tar xvfz fvec-php-demo.tar.gz -C /var/www/html/php-demo

; Assign permissions
# chmod 777 -R /var/www/html/php-demo

8. To prevent users from uploading executable files to the directory "/var/www/html/php-demo/files" and executing them, please open the file httpd.conf in the conf folder of Apache and insert the following lines to deny the execution of files in this folder.

# vi /etc/httpd/conf/httpd.conf

<Directory /var/www/html/php-demo/files>
    php_flag engine off
</Directory>


Step3 Configure PHP
You should change some php.ini directives to make the demo site work properly. Generally, php.ini is in the directory /etc. The demo site uses some new functions availabe since PHP 4.3. If you use older versions, please upgrade to version 4.3 or later. Please check the PHP configuration document for details.
; Enable file uploading:
file_uploads = On
; Setup the temporary directory used for storing files when doing file upload. The directory must be writable by whatever user PHP is running as.
upload_tmp_dir = /var/tmp

; Maximum allowed size for uploaded files.
upload_max_filesize = 20M
; Maximum size of POST data that PHP will accept. This value should be larger than upload_max_filesize because extra data will be posted while uploading.
post_max_size = 30M
Save php.ini and restart Apache to make the changes take effect.
# /sbin/service httpd restart


From: http://www.sothinkmedia.com/flash-video-encoder-linux/index.htm (http://www.sothinkmedia.com/flash-video-encoder-linux/index.htm)

Step4 Setup MySQL Database
1. Open the file in your browser: http://yourdomain/php-demo/installdb.php
2. Input the server name, user name and password of the of MySQL server.
3. Click install to start the setup process.
If succeeded, a database named "fvec" and a table named "VIDEOS" will be created in MySQL. A file 'db.php' will also be created in the current directory (/var/www/html/php-demo).


Step5 Test Your Web Site
To test the site, please open your browser and navigate to http://yourdomain/php-demo/upload.htm.
If everything goes well, you can upload video files to your server and encode them now. To view our demo site, please visit http://flv-encoder-linux.sothinkmedia.com.

Create a Flash video player

Installation of Sothink Video Encoder for Adobe Flash
After purchasing Sothink Video Encoder Engine for Adobe Flash (Linux Version), you can get Sothink Video Encoder for Adobe Flash Windows GUI version for free. With the Windows GUI version, you can make customized Flash Video Players for general use on your video hosting and sharing server.
System Requirements: Windows 2000 / XP / 2003 / Vista

From: http://www.sothinkmedia.com/flash-video-encoder-linux/index.htm (http://www.sothinkmedia.com/flash-video-encoder-linux/index.htm)

How to install
1. Download Sothink Video Encoder for Adobe Flash from our web site.
2. Extract the ZIP file to your hard disk
3. Run Setup.exe and follow the wizard to install the software.
4. Launch Sothink Video Encoder for Adobe Flash by double-clicking the program icon on your desktop.
5. Enter the registration key to register the software. If you have not get the registration key yet, please send your registration information of Sothink Video Encoder Engine for Adobe Flash (Linux Version) to support@sothinkmedia.com and we will send you the registration key then.

Create a Customized Flash Video Player

1. Launch Sothink Video Encoder for Adobe Flash by double-clicking the program icon on your desktop.
2. Select any video file and click "Next".
3. In the "Encoding preferences" page, change the "Width" and "Height" to desired values, then click Next.

4. In the "Select output folder and files" page, check "Generate SWF" and uncheck "Generate FLV", "Generate HTML" and "Generate thumbnail". Enter "player.swf" as the name of the output SWF file. Select "Get FLV path from a URL variable and play progressively" and enter "flv" as the name of the URL variable. You can also change the playback settings as you like. Click "Next" after done.

5. In the "Select play control skin" page, check "Use a skin" and select a desired skin. You can also specify a color scheme for the skin and adjust the saturation of the color.

6. Click "Next" and a file name "player.swf" will be created in the specified folder.

From: http://www.sothinkmedia.com/flash-video-encoder-linux/index.htm (http://www.sothinkmedia.com/flash-video-encoder-linux/index.htm)




Title: Re: How to Set up Video Codecs on Linux Server (PHP)
Post by: yanrenwen on December 19, 2008, 01:13:42 AM
YouTube Video Converter (http://www.swfflvconverter.com/youtube-video-converter.html) is the most powerful YouTube assistant software in market today. The YouTube FLV Converter can download YouTube videos unlimited simultaneously (a real time saver!); Automatically name the downloaded video the same as the YouTube title; Convert YouTube videos to various video formats, including avi, DivX, XviD, rm, rmvb, MOV, MPEG, MPEG4 AVC, H.264 and WMV, VOB; VCD, SVCD and DVD Format .mpg; Convert download YouTube videos to a format compatible with your favorite portable device, including iPod Video, iPod Touch, iPod Nano, iPhone, Zune, PSP, PDA, Apple TV, as well as video capable MP3 players, 3GP mobile phones, and Pocket PC.
 
The FLV Editor (http://www.flveditor.net/) is an idea solution to edit the FLV files without changing the FLV format. With the FLV Editor, we can clip the video, crop the video, merge the selected FLV files into one, add watermark on the FLV file, add subtitle, customize the video effect, etc. Moreover, the FLV Editor allows us to trim one selected file into several segments and output one FLV video with several output formats. (you can click the above related links to directly reach the related edit description or refer the left navigation)
 
The DVD to iPod Mac Software (http://www.dvdtoipodmacsoftware.com/) also can convert DVD to other popular video formats like: FLV, MPEG1, MPEG2, MP4, 3GP, 3G2, MOV, AVI, MPEG TS/TP (for HD Video), etc. With the DVD to iPod converter for Mac Software, you can freely enjoy your favorite DVD on video iPod, on iPod touch, iPod Video, iPhone, Apple TV, PSP, PS3, Youtube (web), Creative Zen, iRiver PMP, Archos, various video mobile phones and many other digital video and audio players.

Apple TV Converter for Mac (http://www.appletvconverterformac.com/) is a popular and powerful video to Apple TV conversion software on Mac OS (including Mac OS X 10.5 Leopard).
 
We are specilized, professional and reliable website for selling and service.


Title: Re: How to Set up Video Codecs on Linux Server (PHP)
Post by: happy_2009 on December 24, 2008, 01:51:58 AM
FLV Converter Mac  (http://www.flvconvertermac.com/) is a powerful FLV converter for Mac software which can convert FLV video files to all popular video formats and convert FLV to popular audio formats for Mac OS X users. FLV Converter Mac OS X softwrare supports all video popular formats indcluding FLV, MPG, MPEG1, MPEG2, MP4, 3GP, 3G2, MOV, AVI, Mpeg TS/TP (for HD Video), etc. The Mac FLV Converter can also convert FLV to MP3, WAV, OGG, 3GP, AAC and M4A, AC3, APE, etc audio.
Video Converter for Mac  (http://www.videoconvertermac.com/) is powerful Video Converter Mac OS software which allows you convert videos between popular video formats. The easy-to-use Video Converter Mac lets you to enjoy your videos on iPod, PSP, Mobile Phone, Zune, iPhone, Apple TV and MP4/MP3 player. This Video Converter Mac allows you to set the destination, the output files.
DVD Ripper for Mac  (http://www.dvdrippermac.com/) is an ideal solution for ripping your DVD videos to popular Video and Audio formats. It combines the features of Mac DVD Ripper and Mac DVD Audio Ripper, which makes DVD Ripper Mac as a full featured ripping software. DVD Ripper for Mac enables you to Rip DVD to all popular Video formats including AVI, MPEG, MPG, WMV, DIVX, RM, MOV, FLV, 3GP, 3GP2, MP4, MP4 AVC and Audio formats such as MP3, WAV, WMA, AAC, AC3, M4A (AAC), OGG, RA, AU, etc.


Title: Re: How to Set up Video Codecs on Linux Server (PHP)
Post by: happy_2009 on December 25, 2008, 03:14:51 AM
Mac DVD Ripper (http://www.macdvdripper.org/)  is an all-in-one DVD ripper for Mac OS X software. This Mac DVD Ripper is an excellent DVD Decryption tool for Mac users to rip DVD to various video formats (including MP4, AVI, M4V, MOV, 3GP, MPG, FLV) and audio formats (MP3, M4A, AAC, WAV, OGG, APE, etc.) for playback on iPod touch, iPod classic, iPod nano, iPhone, Apple TV, PSP, PS3, Youtube (web), Creative Zen, iRiver PMP, Archos, all kinds of video cell phones and digital video and audio players. The Mac DVD Ripper is what godgious you need to put your DVD movies on your mobile devices.
iPod Converter Mac  (http://www.ipodconvertermac.com/)  is the best Video to iPod converter Mac OS X software for you. With the iPod Converter for Mac you can easily convert popular video formats including FLV, MPEG1, MPEG2, DivX, Xvid, WMV, 3GP, 3G2, MOV, AVI, MPEG TS/TP (for HD Video), etc to iPod compatible MPEG-4 videos. And also it is not only and iPod Video Converter for Mac, but it can convert all popular videos to iPhone, Apple TV, PSP, PS3, Youtube (web), Creative Zen, iRiver PMP, Archos, MP4, various mobile phones and many other digital video and audio players.
iPod to iTunes for Mac  (http://www.ipod-mac.com/ipod-to-itunes-transfer-for-mac.html) is so powerful and easy to use that it can transfer iPod video, iPod music, podcast and TV shows from your iPod or iPhone to iTunes library with great ease. On the other hand, it is also Mac to iPod/iPhone transfer software. The music and videos on your Mac, whose formats are supported by iPod and iPhone including AAC, MP3, MP4, MOV, WAV etc., can be directly transferred to your iPod/iPhone with this software, no need to buy music from iTunes music store.


Title: Re: How to Set up Video Codecs on Linux Server (PHP)
Post by: zhaocaigougou on January 04, 2009, 10:41:44 PM
DRM removal (http://www.drmremoval.biz/) is developed to help you convert DRM protected media, like DRM protected music and DRM protected movies and remove the DRM protection to enjoy them freely. This DRM removal can not only remove DRM protection, but also convert all common unprotected formats, convert DRM video (http://www.drmremoval.biz/convert-drm-video-movies.html), convert DRM music (http://www.drmremoval.biz/convert-drm-music.html), including: WMA, WAV, WMV, M4A, M4P, M4V, M4B, 3GP, AVI, ASF, MP4, MOV, FLV, MP3, AC3, OGG, APE, etc. Innovative record-by-play resolution to remove DRM legally from media files, return you full user rights.