any updates on this?
Announcement
Collapse
No announcement yet.
YouTube-to-MP3 conversion - PHP class and script
Collapse
X
-
I just converted a YouTube video successfully, so it's working for me.
What is the URL of the video you are trying to convert?Regards, R.J.
---------------------------------------------------------
Help spread the word! Like our YouTube-to-Mp3 Conversion Script on Facebook !! :-)
[Instructional videos and tutorials are also available on YouTube, Dailymotion, and Vimeo]
Explore all products and services, view demos, review documentation, check prices, and more!
♪♪ …Need Web Hosting For Our YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪
Comment
-
I trying with many videos but i got same error.i can't convert single video
REMASTERED IN HD!Sign up for updates: http://smarturl.it/Maroon5.NewsMusic video by Maroon 5 performing Misery. (C) 2010 A&M/Octone Records#Maroon5 #Misery #...
this url i trying
UPDATE:
I can convert only one Video here this URL: http://www.youtube.com/watch?v=abRmvlSKknc
but other videos cant convert so what a problem?Last edited by expertmac; Jul 22, 2011, 03:26 AM.
Comment
-
Originally posted by expertmac View Post
So if the code is working for me, and I was able to convert a video that you are not able to convert, then I can only assume the problem is with your server setup...
If it was working for you before, then your server setup must have changed recently. I would:
1) Turn error handling on in the code (comment out ini_set('display_errors',0)
2) Check your server error logs
3) Make sure FFmpeg is functional within your server setup
4) Download a fresh copy of FFmpeg
5) Make sure that you can execute commands on the server with PHP's exec()
Also I saw a comment somewhere else in this thread about which PHP version can run this code. Since my code uses PHP 5 OOP, it should be run on PHP 5 or higher.
Good luck!Regards, R.J.
---------------------------------------------------------
Help spread the word! Like our YouTube-to-Mp3 Conversion Script on Facebook !! :-)
[Instructional videos and tutorials are also available on YouTube, Dailymotion, and Vimeo]
Explore all products and services, view demos, review documentation, check prices, and more!
♪♪ …Need Web Hosting For Our YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪
Comment
-
Try adjusting this value:
ini_set('max_execution_time',0);
in my index.php....Or just comment that line out....I honestly can't remember why I set that to '0'...It might be some left over code that I never removed, and possibly an error on my part?
Hope it helps.
Originally posted by chump2877 View PostI honestly can't remember why I set that to '0'...
From that URL:
The maximum execution time, in seconds. If set to zero, no time limit is imposed.
PHP Code:set_time_limit(0); // or
ini_set('max_execution_time',0);
This seems to corroborate that the following lines of code do in fact do the same thing:
PHP Code:set_time_limit(0); // or
ini_set('max_execution_time',0);
Also, you could try adding either of those lines of code to the top of YouTubeToMp3Converter.class.php, since that is where the error occurred for you...Last edited by Inigoesdr; Jul 22, 2011, 05:08 PM.Regards, R.J.
---------------------------------------------------------
Help spread the word! Like our YouTube-to-Mp3 Conversion Script on Facebook !! :-)
[Instructional videos and tutorials are also available on YouTube, Dailymotion, and Vimeo]
Explore all products and services, view demos, review documentation, check prices, and more!
♪♪ …Need Web Hosting For Our YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪
Comment
-
it's converting now but one more error found.
when i start ripping i got error Error downloading video!
can't download many videos but same videos can download & convert succesfully.
So why i geting Error downloading video! even videos are playing fine on youtube.
Comment
-
How experienced are you with PHP? With some knowledge of PHP programming, this shouldn't be that hard to troubleshoot...
The error you are receiving is due to the DownloadVideo() method failing:
PHP Code:function DownloadVideo($youTubeUrl)
{
$file_contents = file_get_contents($youTubeUrl);
if ($file_contents !== false)
{
$this->SetSongFileName($file_contents);
$this->SetFlvUrl($file_contents);
if ($this->GetSongFileName() != '' && $this->GetFlvUrl() != '')
{
return $this->SaveVideo($this->GetFlvUrl());
}
}
return false;
}
1) You have entered an invalid YouTube URL into the application
2) The regex used to obtain the FLV file name is not working
3) The regex used to extract the song name is not working
But before you start investigating those possibilities, you should do as I said earlier for your previous problem:
1) Turn error handling on in the code (comment out ini_set('display_errors',0)
2) Check your server error logsRegards, R.J.
---------------------------------------------------------
Help spread the word! Like our YouTube-to-Mp3 Conversion Script on Facebook !! :-)
[Instructional videos and tutorials are also available on YouTube, Dailymotion, and Vimeo]
Explore all products and services, view demos, review documentation, check prices, and more!
♪♪ …Need Web Hosting For Our YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪
Comment
-
compare the php.ini of one server to the other...You could also download XAMPP and check the default PHP configuration there...I run the app inside XAMPP successfullyRegards, R.J.
---------------------------------------------------------
Help spread the word! Like our YouTube-to-Mp3 Conversion Script on Facebook !! :-)
[Instructional videos and tutorials are also available on YouTube, Dailymotion, and Vimeo]
Explore all products and services, view demos, review documentation, check prices, and more!
♪♪ …Need Web Hosting For Our YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪
Comment
Comment