Go Back   Video Web Hosting Forums - CirtexHosting Community > CirtexHosting Community > Website Development & Scripting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-14-2009, 03:42 PM
Registered User
 
Join Date: Jun 2009
Posts: 4
Problems with MEncoder, Conversion does not work

All modules are installed, clipshare detects them. I have clipshare 4
MEconder is not converting video files into flv. Uploads are working and I can see thumbnails being generated. so its not a mplayer issue either.
After uploading I get a uploading was success msg and when i try to play the video. it does not play.

I manually tried not converting videos with command life, after that clipshare is playing them normally.

here is my convert.php
PHP Code:
<?php
require('include/config.php');
require(
'include/function.php');

// Get arguments from the argv array
$vdoname $_SERVER['argv']['1'];
$vid $_SERVER['argv']['2'];
$ff $_SERVER['argv']['3'];

if( ( 
$vdoname != '' ) && ( $vid != '' ) && ( $ff != '') ) {
    
$ext                strtolower(substr($vdonamestrrpos($vdoname'.') + 1));
    
$ofps               = ( $ext == 'wmv' ) ? '-ofps 25000/1001' NULL;
    
$mencoder_version   '1.0rc1';
    
exec($config['mencoder'], $mencoder_check);
    if ( isset(
$mencoder_check['0']) ) {
        if ( !
strstr($mencoder_check['0'], 'MEncoder 1.0rc1') ) {
            
$mencoder_version '1.0rc2';
        }
    }
    
$options            = ( $mencoder_version == '1.0rc1' ) ? '-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames' NULL;

if(
$config[vresize] == 1) {$encodecommand="$config[mencoder] $config[vdodir]/$vdoname -o $config[flvdodir]/".$vid."x.flv -demuxer lavf -of lavf -oac

mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$config[vbitrate]:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last _pred=3 -vf

scale=$config[vresize_x]:$config[vresize_y] -srate $config[sbitrate]"
;}

        
log_conversion($config['LOG_DIR']. '/' .$vid'.log'$encodecommand);

        
$ext strtolower(substr($vdonamestrrpos($vdoname'.') + 1));
        if ( 
$config['vresize'] != && $ext == 'flv' )
                
copy($ff$config['FLVDO_DIR']. '/' .$vid'x.flv');
        else
                
exec($encodecommand' 2>&1'$output);

        
log_conversion($config['LOG_DIR']. '/' .$vid'.log'implode("\n"$output));

        
//update flv metatags
        
exec($config['metainject']. ' -Uv ' .$config['FLVDO_DIR']. '/' .$vid'x.flv ' .$config['FLVDO_DIR']. '/' .$vid'.flv');

        
//remove temporary
        
@unlink($config['FLVDO_DIR']. '/' .$vid'x.flv');

        
//create thumbnails
        
video_to_frame($ff$vid);

        
//delete log if conversion was successfuly
        
if ( file_exists($config['FLVDO_DIR']. '/' .$vid'.flv') && filesize($config['FLVDO_DIR']. '/' .$vid'.flv') > 10 )
                @
unlink($config['TMP_DIR']. '/logs/' .$vid'.log');

        
//delete original video
        
if($config['del_original_video'] == 1)  {
                if(
filesize($config['FLVDO_DIR']. '/' .$vid'.flv') > 100 && file_exists($config['FLVDO_DIR']. '/' .$vid'.flv')) {
                        
$del_upvid $config['VDO_DIR']. '/' .$vdoname;
                        @
chmod($del_upvid0777);
                        @
unlink($del_upvid);
                }
        }
exec($config['mencoder'], $mencoder_check);
    if ( isset(
$mencoder_check['0']) ) {
        if ( !
strstr($mencoder_check['0'], 'MEncoder 1.0rc1') ) {
            
$mencoder_version '1.0rc2';
        }
    }
    
$options            = ( $mencoder_version == '1.0rc1' ) ? '-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames' NULL;

if(
$config[vresize] == 1) {$encodecommand="$config[mencoder] $config[vdodir]/$vdoname -o $config[flvdodir]/".$vid."x.flv -demuxer lavf -of lavf -oac

mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$config[vbitrate]:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last _pred=3 -vf

scale=$config[vresize_x]:$config[vresize_y] -srate $config[sbitrate]"
;}

        
log_conversion($config['LOG_DIR']. '/' .$vid'.log'$encodecommand);

        
$ext strtolower(substr($vdonamestrrpos($vdoname'.') + 1));
        if ( 
$config['vresize'] != && $ext == 'flv' )
                
copy($ff$config['FLVDO_DIR']. '/' .$vid'x.flv');
        else
                
exec($encodecommand' 2>&1'$output);

        
log_conversion($config['LOG_DIR']. '/' .$vid'.log'implode("\n"$output));

        
//update flv metatags
        
exec($config['metainject']. ' -Uv ' .$config['FLVDO_DIR']. '/' .$vid'x.flv ' .$config['FLVDO_DIR']. '/' .$vid'.flv');

        
//remove temporary
        
@unlink($config['FLVDO_DIR']. '/' .$vid'x.flv');

        
//create thumbnails
        
video_to_frame($ff$vid);

        
//delete log if conversion was successfuly
        
if ( file_exists($config['FLVDO_DIR']. '/' .$vid'.flv') && filesize($config['FLVDO_DIR']. '/' .$vid'.flv') > 10 )
                @
unlink($config['TMP_DIR']. '/logs/' .$vid'.log');

        
//delete original video
        
if($config['del_original_video'] == 1)  {
                if(
filesize($config['FLVDO_DIR']. '/' .$vid'.flv') > 100 && file_exists($config['FLVDO_DIR']. '/' .$vid'.flv')) {
                        
$del_upvid $config['VDO_DIR']. '/' .$vdoname;
                        @
chmod($del_upvid0777);
                        @
unlink($del_upvid);
                }
        }

        
// Delete Tmp Files
        
$picA $config['TMP_DIR']. '/thumbs/' .$vid'/00000001.jpg';
        
$picB $config['TMP_DIR']. '/thumbs/' .$vid'/00000002.jpg';
        
$picC $config['TMP_DIR']. '/thumbs/' .$vid'/00000003.jpg';
        
$picD $config['TMP_DIR']. '/thumbs/' .$vid'/00000004.jpg';
        if(
file_exists($picA)) @unlink($picA);
        if(
file_exists($picB)) @unlink($picB);
        if(
file_exists($picC)) @unlink($picC);
        if(
file_exists($picD)) @unlink($picD);

        @
rmdir($config['TMP_DIR']. '/thumbs/' .$vid);
}
?>
Disclaimer: I am not hosted with cirtex but since clipshare is not repling to requests. I came here through google. It would good if anyone could help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-14-2009, 05:41 PM
Registered User
 
Join Date: Jul 2007
Posts: 272
i find this :Please check if you have the PHP CLI package installed, also check the configuration for PHP cli (not the apache module) if safe_mode or open_basedir are enabled.please check to make sure FFmpeg and Mencoder are properly installed on your server. also check this path from your siteadmin>>Media Settings>> /usr/local/bin/mencoder remove /local from MPlayer Path, Mencoder Path, FFMpeg Path. Save and try to re upload. if it does not converts.
look error log maybe its say something

Regards
Nocom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-15-2009, 03:06 AM
Registered User
 
Join Date: Jun 2009
Posts: 4
Hi,
PHP cli is installed

here is the output of system check
Code:
FLVIDEO Directory
writable (0777) (/home/xxxx/public_html/flvideo)

VIDEO Directory
writable (0777) (/home/xxxx/public_html/video)
THUMBS Directory
writable (0777) (/home/xxxx/public_html/thumb)
CHANNEL Directory
writable (0777) (/home/xxxx/public_html/chimg)
PHOTO Directory
writable (0777) (/home/xxxx/public_html/photo)
TMP Directory
writable (0777) (/home/xxxx/public_html/tmp)

Safe Mode
 
Open Basedir
 

Maximum Upload Filesize
200M (max_upload_filesize)
Maximum Post Filesize
200M (max_post_size)

PHP CLI
found (/usr/bin/php)
MEncoder
found (/usr/bin/mencoder)
MPlayer
found (/usr/bin/mplayer)
FFMpeg
found (/usr/bin/ffmpeg)
FLVTool2
found (/usr/bin/flvtool2)

JPEG Support
found (/usr/lib/libjpeg.so.62 (0xb7eb2000))
LAME Support
found (/usr/local/lib/libmp3lame.so.0 (0xb7f47000))
XVID Support
missing ()
THEORA Support
found (/usr/local/cpffmpeg/lib/libtheora.so.0 (0xb7f0d000)
X264 Support
found (/usr/local/cpffmpeg/lib/libx264.so.59 (0xb7df9000))
FAAC Support
found (/usr/local/lib/libfaac.so.0 (0xb7dd1000))
As you can see there is no local in MPlayer Path, Mencoder Path, FFMpeg path

I checked the tmp/logs dir. there are only mplayer logs related to thumbnail generation. can't find MEconder logs for conversion process.


Here is my phpinfo() that i copied from that server. see if gives any info

http://gaurishsharma.com/phpinfo.htm

I have removed sitename from it for privacy reasons

Last edited by Gary4gar; 06-15-2009 at 03:19 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-15-2009, 07:18 AM
Registered User
 
Join Date: Jul 2007
Posts: 272
I mean server log from Cpanel error log
try to convert then look Error log from Cpanel or whatever

Look like everything is OK but sometimes ClipShare depend on server background services, what is the answer from your hosting support?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-15-2009, 10:13 AM
Registered User
 
Join Date: Jun 2009
Posts: 4
Where do i find Cpanel log? and its a Unmanaged VPS so no software support.

[edit]
I checked in /usr/local/cpanel/logs/error_log its empty got any other ideas?

Two things i am looking at
* missing XVID Support
* ffmpeg-php gd support disabled

However, I myself installed from source.

Code:
root@server [~]# ldconfig -v |grep xvid
        libxvidcore.so.4 -> libxvidcore.so.4.1
        libxvidcore.so.4 -> libxvidcore.so.4.2

root@server [~]# php -i | grep ffm
ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.5.3.1
ffmpeg-php gd support  => disabled
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0
any idea what causing videos not to be converted

Last edited by Gary4gar; 06-15-2009 at 10:29 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-15-2009, 04:26 PM
Registered User
 
Join Date: Jul 2007
Posts: 272
Nop
i dont have clipshare installed right now
Fastest way is to pay guys from clip share 25 bucks for install .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:40 AM.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17