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 9 of 88 FirstFirst ... 78910111959 ... LastLast
Results 121 to 135 of 1315
Like Tree13Likes

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

  1. #121
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Before you read further my website is www.free-youtube-mp3.org Try converting and you will see

    Okay i put the files together, In my folder it consists of Mp3,Videos,Ffmpeg.exe,index.php,youtubetomp3converter.class.php

    So on filezilla it says public.html consists of 4 files and 2 directories, The directories being Mp3 and videos with their permission being set at 777.
    When i attempt to convert a video it says error converting mp3 but... for an odd reason it seems to convert this video
    http://www.youtube.com/watch?v=ELEc33PRjnw
    By converting i mean the converted file goes into the video folder as i saw on filezilla but on the actual website nothing happens abit from you see the browser loading icon?No progress bar, Nothing to tell me it is converting, Nothing at all. :/

    This is the error message. (From reading the error it seems to be line 75 and 26, but i don't have any idea on how to fix this)
    [25-Dec-2011 12:57:41] PHP Warning: file_get_contents(www.youtube.com/watch?v=KYA1-TF_6FY) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:57:41] PHP Warning: file_get_contents(www.youtube.com/watch?v=KYA1-TF_6FY) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:57:45] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:57:45] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:45] PHP Warning: file_get_contents(www.youtube.com/watch?v=KYA1-TF_6FY) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:45] PHP Warning: file_get_contents(www.youtube.com/watch?v=KYA1-TF_6FY) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:47] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:47] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:48] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:48] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:50] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:50] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:51] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:51] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:52] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:52] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:53] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:53] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:54] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:54] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:55] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:55] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:56] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:56] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:57] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:57] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26
    [25-Dec-2011 12:58:57] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 75
    [25-Dec-2011 12:58:57] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home/freeyou1/public_html/YouTubeToMp3Converter.class.php on line 26

    I'm so sorry i'v been posting on your thread all day asking for your help, I guess i'm a hopeless person haha..
    Please fix this for me
    Last edited by jibreel; 12-26-2011 at 12:10 AM. Reason: I had insufficient information

  2. #122
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    It just occurred to me that you are trying to install this script on a Linux server....ffmpeg.exe, as I am using it, won't work correctly on a Linux server....Please see this post in this thread: http://www.codingforums.com/showpost...&postcount=107
    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 !! ♪♪

  3. #123
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'm pretty sure that my shared host is windows, I'm hosting the website on cirtex.com and it is the basic plan. I was actually using your script but it was modified by a user on a different forum it worked only the progress bar did not load.

    Would you be able to send me the full website folder please?
    By this I mean everything is in the folder and ready to upload, because I think I'm not puting the files in the folder properly , I'm sorry for wasting your time

  4. #124
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    I looked at your web host provider's Basic package, and it looks like you have Linux shared hosting, but FFmpeg and FFmpeg-PHP are actually already installed on the server. (Good deal!) So what happens if you change this line in YouTubeToMp3Converter.class.php:

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

    PHP Code:
    const _FFMPEG 'ffmpeg'
    Theoretically, on a Linux server with FFmpeg-PHP extension installed, that might be enough to point the script to the correct location of FFmpeg on your server. If not, you need to find out the location (absolute path) of FFmpeg on your server.

    And the reason the progress bar doesnt work for you is because your server appears to have PHP 5.2 installed, and not PHP 5.3 or greater.
    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 !! ♪♪

  5. #125
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    https://support.cirtex.com/index.php...kbarticleid=11

    Try this:

    PHP Code:
    const _FFMPEG '/usr/local/bin/ffmpeg'
    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 !! ♪♪

  6. #126
    New to the CF scene
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi Chump,

    Thank you for sharing this great script with us!
    I will design a template to it soon. I have just installed it and it works great locally!
    Jibreel pointed out this thread to me as we both try to launch a youtube to mp3 website. We are also on the same host Cirtex.

    Do you think its possible to have a progressbar at all on PHP 5.2 ?
    Maybe a small part could be recoded so that it would work on php 5.2?
    I just need to know if it is possible.

    Thanks for all the effort and enjoy the holidays!

  7. #127
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Do you think its possible to have a progressbar at all on PHP 5.2 ?
    Maybe a small part could be recoded so that it would work on php 5.2?
    I just need to know if it is possible.
    I appreciate what you are saying here, but I have no plans to write more code to cater to a previous version of PHP. For now, you can disable the progress bar until such time as your server is updated to PHP 5.3.

    Or you can always write your own progress bar that is compatible with PHP 5.2. Here is a link to get you started: http://stackoverflow.com/questions/1...hp-not-working. I have not tried the method outlined there, but it sounds like it could work.

    Also check here: http://docs.php.net/function.stream-...ation-callback
    Last edited by chump2877; 12-26-2011 at 04:41 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 !! ♪♪

  8. #128
    New to the CF scene
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I understand you don't want to go back but at least now I know its possible.
    Thanks for the links also, I will get into it :-)

  9. #129
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hai,
    i just installed:
    FFmpeg, FFmpeg-php, libmp3lame, Libogg + Libvorbis, Mplayer + Mencoder on my dedicated server to use this script.

    Here is php info output for ffmpeg:



    But after i change this:
    Code:
    $exec_string = self::_FFMPEG.' -i '.$this->GetTempVidFileName().' -y -acodec libmp3lame -ab '.$quality.'k '.$this->GetSongFileName();
    to

    Code:
    $exec_string = self::FFMPEG.' -i '.$this->GetTempVidFileName().' -y -acodec libmp3lame -ab '.$quality.'k '.$this->GetSongFileName();
    Code:
    FFMPEG
    i become .flv files in videos folder on my server:



    YouTubeToMp3Converter.class code:
    http://pastebin.com/2sUdrchj

    But i with this or without i can not download or convert youtube videos...
    Any help plz!?

    P.S
    cURL is enabled, and fopen() too

  10. #130
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Have you commented out this line in index.php, like so:

    PHP Code:
        // Execution settings
        
    ini_set('max_execution_time',0);
        
    //ini_set('display_errors',0); 
    To see what PHP errors (if any) that you are getting?
    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 !! ♪♪

  11. Users who have thanked chump2877 for this post:

    teslia2 (01-20-2012)

  12. #131
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yh i have, but i dont become any error_log files.

    But after i add this:
    die($exec_string);
    after line:
    $exec_string = self::_FFMPEG.' -i '.$this->GetTempVidFileName().' -y -acodec libmp3lame -ab '.$quality.'k '.$this->GetSongFileName();


    i become this output on blank page:
    /usr/bin/ffmpeg -i videos/1326890570.flv -y -acodec libmp3lame -ab 128k mp3/YoutubeuMp3net_-_Kako_skidat_sa_youtube.mp3

  13. #132
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you, i'll try that

    Quote Originally Posted by chump2877 View Post
    Hi Tony,

    My first inclination would be to try and acquire that kind of information via the YouTube API. For example, here is the API-way to grab a variety of data pertaining to a particular video. Further exploration reveals all of the possible data that can be retrieved for a given video "entry" object. Unfortunately, the API does not appear to provide individual video file size information (I think that's what you are after?). But you might try digging around a little more and see if I missed something.

    Apart from the API you might try the following link. This solution looks promising because it involves cURL (which my script already uses to download videos), so you might incorporate this technique into the SaveVideo method, just prior to actually downloading the video. There you could institute a check for file size, and if the size was either too big (or too small?), then you could cancel the video save operation and make the method return false.

  14. #133
    New Coder
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello. Thanks to chump2877 for the nice code. I use it but i have a problem with progress bar. It shows only on firefox and it load me 3 times- about 7% - 28% and 97% of every videos. How to create new progress bar that shows actual progress bar - 1% 2% 3% 4%.... 98% 99% .

  15. #134
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by atanas View Post
    Hello. Thanks to chump2877 for the nice code. I use it but i have a problem with progress bar. It shows only on firefox and it load me 3 times- about 7% - 28% and 97% of every videos. How to create new progress bar that shows actual progress bar - 1% 2% 3% 4%.... 98% 99% .
    I've just tested this code in Firefox, IE, and Opera, and it seems to work for me in all 3 browsers.

    What video are you trying to convert?

    You may have experienced a temporary glitch due to (possibly) difficulty connecting to/downloading from YouTube, or javascript (in any of your open tabs) slowing down the browser. Try waiting a few minutes, restarting your browser, and then converting again.
    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. #135
    New Coder
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I try it again and yes it works, but when i click Create Mp3 File it load about 30-40 sec and after that show progress bar and load 3 times about 30% 90% and finish. How to correct it to show progress bar of all operating (download flv + convert flv to mp3) and progress bar to show every percent, not only 3 times.


 
Page 9 of 88 FirstFirst ... 78910111959 ... 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
  •