Archive for November 23rd, 2007

Videos not showing? & Mencoder

Friday, November 23rd, 2007

Tutorial for Mencoder - Videos not getting converted

Scripts such as phpmotion, clipshare, vshare etc use mencoder to convert them to .flv format and then they are displayed on your website.

If you have installed your script and the script is not converting your videos to be displayed online, here are few things that you need to check to debug the issue.

1) Ensure the correct paths to ffmpeg and mencoder are configured fine in your script. All our servers have ffmpeg and related modules configured with following paths :

FFmpeg :
/usr/bin/ffmpeg

Mplayer :
/usr/bin/mplayer

Mencoder :
/usr/bin/mencoder

Flvtool2 :
/usr/bin/flvtool2

Php :
/usr/local/bin/php

2) Majority of the youtube clone scripts have a file that consists of mencoder command to convert videos. Below is the name of those files for Phpmotion and Clipshare :

Phpmotion convertor file : convertor.php

Clipshare convertor file : convert.php

If your script is not converting videos for any reason, you might need to edit the file responsible for converting videos as follows :

a) For PHPmotion : Take a backup of your existing convertor.php
Open the existing convertor.php using your favorite text editor and search for the following phrase :

-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop

Simply replace the above phrase with the new phrase as follows :

-ofps 12 -vf

Now find the phrase:

-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

you need to replace with:

-ofps 12

Check if there is no other instance with the phrase:

-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

If there is replace with:

-ofps 12

b) For Clipshare : Take a backup of your existing convert.php
Open the existing convertor.php using your favorite text editor and search for the following phrase :

-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop

Simply replace the above phrase with the new phrase as follows :

-ofps 12 -vf

Check if there is no other instance with the phrase:

-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

If there is replace with:

-ofps 12

c) For any other script such as vshare, etc, you need to find the respective convertor file which comes along with their installation. If you are not sure about the file, you can contact us at support department or contact the script developer to know the exact file name.