View Single Post
Old 06-21-2012, 10:40 PM   PM User | #362
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by globusut89 View Post
My converter converts only video to mp3,
other formats will not work here its>>www.pepzol.com
Please check and write what is wrong, thanks
I briefly checked your installation, and appears that only YouTube videos are not converting to video formats? I was able to convert Dailymotion to a video format.

1) The first thing you should do is paste your FFmpeg log file here for the failed conversion. Comment out this line:

PHP Code:
unlink($logFile); 
...so that the app does not automatically delete the log file.

2) Open up your site on Firefox and launch Firebug. Switch to the Console tab in Firebug and try to convert a file on your site. After the conversion screen appears, check the Console tab for the AJAX requests being made to ffmpeg_progress.php (the file that makes the conversion progress bar “go”). Each AJAX request is delineated by a plus sign that, when expanded, reveals the AJAX response text for that request.

Your site, when converting a YouTube video to a video format, is asynchronously accessing ffmpeg_progress.php over and over again, to infinity, and returning the same AJAX response text each time: 0 | 0 | 2 | 1. Those numbers correspond to variables defined in ffmpeg_progress.php (log length, percent progress, conversion success, and error, respectively), and they indicate that something is wrong with the conversion.

Open up ffmpeg_progress.php in your favorite script editor. The 1 in the sequence of numbers indicates there is an error. This error corresponds with 1 of 3 failed conditions in ffmpeg_progress.php:

PHP Code:
if (is_file($logFile))   // Does the new/current log file exist? 
if (preg_match('/(Duration: )(\d\d):(\d\d):(\d\d\.\d\d)/i'$log$matches) == 1)   // Was the code able to parse the log file and find the total duration of the video to be converted? 
if ($numTimes 0)   // Was the code able to parse the log file and find the amount of video (time) converted thus far? 
Troubleshoot these conditions by placing additional variables at the end of this line (they must go at the end of the line):

PHP Code:
echo $newLogLength "|" $progress "|" $conversionSuccess "|" $error
For example, to troubleshoot the $logFile variable, you could do the following:

PHP Code:
echo $newLogLength "|" $progress "|" $conversionSuccess "|" $error "|" $logFile
After editing your ffmpeg_progress.php file, return to Firefox and try to convert a file again. Check the Firebug Console tab for the various AJAX responses to see what the $logFile variable (for example) evaluates to. So, you see, in this way, you can debug ffmpeg_progress.php as it is executed by consecutive AJAX requests.

In this way (described above), figure out and isolate what code is failing. Once we know what code is failing, then we can troubleshoot why it is failing.
__________________
Regards, R.J.

Last edited by chump2877; 06-21-2012 at 10:45 PM..
chump2877 is offline   Reply With Quote