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):
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..
Here's what you can try, in the order that I would try them:
1) I don't think you have the latest stable release of FFmpeg. The top of your log file says:
Code:
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
I'm pretty sure the latest stable release of FFmpeg is at least into version 0.7.x, and the copyright reads 2000-2011? Try updating your FFmpeg to the latest stable release, and see if that fixes your problems.
2) This line in the log file:
Code:
swScaler: Unknown format is not supported as input pixel format
...implies that the video track/stream of the video is encoded using a codec that FFmpeg doesn't recognize. And, in fact, the input video track/stream:
Code:
Stream #0.0(eng): Video: 0x0000, 1920x1080, PAR 1:1 DAR 16:9, 1k fps, 29.97 tbr, 1k tbn, 1k tbc
...doesn't even list a codec (that I can see). Kind of strange, since I assume YouTube generally re-encodes all videos that are uploaded to the site using some FFmpeg-compatible codec?
Does this happen for all YouTube videos, or do some YouTube videos convert OK (to video formats)?
3) The problem _might_ have something to do with this line in the log as well:
Perhaps FFmpeg is looking at the video container instead of the video track/stream (with regard to a video codec), and that's why FFmpeg can't find a video codec?
Sorry I can't give you a more cut-and-dry solution to your problem here. The truth is, I'm not really sure what the problem is just by looking at the log file. Try updating FFmpeg first, and then we can analyze subsequent log files if the problem persists.
I can not do update ffmpeg, because I have shared hosting.
I contacted the help of pacifichost, they wrote that i should ordered a vps, since the shared hosting may have problem in with convert.
May u have script, which convert but to only mp3 format ?
anyway thanks for your help.
Hi, I'm running into the following problem now do you know what this can be about
php: symbol lookup error:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so: undefined
symbol: avcodec_init
Looks like some kind of installation/compilation error.
1) Did you completely remove the existing version of ffmpeg before installing a new version? Did you install multiple versions of some other software on the server?
2) Have you added the following line to your php.ini:
Code:
extension=ffmpeg.so
3) Does the file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so exist? If so, paste the contents of the file.
Also, I failed to ask why this is the case:
Quote:
the yum update stuff does not work with my server
...so why do you have to build ffmpeg from source?
When trying to convert YouTube to MP3 I do not see first step
when video is download 1..50..100%%.
I just see second step when video is convert 1...40...100%
Why can not I see the first step ?
and i got error log:
Code:
PHP Warning: Division by zero in /home/pepzolco/public_html/VideoConverter.class.php on line 114
When trying to convert YouTube to MP3 I do not see first step
when video is download 1..50..100%%.
I just see second step when video is convert 1...40...100%
Why can not I see the first step ?
You have modified the code, so I don't know why the code is no longer working for you. How could I know? The original code does not do that.
That said, the download of the video is still occurring, because you can see it in the browser source code. Perhaps you deleted a flush() somewhere, which is required to flush the output buffer during the download process so that the download progress bar is visible.
It's also possible that you have an extremely fast download speed, downloading the video from YouTube to your server. In which case, the video is downloaded before the download progress bar has a chance to display.
Quote:
Originally Posted by globusut89
and i got error log:
Code:
PHP Warning: Division by zero in /home/pepzolco/public_html/VideoConverter.class.php on line 114
That warning is irrelevant, and not the source of your problem. It is a harmless side effect of calculating the percentages for the progress bar. If you have disabled PHP error reporting, which you should (and it is disabled, by default), then PHP warnings like that will not be displayed in the browser.
Does your script support using proxy to connect to youtube?
Neither of the versions of my app (free or paid-for version) currently includes proxy functionality, but I have programmed this before using the Tor project. Tor, in general, leverages a large proxy network that enables you to anonymize your IP address and location while surfing the internet. You can install it on Linux and take advantage of the command line interface provided to programmatically (and anonymously) connect to YouTube via the Tor proxy network. (You need to create a socket connection to the Tor proxy first -- to establish a new identity -- before connecting to YouTube via cURL to download a video, if I recall correctly.)
The problem with proxies (any proxy network) is that they are notoriously slow. So the download times of your videos will suffer, and that inconvenience will be passed on to the consumer of your website/application.
If the demand for proxy connections to YouTube becomes great, I might add this feature to my app here. Can I ask exactly why you need to use a proxy to connect to YouTube?