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 2 of 85 FirstFirst 12341252 ... LastLast
Results 16 to 30 of 1275
Like Tree8Likes

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

  1. #16
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, i solved this and I feel kind of dumb because it was so simple...
    In plesk go to your domain -> setup -> and run PHP as ISAPI

    anyways, i was looking up for solution for
    Error in my_thread_global_end(): 1 threads didn't exit
    and i got two birds in one hit

  2. #17
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anyone know why I can get "Error generating MP3 file!".?

  3. #18
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,830
    Thanks
    21
    Thanked 157 Times in 148 Posts
    YouTube recently made some changes to the front end of their web site. As a result, a very minor tweak to my class code is required to keep it working properly.

    The following code in the SetFlvUrl() method in YouTubeToMp3Converter.class.php:

    PHP Code:
            private function SetFlvUrl($file_contents)
            {
                
    $vidUrl '';
                if (
    eregi('fmt_url_map',$file_contents))
                {
                    
    $vidUrl end(explode('&fmt_url_map=',$file_contents));
                    
    $vidUrl current(explode('&',$vidUrl));
                    
    $vidUrl current(explode('%2C',$vidUrl));
                    
    $vidUrl urldecode(end(explode('%7C',$vidUrl)));
                }
                
    $this->_flvUrl $vidUrl;
            } 
    ...needs to change like so:

    PHP Code:
            private function SetFlvUrl($file_contents)
            {
                
    $vidUrl '';
                if (
    eregi('fmt_url_map',$file_contents))
                {
                    
    $vidUrl end(explode('fmt_url_map=',$file_contents));
                    
    $vidUrl current(explode('&',$vidUrl));
                    
    $vidUrl current(explode('%2C',$vidUrl));
                    
    $vidUrl urldecode(end(explode('%7C',$vidUrl)));
                }
                
    $this->_flvUrl $vidUrl;
            } 
    After doing that, everything should work as it has before! (Please notify me if you experience otherwise.)
    Attached Files Attached Files
    Last edited by chump2877; 03-06-2011 at 12:31 AM.
    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 !! ♪♪

  4. #19
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    chump2877 Thank you so much

  5. #20
    Sim
    Sim is offline
    New Coder
    Join Date
    Feb 2009
    Posts
    82
    Thanks
    1
    Thanked 1 Time in 1 Post
    I am having some problems with this class..

    I always get this:

    ...Please wait while I try to convert:

    preview image

    DirtBall Ft Johnny Ritcher-Grind

    Error generating MP3 file!

    http://www.youtube.com/watch?v=_Vt9wlbzt5E

    I look in my video dir and I don't even see teh video file.

    Also, my error log says "[29-Mar-2011 11:58:06] PHP Warning: Module 'ffmpeg' already loaded in Unknown on line 0" not sure if this could be the problem



    Edit again: I commented the delete video line and the video's there. It just doesn't convert for some reason... ;[
    Last edited by Sim; 03-29-2011 at 06:06 PM.
    Online RPG Creator - Create Your Own Online RPG with no programming knoweldge

  6. #21
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,830
    Thanks
    21
    Thanked 157 Times in 148 Posts
    my error log says "[29-Mar-2011 11:58:06] PHP Warning: Module 'ffmpeg' already loaded in Unknown on line 0" not sure if this could be the problem
    The "Error generating MP3 file!" usually is a sign that something is wrong with your FFmpeg installation, and the above error message seems to reinforce that.

    My best guess is that you already have FFmpeg loaded on your server.

    See this forum thread: http://motionmods.com/forum/topic?id=690&p=5467

    Do you have a copy of FFmpeg already installed in the user/bin/ directory? (Also, how are you running PHP -- what is your server configuration?)

    Edit: BTW, I had no problem grabbing the MP3 for that video....
    Last edited by chump2877; 03-30-2011 at 03:04 AM.
    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 !! ♪♪

  7. #22
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I am using this script but how can download mp3 file from webpage?
    after convert file is stored in mp3 folder but i want download from webpage so how to add link?

    Wating for your reply.


    Thanks for this nice script!

  8. #23
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    Easy: display a link to it and then right-click, save as...

  9. #24
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,830
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by expertmac View Post
    I am using this script but how can download mp3 file from webpage?
    after convert file is stored in mp3 folder but i want download from webpage so how to add link?

    Wating for your reply.


    Thanks for this nice script!
    You could do what kbluhm suggested, or you could try this: http://www.lmgtfy.com/?q=php+prompt+for+download

    You'll find lots of solutions at that link
    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. #25
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Done! thanks for reply...i just add download link & its works thanks again

  11. #26
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    someone has an idea on Linux version ?

  12. #27
    New Coder
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hello,
    i am using this script...its work fine but i want add one more feature.I want add ID3 editor can you help me for that.if you have any tips please give me


    thanks

  13. #28
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,830
    Thanks
    21
    Thanked 157 Times in 148 Posts
    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. #29
    New to the CF scene
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    heyy , i am unable to infact get the script to fetch video, so i think it gets stuck there .. i can see the thumbnail .. and then nothing happens.. no errors, nothing

    i verified that safemode is off for php .. and ffmpeg is working otherwise..

    i can see a file of 0kb in videos folders.. and that continues to stay like that !!

    EDIT: it works, i had to turn on the curl, thanks a lot mate!!
    Last edited by fatslave; 05-22-2011 at 05:55 PM.

  15. #30
    New to the CF scene
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    http://www.youtube.com/watch?v=gWqI0U3pBdA


    for testing sake, please verify that this is working for u

    No need now :P
    Last edited by fatslave; 05-22-2011 at 05:55 PM.


 
Page 2 of 85 FirstFirst 12341252 ... LastLast

LinkBacks (?)

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