Results 1 to 3 of 3

Thread: file conversion error

  1. #1
    Join Date
    Mar 2010
    Posts
    11

    Default file conversion error

    hello, i am getting a file conversion error. when i upload a flv video, it works fine and plays, but when any other format, the video fails to convert. here is a log of one of the mp4 file i tried to convert.
    i tried some of the methods posted in other threads, but none worked.
    any help would be appreciated. thanx.

    2010-03-05 5:07:32 <h1>STARTING VIDEO CONVERSION (process_queue.id = 15)</h1>

    2010-03-05 5:07:32 <p>File: /home/cmehire/public_html/video/14012010037_1.mp4</p>

    2010-03-05 5:07:32 <p>$file_extn = mp4</p>

    2010-03-05 5:07:32 <p>$re_process_vid = 0</p>

    2010-03-05 5:07:32 <p>$rand_flv_name = 12677656502040159875.mp4</p>

    2010-03-05 5:07:32 <hr /><p>sql</p><p>UPDATE `videos` SET `video_folder`='4ca4238a0b/' WHERE
    `video_id`=15</p>

    2010-03-05 5:07:32 <hr /><p>UPDATE `process_queue` SET
    `vid`='15' WHERE
    `id`='15'</p><hr />

    2010-03-05 5:07:32 <p>Video id: 15</p>

    2010-03-05 5:07:32 Video Output File Name : /home/cmehire/public_html/flvideo/4ca4238a0b/12677656502040159875.mp4

    2010-03-05 5:07:32 <p>$video_flv = Video Output File Name : /home/cmehire/public_html/flvideo/4ca4238a0b/12677656502040159875.mp4</p>

    2010-03-05 5:07:32 Find video duration - START

    2010-03-05 5:07:32 <p>Bit Rate (ffmpeg-php): 561.423</p>

    2010-03-05 5:07:32 <p>Duration (ffmpeg-php): 53.2</p>

    2010-03-05 5:07:32 DURATION: 00:5320

    2010-03-05 5:07:32 <h2>Create Thumbnail - START</h2>

    2010-03-05 5:07:33 <p>Create Thumbnail with ffmpeg-php - END</p>

    2010-03-05 5:07:33 <p>$cmd_convert_v = convert_mp4</p>

    2010-03-05 5:07:33 <p>506 $cmd_convert = /usr/bin/ffmpeg -i '/home/cmehire/public_html/video/14012010037_1.mp4' -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -b 561.423k /home/cmehire/public_html/flvideo/4ca4238a0b/12677656502040159875.mp4</p>

    2010-03-05 5:07:33 <hr /><pre></pre><hr />

    2010-03-05 5:07:33 <p>Return value: </p>

    2010-03-05 5:07:33 <p>UPDATE `process_queue` SET
    `status`='6' WHERE
    `id`='15'</p>

    2010-03-05 5:07:33 <p><b>ERROR: failed video conversion.</b></p>

    2010-03-05 5:12:48 <h1>STARTING VIDEO CONVERSION (process_queue.id = 15)</h1>

    2010-03-05 5:12:48 <p>File: /home/cmehire/public_html/video/14012010037_1.mp4</p>

    2010-03-05 5:12:48 <p>$file_extn = mp4</p>

    2010-03-05 5:12:48 <hr /><p>SELECT * FROM `videos` WHERE
    `video_id`=15</p><hr />

    2010-03-05 5:12:48 <p>Video id: 15</p>

    2010-03-05 5:12:48 Video Output File Name : /home/cmehire/public_html/flvideo/4ca4238a0b/12677656502040159875.mp4

    2010-03-05 5:12:48 <p>$video_flv = Video Output File Name : /home/cmehire/public_html/flvideo/4ca4238a0b/12677656502040159875.mp4</p>

    2010-03-05 5:12:48 Find video duration - START

    2010-03-05 5:12:48 <p>Bit Rate (ffmpeg-php): 561.423</p>

    2010-03-05 5:12:48 <p>Duration (ffmpeg-php): 53.2</p>

    2010-03-05 5:12:48 DURATION: 00:5320

    2010-03-05 5:12:48 <h2>Create Thumbnail - START</h2>

    2010-03-05 5:12:52 <p>Create Thumbnail with ffmpeg-php - END</p>

    2010-03-05 5:12:52 <p>$cmd_convert_v = convert_mp4</p>

    2010-03-05 5:12:52 <p>506 $cmd_convert = /usr/bin/ffmpeg -i '/home/cmehire/public_html/video/14012010037_1.mp4' -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -b 561.423k /home/cmehire/public_html/flvideo/4ca4238a0b/12677656502040159875.mp4</p>

    2010-03-05 5:12:53 <hr /><pre></pre><hr />

    2010-03-05 5:12:53 <p>Return value: </p>

    2010-03-05 5:12:53 <p>UPDATE `process_queue` SET
    `status`='6' WHERE
    `id`='15'</p>

    2010-03-05 5:12:53 <p><b>ERROR: failed video conversion.</b></p>

  2. #2
    Join Date
    Mar 2010
    Posts
    11

    Default

    an update...
    this is the video_conversion.php im using...

    <?php

    # For old version of mplayer
    # $cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es";
    # $cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -af resample=22050:0:0 -sws 9 -vf scale=448:-3,expand=448:336 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=500:trell:v4mv:mv0:mbd=2:cbp:a ic:cmp=3:subcmp=3 -oac mp3lame -lameopts abr:br=56:mode=3 harddup";
    # For latest version of mplayer
    #$cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$bit_rate:mbd=2:mv0:trell:v4mv :cbp:last_pred=3 -srate 22050 -ofps 24 -vf harddup";

    $cmd_ffmpeg = "$config[ffmpeg] -i '$video_src' -acodec libmp3lame -ar 22050 -ab 32 -f flv $video_flv";

    //New Mplayer codec
    $cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$bit_rate:mbd=2:mv0:trell:v4mv :cbp:last_pred=3 -srate 22050 -ofps 24 -vf harddup,hqdn3d=2:1:2,scale=640:464";
    //Convert mp4 H264
    $cmd_mp4_h264 = "$config[ffmpeg] -i '$video_src' -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -b " . $bit_rate . "k $video_flv";

    $cmd_all = $cmd_mencoder;

    $convert_3gp = $cmd_all;
    $convert_mp4 = $cmd_mp4_h264;
    $convert_mov = $cmd_all;
    $convert_asf = $cmd_all;
    $convert_mpg = $cmd_all;
    $convert_avi = $cmd_all;
    $convert_mpeg = $cmd_all;
    $convert_wmv = $cmd_all;
    $convert_rm = $cmd_all;
    $convert_dat = $cmd_all;

    i also tried using this code as the conversion code...
    $cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es";

  3. #3
    Join Date
    Sep 2007
    Posts
    906

    Default

    Code:
    /usr/bin/ffmpeg -i '/home/cmehire/public_html/video/14012010037_1.mp4' -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -b 561.423k /home/cmehire/public_html/flvideo/4ca4238a0b/12677656502040159875.mp4
    Look like this convert code is not working on your server. Try running the convert command in command promt and see if it works. If not you need to look into ffmpeg installation. Mostly it is not installed with libx264 needed for mp4 videos.
    vShare Hosting, vShare Installation, Server Setup, Lighttpd streaming, vShare Templates
    [email protected]

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •