Hi globusut89, you use a host or vps, and its in pacifichost.com or other?
Hi globusut89, you use a host or vps, and its in pacifichost.com or other?
1) The first thing you should do is paste your FFmpeg log file here for the failed conversion. Comment out this line:
...so that the app does not automatically delete the log file.PHP Code:
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:
Troubleshoot these conditions by placing additional variables at the end of this line (they must go at the end of the line):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?
For example, to troubleshoot the $logFile variable, you could do the following:PHP Code:
echo $newLogLength . "|" . $progress . "|" . $conversionSuccess . "|" . $error;
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.PHP Code:
echo $newLogLength . "|" . $progress . "|" . $conversionSuccess . "|" . $error . "|" . $logFile;
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.
Yes its right, dailymotion video convert properly.
1) I don't think you have the latest stable release of FFmpeg. The top of your log file says:
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.Code:
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
2) This line in the log file:
...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:
swScaler: Unknown format is not supported as input pixel format
...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?Code:
Stream #0.0(eng): Video: 0x0000, 1920x1080, PAR 1:1 DAR 16:9, 1k fps, 29.97 tbr, 1k tbn, 1k tbc
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?Code:
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
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.
Hi, can you let me know which link I should download for ffmpeg
the yum update stuff does not work with my server so I will have to manually get the link.
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.
I found a reference to that here: http://git.libav.org/?p=libav.git;a=...767f8fd5369859Code:
ffmpeg version 0.7.3-4:0.7.3-0ubuntu0.11.10.1, Copyright (c) 2000-2011 the Libav developers
Link to files distribution appears to be this: http://git.libav.org/?p=libav.git;a=...5369859;sf=tgz
Hi, I'm running into the following problem now do you know what this can be about
php: symbol lookup 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:
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.Code:
Also, I failed to ask why this is the case:
...so why do you have to build ffmpeg from source?Quote:
the yum update stuff does not work with my server
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:
here its line 114Code:
PHP Warning: Division by zero in /home/pepzolco/public_html/VideoConverter.class.php on line 114
$percent = round($downloaded/$downloadSize, 2) * 100;
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.
Does your script support using proxy to connect to youtube?
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?
Hi, just wondering how much cpu and memory this script uses? Does it use a good amount?
Lets say we are getting hit by 20 downloads every minute or 1000 a day or something.
My server specs:
2.0ghz quad core
has many other sites on it also.
Do let me know.