Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 4 of 87 FirstFirst ... 234561454 ... LastLast
Results 46 to 60 of 1299
Like Tree10Likes

Thread: YouTube-to-MP3 conversion - PHP class and script

  1. #46
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    any updates on this?

  2. #47
    New to the CF scene
    Join Date
    May 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The reason is the version of PHP. XAMPP use PHP5 while my server use PHP4

    No?

  3. #48
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Vicar View Post
    The reason is the version of PHP. XAMPP use PHP5 while my server use PHP4

    No?
    It's possible that the server you are using is Linux, ffmpeg.exe only works on Windows

  4. #49
    New to the CF scene
    Join Date
    May 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And there is nothing for linux?

  5. #50
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts

  6. #51
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hello,

    i am using this script & its working fine till yesteday..but today i got error Error generating MP3 file

    I got this error after 2 month so please tell me you also got this error or this is my server problem?

  7. #52
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,840
    Thanks
    21
    Thanked 157 Times in 148 Posts
    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 my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  8. #53
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I trying with many videos but i got same error.i can't convert single video

    http://www.youtube.com/watch?v=6g6g2mvItp4
    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; 07-22-2011 at 09:26 AM.

  9. #54
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,840
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by expertmac View Post
    I trying with many videos but i got same error.i can't convert single video

    http://www.youtube.com/watch?v=6g6g2mvItp4
    this url i trying
    I was able to convert the video at that URL (the Maroon 5 song)...

    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 my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  10. #55
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i found error in error log:
    [22-Jul-2011 16:07:22] PHP Fatal error: Maximum execution time of 1 second exceeded in /home/user/public_html/YouTubeToMp3Converter.class.php on line 78

    waiting for your reply

  11. #56
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,840
    Thanks
    21
    Thanked 157 Times in 148 Posts
    http://www.php.net/manual/en/info.co...execution-time

    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.

    Quote Originally Posted by chump2877 View Post
    I honestly can't remember why I set that to '0'...
    This must be the reason why: http://www.php.net/manual/en/functio...time-limit.php

    From that URL:

    The maximum execution time, in seconds. If set to zero, no time limit is imposed.
    Whether or not the following 2 lines of code are equivalent in terms of what they accomplish, I'm not sure:

    PHP Code:
    set_time_limit(0);  // or

    ini_set('max_execution_time',0); 
    So you might also try replacing the existing ini_set() call with a set_time_limit() call, as illustrated above.

    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); 
    ...even though this is not made abundantly clear in the PHP manual (at least per my understanding of it)...

    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; 07-22-2011 at 11:08 PM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  12. #57
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  13. #58
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,840
    Thanks
    21
    Thanked 157 Times in 148 Posts
    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
            } 
    Whch means any of the following could be an issue here:

    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 logs
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  14. #59
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hey i just try this script on my another server & there working fine.
    that means problem in my server,so can you give me server requirement then i can check,whats problem in server.

  15. #60
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,840
    Thanks
    21
    Thanked 157 Times in 148 Posts
    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 successfully
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  16. Users who have thanked chump2877 for this post:

    expertmac (07-26-2011)


 
Page 4 of 87 FirstFirst ... 234561454 ... LastLast

LinkBacks (?)

  1. 08-24-2014, 05:09 AM
  2. 07-21-2014, 06:32 PM
  3. 07-12-2014, 06:59 PM
  4. 06-26-2014, 04:39 PM
  5. 05-31-2014, 10:13 PM
  6. 04-24-2014, 08:53 PM
  7. 04-19-2014, 11:22 AM
  8. 04-04-2014, 09:33 PM
  9. 04-04-2014, 02:58 AM
  10. 03-28-2014, 07:03 AM
  11. 03-20-2014, 07:11 PM
  12. 03-16-2014, 02:22 AM
  13. 03-08-2014, 05:56 PM
  14. 03-07-2014, 07:21 PM
  15. 03-01-2014, 01:48 PM
  16. 02-22-2014, 09:40 PM
  17. 02-22-2014, 01:02 AM
  18. 02-21-2014, 09:15 PM
  19. 02-21-2014, 01:00 AM
  20. 02-20-2014, 09:37 PM
  21. 02-20-2014, 07:53 PM
  22. 02-20-2014, 04:21 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •