Originally Posted by belgin fish
I'm having a small issue as well, I've searched the thread and can't seem to find a solution.
Everything is converted just fine, although the progress bar is not working. It just stays at Converting video. . . and shows no progress. The video file also isn't deleted after the conversion is done so I'm assuming I'm running into an issue with ffmpeg_progress.php being executed, any ideas?
I can confirm that there is an issue here with the free version of my software. After discussing this with you via Skype, it is apparent that some Linux OS's and/or different versions/variations of FFmpeg can cause FFmpeg log files (produced during media file conversions) to be formatted in different ways.
My app's conversion progress bar relies on repeatedly reading and parsing FFmpeg log files in order to determine conversion progress. So, if the code used to parse the log files comes across a new log file format, then this will confuse code that was not programmed to recognize the additional format.
Thus, I will update the free version of my app
to recognize variations in FFmpeg log file formatting. The only code to change is in ffmpeg_progress.php, and the relevant excerpt of code is as follows:
if (preg_match('/(Duration: )(\d\d):(\d\d):(\d\d\.\d\d)/i', $log, $matches) == 1)
$totalTime = ((int)$matches * 60 * 60) + ((int)$matches * 60) + (float)$matches;
$numTimes = preg_match_all('/(time=)(.+?)(\s)/i', $log, $times);
if ($numTimes > 0)
$lastTime = end($times);
if (preg_match('/(\d\d):(\d\d):(\d\d\.\d\d)/', $lastTime, $timeParts) == 1)
$lastTime = ((int)$timeParts * 60 * 60) + ((int)$timeParts * 60) + (float)$timeParts;
$currentTime = (float)$lastTime;
$progress = round(($currentTime / $totalTime) * 100);
if ($progress < 100 && preg_match('/muxing overhead/i', $log) != 1)
$newLogLength = $file_size;
$progress = 100;
if (is_file(realpath(Config::_TEMPVIDDIR . $uniqueId .'.flv')))
unlink(realpath(Config::_TEMPVIDDIR . $uniqueId .'.flv'));
if (is_file(realpath(Config::_SONGFILEDIR . $mp3File)))
$conversionSuccess = 1;
I will post the latest files distribution for the free version of my app shortly. Stay tuned....