Web Analytics Made Easy -
StatCounter YouTube-to-MP3 conversion - PHP class and script - CodingForum

Announcement

Collapse
No announcement yet.

YouTube-to-MP3 conversion - PHP class and script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hello chump
    Before I start you have to know that my english is not great

    Recently I have bought premium version of your Linux converter.
    Its very good script, but i have little problem with it.

    When i paste youtube link and click "Convert" very often i have to wait really long time until conversation starts. Conversation goes fast. But the reaction to start it is very slow. I have good hosting and my other quite big sites work good on it.

    My hosting:
    8 GHz CPU
    4096 MB RAM
    40 GB space
    4000 GB transfer (month)
    99,9 % uptime

    my website is: www.meconvert.com

    Do you know why the reaction before it starts converting is soooo long(sometimes its never starts to convert)?
    I was speaking with my hosting proividers and they told me that the reason is lquality of connection between my servers and youtube servers.


    Regards,
    Pawel

    Comment


    • Originally posted by pavaka View Post
      Hello chump
      Before I start you have to know that my english is not great

      Recently I have bought premium version of your Linux converter.
      Its very good script, but i have little problem with it.

      When i paste youtube link and click "Convert" very often i have to wait really long time until conversation starts. Conversation goes fast. But the reaction to start it is very slow. I have good hosting and my other quite big sites work good on it.

      My hosting:
      8 GHz CPU
      4096 MB RAM
      40 GB space
      4000 GB transfer (month)
      99,9 % uptime

      my website is: www.meconvert.com

      Do you know why the reaction before it starts converting is soooo long(sometimes its never starts to convert)?
      I was speaking with my hosting proividers and they told me that the reason is lquality of connection between my servers and youtube servers.


      Regards,
      Pawel
      Hi,

      I see 2 possible scenarios here:

      1) For some reason, your download progress bar is not being flushed from the buffer to the screen. That would explain why you never see the download progress bar, and you only see the conversion progress bar. OR,

      2) Your ability to connect to YouTube servers is poor, but once you are able to establish a connection, the download speed is lightening quick. This would also explain the long wait time and the fact that you never see the download progress bar.


      One thing that I noticed about your site is that, usually, the wait time before the conversion progress bar appears seems to be directly proportional to the length/size of the video. That would seem to indicate that the problem is likely #1 in the above list.

      Also, the download progress bar markup is in the source code of your page following conversion. It just isn't moved out of the buffer until page loading completes. Meaning output buffer flushing is not working as expected.

      The following code pushes output out of the buffer and to the screen during code execution:
      PHP Code:
                      ob_end_flush();
                      
      ob_flush();
                      
      flush(); 
      I use that code throughout the conversion process. Have you modified or deleted this code? Perhaps PHP was compiled incorrectly or corrupted on your server, and it is affecting output control functions?

      When output control functions are working properly, the buffer is flushed during the video download and you see the download progress bar prior to the conversion progress bar.

      Try some experiments with the output control functions on your server. See if you can isolate the problem. Let me know what you find.

      Last edited by chump2877; Feb 5th, 2013, 01:06 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


      • I get asked this question quite a bit: How do I use a URL like http://www.mysite.com/?video_id=FVtB2Lrd1vg with your software? In other words, how do I initiate a conversion with a GET request instead of a POST request?

        Well, the answer really is quite simple: Just check for the existence of GET 'video_id' variable and then, if found, use its value to populate the POST array. For example, this should work for the free version:
        PHP Code:
         if (isset($_GET['video_id']))
         {
             
        $_POST['submit'] = 1;
             
        $_POST['youtubeURL'] = "http://www.youtube.com/watch?v=" $_GET['video_id'];
             
        $_POST['quality'] = 128;
         } 
        Easy peasy.

        This concept could also be adapted for SEO friendly URLs like http://www.mysite.com/video/FVtB2Lrd1vg as well. You just need to use the PHP string or regex functions to apply some pattern matching on the URL, and then extract the ID at the end of the URL.

        In the next version of the software, I will add this feature to both free and paid-for versions.
        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


        • Hey chump
          It's me again. Firstly I would like to thank you for you last response

          I was speaking with my hosting providers, and they said that configuration of output control directives in php.ini is correct. (they also sent me this link: http://meconvert.com/pi.php).
          I was modyfing your script but only the visual aspects, I didint touch ob_end_flush();, ob_flush(); and flush();.

          I have no idea why downloading bar doesn't appear
          I even reinstalled the script and the problem still exist in not modified, orginal script.
          Any new ideas?

          Regards,
          Pawel

          Comment


          • Hi chump2877, this is my first post. First, my English not to good.
            I'm joining this forum because of this thread. I'm so interesting. But before I mad purchase, I want to know something. Is this script including css file for the script?? I'm bad on styling, thats why I'm asking this.

            Comment


            • Originally posted by pavaka View Post
              Hey chump
              It's me again. Firstly I would like to thank you for you last response

              I was speaking with my hosting providers, and they said that configuration of output control directives in php.ini is correct. (they also sent me this link: http://meconvert.com/pi.php).
              I was modyfing your script but only the visual aspects, I didint touch ob_end_flush();, ob_flush(); and flush();.

              I have no idea why downloading bar doesn't appear
              I even reinstalled the script and the problem still exist in not modified, orginal script.
              Any new ideas?

              Regards,
              Pawel
              I can't explain why you are having this problem, but these are my thoughts:

              1) Try setting output_buffering directive in php.ini to 4096, i.e.:

              Code:
              output_buffering=4096
              See if that helps. You can override server php.ini with your own php.ini in the web root directory.

              2) Perhaps your hosting provider is right:
              I was speaking with my hosting proividers and they told me that the reason is lquality of connection between my servers and youtube servers.
              ...and the issue can be attributed to following:

              Your ability to connect to YouTube servers is poor, but once you are able to establish a connection, the download speed is lightening quick. This would also explain the long wait time and the fact that you never see the download progress bar.
              3) Try installing the software on another server. See if you have the same problem. I know that my software works, so the likely culprit here is some misconfiguration of the first server.

              Hope this helps. Let me know how it goes.
              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


              • Originally posted by Janjoe View Post
                Hi chump2877, this is my first post. First, my English not to good.
                I'm joining this forum because of this thread. I'm so interesting. But before I mad purchase, I want to know something. Is this script including css file for the script?? I'm bad on styling, thats why I'm asking this.
                Hi, and welcome to codingforum.net!

                Yes, the paid-for version of the script does include an external CSS file. The benefits of external style sheets are explained here:

                http://www.codecademy.com/courses/cs...#!/exercises/1
                http://www.w3schools.com/css/css_howto.asp
                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 purchase your converter already, and it's great. Awesome....!!!
                  Originally posted by chump2877 View Post
                  I get asked this question quite a bit: How do I use a URL like http://www.mysite.com/?video_id=FVtB2Lrd1vg with your software? In other words, how do I initiate a conversion with a GET request instead of a POST request?

                  Well, the answer really is quite simple: Just check for the existence of GET 'video_id' variable and then, if found, use its value to populate the POST array. For example, this should work for the free version:
                  PHP Code:
                   if (isset($_GET['video_id']))
                   {
                       
                  $_POST['submit'] = 1;
                       
                  $_POST['youtubeURL'] = "http://www.youtube.com/watch?v=" $_GET['video_id'];
                       
                  $_POST['quality'] = 128;
                   } 
                  Easy peasy.

                  This concept could also be adapted for SEO friendly URLs like http://www.mysite.com/video/FVtB2Lrd1vg as well. You just need to use the PHP string or regex functions to apply some pattern matching on the URL, and then extract the ID at the end of the URL.

                  In the next version of the software, I will add this feature to both free and paid-for versions.
                  Same question, how to make it, URL like http://www.mysite.com/?video_id=FVtB2Lrd1vg ??

                  Can you tell me which file or where that I should edit to have URL like that, and what I have to do with that file?? I can't wait for next version.

                  Comment


                  • Originally posted by Janjoe View Post
                    I purchase your converter already, and it's great. Awesome....!!!


                    Same question, how to make it, URL like http://www.mysite.com/?video_id=FVtB2Lrd1vg ??

                    Can you tell me which file or where that I should edit to have URL like that, and what I have to do with that file?? I can't wait for next version.
                    For now, here is an example for YouTube video IDs in the URL query string:

                    PHP Code:
                    if (isset($_GET['video_id']))
                    {
                         
                    $vidHostArr $converter->GetVideoHosts();
                         
                    $_POST['submitForm'] = 1;
                         
                    $_POST['videoURL'] = $vidHostArr[1]['url_root'] . "v=" $_GET['video_id'];
                         
                    $_POST['volume'] = 256;
                         
                    $_POST['ftype'] = 3;

                    Place the above code immediately after this code in index.php (near top of file):

                    PHP Code:
                    // Instantiate converter class
                    include 'VideoConverter.class.php';
                    $converter = new VideoConverter(); 
                    In the next version of the software, I will get this working for Dailymotion as well.
                    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


                    • help needed please anyone

                      hello i was happy to find a script for free that would help me convert youtube videos to mp3 so i bought a hosting service that allows ffmpeg well my situation is on my website http://ymp3download.com/ i am able to download the videos but it dosent convert them this is the 12-6-12 update you have so can you please help me or can you provide a new update file i am new to coding and dont fully understand it i need help please and this is the hosting company i am using http://www.arvixe.com/linux_web_hosting i have the personal plan they do support ffmpeg i dont know if its them or the script that is giving me problems please reply and help

                      Comment


                      • Originally posted by chump2877 View Post
                        For now, here is an example for YouTube video IDs in the URL query string:

                        PHP Code:
                        if (isset($_GET['video_id']))
                        {
                             
                        $vidHostArr $converter->GetVideoHosts();
                             
                        $_POST['submitForm'] = 1;
                             
                        $_POST['videoURL'] = $vidHostArr[1]['url_root'] . "v=" $_GET['video_id'];
                             
                        $_POST['volume'] = 256;
                             
                        $_POST['ftype'] = 3;

                        Place the above code immediately after this code in index.php (near top of file):

                        PHP Code:
                        // Instantiate converter class
                        include 'VideoConverter.class.php';
                        $converter = new VideoConverter(); 
                        In the next version of the software, I will get this working for Dailymotion as well.
                        Awesome, it's work. My site ready for running now. Great converter software, and great support. Thanks a lot Chump...

                        Comment


                        • Hi guys,

                          I have been inundated with support requests recently for both the free and paid-for versions of this software.

                          While I absolutely appreciate your interest in my software (Thank you!!), I am only one person and thus have a finite amount of time to respond to such large volumes of support requests.

                          So, I would very much appreciate it if, prior to emailing, private messaging, or instant messaging me, you guys could please search this forum thread first for possible solutions to your issues.

                          A "Search this Thread" link is available at both the top and bottom of every page in this forum thread. Please leverage this search utility to your advantage. The majority of your issues have been experienced before, and the solutions to those problems are documented in this forum thread.

                          Again, thank you very much for your continued interest, and thank you also for your understanding. Rest assured that I will continue to respond to your requests in a timely manner, as I have always done in the past.
                          Last edited by chump2877; Feb 10th, 2013, 04:37 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


                          • Originally posted by staticking29 View Post
                            hello i was happy to find a script for free that would help me convert youtube videos to mp3 so i bought a hosting service that allows ffmpeg well my situation is on my website http://ymp3download.com/ i am able to download the videos but it dosent convert them this is the 12-6-12 update you have so can you please help me or can you provide a new update file i am new to coding and dont fully understand it i need help please and this is the hosting company i am using http://www.arvixe.com/linux_web_hosting i have the personal plan they do support ffmpeg i dont know if its them or the script that is giving me problems please reply and help
                            I have already responded to both your emails and PMs regarding this same issue. Please don't paste the same request everywhere and anywhere. You have my attention, and only one method of contact is required to do so. Please check your email and/or PMs for my responses. Thanks.
                            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


                            • Hello everyone,

                              I have just finished updating the paid-for version of my software. New in this version:
                              1. You can now initiate a conversion with a GET request as well as a POST request. Examples of valid URLs include:
                              2. Fixed converted file name when file name (and corresponding video title) consists of only symbols, i.e. https://www.youtube.com/watch?v=8-xa1h0S_DE
                              3. Fixed audio bit rate problem with 3gp conversion on Linux
                              4. Decreased the number of AJAX requests required to build conversion progress bar (so fewer server resources are consumed)


                              The following files/directories were changed/added:
                              1. .htaccess new
                              2. config.class.php updated
                              3. index.php updated
                              4. SETUP.txt updated
                              5. VideoConverter.class.php updated


                              All previous customers who have purchased the paid-for version of my app are receiving this new, updated version via the e-mail addresses that you provided at Tradebit.com.

                              Please report any issues with either the paid-for version or the free version in this forum thread. Your feedback is encouraged. Donations are welcome!

                              Thanks!
                              Last edited by chump2877; Feb 25th, 2013, 11:13 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


                              • Hi, just thought I would point out the there is a issue converting the downloaded flv, the script appears to just stop. I tried it on http://tubeconvert.net, which has the same issue my site does.
                                Thanks

                                Comment

                                Working...
                                X