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 7 of 82 FirstFirst ... 567891757 ... LastLast
Results 91 to 105 of 1219
Like Tree7Likes

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

  1. #91
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm getting the error: Error generating MP3 file!. Can anyone help me fix?

  2. #92
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,798
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by fytmc411 View Post
    I'm getting the error: Error generating MP3 file!. Can anyone help me fix?
    Works for me! See the troubleshooting steps outlined in earlier posts in this thread.
    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!

  3. #93
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have the script installed on a dedicated server and a shared host that is configure to run video scripts.

    I noticed on my directories that I don't have ffmpeg.exe anywhere. Could that be a problem?

  4. #94
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,798
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by fytmc411 View Post
    I have the script installed on a dedicated server and a shared host that is configure to run video scripts.

    I noticed on my directories that I don't have ffmpeg.exe anywhere. Could that be a problem?
    Remember this?

    To help you visualize, in XAMPP, my final directory structure appears as follows:

    C:\xampp\htdocs\VideoToMp3Converiter\mp3
    C:\xampp\htdocs\VideoToMp3Converter\videos
    C:\xampp\htdocs\VideoToMp3Converter\ffmpeg.exe
    C:\xampp\htdocs\VideoToMp3Converter\index.php
    C:\xampp\htdocs\VideoToMp3Converter\YouTubeToMp3Converter.class.php
    The script obviously won't generate an mp3 file without ffmpeg.exe (that explains your error message). FFmpeg is the external program (executed at the command line level) that actually performs the conversion! So you need to have ffmpeg.exe somewhere on your server. And if it's not in the same folder like I have it, then you need to change the following code accordingly:

    PHP Code:
    const _FFMPEG 'ffmpeg.exe'
    ...to...

    PHP Code:
    const _FFMPEG '/path/to/ffmpeg/ffmpeg.exe'
    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!

  5. #95
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    Remember this?



    The script obviously won't generate an mp3 file without ffmpeg.exe (that explains your error message). FFmpeg is the external program (executed at the command line level) that actually performs the conversion! So you need to have ffmpeg.exe somewhere on your server. And if it's not in the same folder like I have it, then you need to change the following code accordingly:

    PHP Code:
    const _FFMPEG 'ffmpeg.exe'
    ...to...

    PHP Code:
    const _FFMPEG '/path/to/ffmpeg/ffmpeg.exe'
    I changed the path to /usr/local/bin/ffmpeg/ffmpeg.exe where ffmpeg is located but the result is the same: Error generating MP3 file!

  6. #96
    HG3
    HG3 is offline
    New Coder
    Join Date
    Sep 2011
    Location
    BRAZIL
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Hello Chump2877 , I am also with the error (Error generating MP3 file!) My server is Linux, and ffmpeg is to be Windowns this is problem, has another program equal to ffmpeg for linux?
    Last edited by HG3; 09-07-2011 at 04:55 PM.

  7. #97
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,798
    Thanks
    19
    Thanked 156 Times in 147 Posts
    There appears to be a way(s) to install FFmpeg on Linux: http://www.google.com/search?client=...w=1355&bih=835
    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!

  8. #98
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hello chump2877

    i found this thread buy googling

    and i wana thank you for the hard work to coding this nice script

    please can upload the latest and working copy of that script ?

    can this script work n shared hosting ?

    thanks in advance
    Last edited by chump2877; 09-14-2011 at 06:55 PM. Reason: Removed redundant, quoted text

  9. #99
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,798
    Thanks
    19
    Thanked 156 Times in 147 Posts
    please can upload the latest and working copy of that script ?
    The latest working version is available in this thread. You can't miss it. (Or so I thought? )

    can this script work n shared hosting ?
    Only if you can upload FFMpeg and/or access FFMpeg at the command line level via PHP's exec() function. Check with your web hosting provider.
    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!

  10. #100
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hello,

    i habe a problem with the download script when i uncommand the line -> #const _FFMPEG = '/usr/bin/ffmpeg'; thank the script load not the video.

    When comment with # the line thank the script download the vid to /video

    But i have debian and the script says when convert -> Mp3 error -> Fatal error: Undefined class constant '_FFMPEG' in /var/www/grouves/YouTubeToMp3Converter.class.php on line 44

    Please help me to fix it ))

    Server debian with actually ffmpeg version and ffpmeg-php

  11. #101
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,798
    Thanks
    19
    Thanked 156 Times in 147 Posts
    i habe a problem with the download script when i uncommand the line -> #const _FFMPEG = '/usr/bin/ffmpeg'; thank the script load not the video.
    Is there a reason why you are commenting out this line?

    If you comment out that line, then the script does not know where to look for FFMpeg. So you can't comment out that line and expect the script to work as it is written.

    Rather, you should change _FFMPEG to wherever FFMpeg is located on your server.

    Edit: Are you using this: http://ffmpeg-php.sourceforge.net/ ? If so, then I assume you are replacing:

    PHP Code:
    $exec_string self::_FFMPEG.' -i '.$this->GetTempVidFileName().' -y -acodec libmp3lame -ab '.$quality.'k '.$this->GetSongFileName(); 
    exec($exec_string); 
    ...in my script with the provided API. And if that is the case, then you should not be getting the error that you're getting because, at that point, the constant _FFMPEG is not used anywhere in the script....
    Last edited by chump2877; 09-16-2011 at 05:01 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!

  12. #102
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hm

    hello,

    i comment the line out with this line i have NO DOWNLOAD in /video directory.
    Withe the line without comment from me i become this error:
    Fatal error: Undefined class constant '_FFMpeg' in /var/www/soundz/YouTubeToMp3Converter.class.php on line 46

    And when comment the line then i have ONLY the .flv into the /video directory.

    And ffmpeg is installed ;(( when constan_ffmpeg /usr/local/bin/ffmpeg than say the script -> Error generating MP3 file!

    Edit: Normaly i convert files with:
    system(/usr/local/bin/ffmpeg -i input.mov -ar 22050 -ab 56 -aspect 4:3 -b 200 -r 12 -f flv -s 320240 -acodec mp3 -ac 1 output.flv);
    Last edited by freakZ; 09-16-2011 at 07:10 PM.

  13. #103
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,798
    Thanks
    19
    Thanked 156 Times in 147 Posts
    I need to see your modified script to have any idea why you are having these issues.
    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!

  14. #104
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hello,

    i have not modified @ your script - i have only # commented ..

    and i have a script to convert my holiday movie to flv and this was the command line - and not YOUR script.

    Your script downloads the movie but say - error generating mp3.

    Can you say me a little code to see what version and if is ffmpeg on my another vserver installed? in the phpinfo it is listed.

  15. #105
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,798
    Thanks
    19
    Thanked 156 Times in 147 Posts
    i have not modified @ your script - i have only # commented ..
    Great! Then uncomment the lines of code that you have commented, and you should be all set...The original script works fine for me.

    The error that you are receiving ("error generating mp3") could be fixed by doing that, or you could try troubleshooting the script using the various methods already documented in this thread. Also reread the instructions for setting up the script -- you may have something configured incorrectly -- or a file misplaced or missing -- on your server.

    Can you say me a little code to see what version and if is ffmpeg on my another vserver installed? in the phpinfo it is listed.
    My script does not use a PHP FFMpeg extension...It only uses ffmpeg.exe at the command line level. Again, please reread the instructions for setting up the script...If you want or need to use a PHP extension (like http://ffmpeg-php.sourceforge.net/), then you must modify my script. I have as yet written no code to accommodate such an API.

    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!


 
Page 7 of 82 FirstFirst ... 567891757 ... 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
  •