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

  • Originally posted by chump2877 View Post

    Note: When installing my software, I recommend that you 'apt-get install' to get the stable versions of each package. I advise against building each (or any) of the packages from the git source.
    sure i´ll get the Ubuntu 11.10 and try, and yes i use the terminal to install using "sudo apt-get install whatever i need'" via SSH. I let u know how it work out.

    Comment


    • I've installed it on my site mp3roach.com/dl it is converting videos as i saw in FTP folders but its not displaying download link after conversion please help.

      Comment


      • Originally posted by mujtabak View Post
        I've installed it on my site mp3roach.com/dl it is converting videos as i saw in FTP folders but its not displaying download link after conversion please help.
        Hi,

        After visiting your page, please check the following:

        1) Are permissions set correctly on the 'logs', 'output', 'videos', and 'ringtones' folders? (Verify that the correct server user owns these folders as well -- see chown command.)

        2) Are videos being saved to the 'videos' folder? Full videos or only partial videos?

        3) I never see a download progress bar, but I do see the download progress bar code in your page. If the videos are actually being saved in the 'videos' folder, then do you have a really fast download speed from Youtube? That would explain why it skips past the download progress bar to the conversion progress bar.

        4) The AJAX response text that corresponds to the conversion progress bar is generating an error code. Please see this post for how to troubleshoot that.

        5) Are any FFmpeg log files created in the 'logs' directory for failed conversions? If so, please paste the output of a log file for a given failed conversion.

        6) Please take advantage of the search feature for this forum thread. I have answered questions like this countless times before and provided clues for how to troubleshoot similar issues.

        So give those things a try, and then we'll go from there...
        Last edited by chump2877; Nov 26th, 2012, 01:26 AM.
        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've tried everything on this forum too but no result. Its not failing any where its just not displaying download link. Videos are converting.

          Go to mp3roach.com/dl convert any video then go to mp3roach.com/dl/videos or /output you will find videos are converting and downloading on server but it doesn't display link so that user can download. Thanks



          PHP Code:
          FFmpeg version SVN-r10635Copyright (c2000-2007 Fabrice Bellardet al.
            
          configuration: --enable-gpl --enable-liba52 --enable-libgsm --enable-libxvid --enable-libamr_nb --enable-libamr_wb --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libfaac --enable-shared --prefix=/usr --enable-libfaad --libdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include/ffmpeg
            libavutil version
          49.5.0
            libavcodec version
          51.44.0
            libavformat version
          51.14.0
            built on Oct  1 2007 15
          :21:19gcc3.4.6 20060404 (Red Hat 3.4.6-8)
          Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videos/1354018061_50b4ad0d6f5806.44504070.flv':
            
          Duration00:07:45.1start0.000000bitrate482 kb/s
            Stream 
          #0.0(und): Audio: mpeg4aac, 44100 Hz, stereo
            
          Stream #0.1(und): Video: h264, yuv420p, 480x360, 30.00 fps(r)
          Output #0, mp3, to 'output/Autechre_-_Puch_uuid-50b4ad17b34c3.mp3':
            
          Stream #0.0(und): Audio: libmp3lame, 44100 Hz, stereo, 128 kb/s
          Stream mapping:
            
          Stream #0.0 -> #0.0
          Press [qto stop encoding
          size
          =     130kB time=8.3 bitrate128.0kbits/s    
          size
          =     264kB time=16.9 bitrate128.0kbits/s    
          size
          =     397kB time=25.4 bitrate128.0kbits/s    
          size
          =     533kB time=34.1 bitrate128.0kbits/s    
          size
          =     674kB time=43.1 bitrate128.0kbits/s    
          size
          =     811kB time=51.9 bitrate128.0kbits/s    
          size
          =     956kB time=61.2 bitrate128.0kbits/s    
          size
          =    1104kB time=70.7 bitrate128.0kbits/s    
          size
          =    1253kB time=80.2 bitrate128.0kbits/s    
          size
          =    1391kB time=89.0 bitrate128.0kbits/s    
          size
          =    1534kB time=98.2 bitrate128.0kbits/s    
          size
          =    1653kB time=105.8 bitrate128.0kbits/s    
          size
          =    1795kB time=114.9 bitrate128.0kbits/s    
          size
          =    1929kB time=123.5 bitrate128.0kbits/s    
          size
          =    2048kB time=131.1 bitrate128.0kbits/s    
          size
          =    2172kB time=139.0 bitrate128.0kbits/s    
          size
          =    2300kB time=147.2 bitrate128.0kbits/s    
          size
          =    2439kB time=156.1 bitrate128.0kbits/s    
          size
          =    2579kB time=165.0 bitrate128.0kbits/s    
          size
          =    2720kB time=174.1 bitrate128.0kbits/s    
          size
          =    2861kB time=183.1 bitrate128.0kbits/s    
          size
          =    3000kB time=192.0 bitrate128.0kbits/s    
          size
          =    3138kB time=200.8 bitrate128.0kbits/s    
          size
          =    3247kB time=207.8 bitrate128.0kbits/s    
          size
          =    3384kB time=216.6 bitrate128.0kbits/s    
          size
          =    3526kB time=225.6 bitrate128.0kbits/s    
          size
          =    3670kB time=234.9 bitrate128.0kbits/s    
          size
          =    3808kB time=243.7 bitrate128.0kbits/s    
          size
          =    3946kB time=252.6 bitrate128.0kbits/s    
          size
          =    4082kB time=261.3 bitrate128.0kbits/s    
          size
          =    4211kB time=269.5 bitrate128.0kbits/s    
          size
          =    4349kB time=278.3 bitrate128.0kbits/s    
          size
          =    4482kB time=286.9 bitrate128.0kbits/s    
          size
          =    4626kB time=296.1 bitrate128.0kbits/s    
          size
          =    4774kB time=305.5 bitrate128.0kbits/s    
          size
          =    4914kB time=314.5 bitrate128.0kbits/s    
          size
          =    5056kB time=323.6 bitrate128.0kbits/s    
          size
          =    5197kB time=332.6 bitrate128.0kbits/s    
          size
          =    5336kB time=341.5 bitrate128.0kbits/s    
          size
          =    5478kB time=350.6 bitrate128.0kbits/s    
          size
          =    5619kB time=359.6 bitrate128.0kbits/s    
          size
          =    5763kB time=368.8 bitrate128.0kbits/s    
          size
          =    5904kB time=377.9 bitrate128.0kbits/s    
          size
          =    6050kB time=387.2 bitrate128.0kbits/s    
          size
          =    6182kB time=395.7 bitrate128.0kbits/s    
          size
          =    6305kB time=403.5 bitrate128.0kbits/s    
          size
          =    6438kB time=412.0 bitrate128.0kbits/s    
          size
          =    6587kB time=421.6 bitrate128.0kbits/s    
          size
          =    6734kB time=431.0 bitrate128.0kbits/s    
          size
          =    6870kB time=439.7 bitrate128.0kbits/s    
          size
          =    7009kB time=448.6 bitrate128.0kbits/s    
          size
          =    7140kB time=457.0 bitrate128.0kbits/s    
          size
          =    7268kB time=465.1 bitrate128.0kbits/s    
          video
          :0kB audio:7268kB global headers:0kB muxing overhead 0.000430

          Comment


          • Bro im waiting. please help me out. Its not displaying download link

            Comment


            • Originally posted by mujtabak View Post
              I've tried everything on this forum too but no result. Its not failing any where its just not displaying download link. Videos are converting.

              Go to mp3roach.com/dl convert any video then go to mp3roach.com/dl/videos or /output you will find videos are converting and downloading on server but it doesn't display link so that user can download. Thanks



              PHP Code:
              FFmpeg version SVN-r10635Copyright (c2000-2007 Fabrice Bellardet al.
                
              configuration: --enable-gpl --enable-liba52 --enable-libgsm --enable-libxvid --enable-libamr_nb --enable-libamr_wb --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libfaac --enable-shared --prefix=/usr --enable-libfaad --libdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include/ffmpeg
                libavutil version
              49.5.0
                libavcodec version
              51.44.0
                libavformat version
              51.14.0
                built on Oct  1 2007 15
              :21:19gcc3.4.6 20060404 (Red Hat 3.4.6-8)
              Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videos/1354018061_50b4ad0d6f5806.44504070.flv':
                
              Duration00:07:45.1start0.000000bitrate482 kb/s
                Stream 
              #0.0(und): Audio: mpeg4aac, 44100 Hz, stereo
                
              Stream #0.1(und): Video: h264, yuv420p, 480x360, 30.00 fps(r)
              Output #0, mp3, to 'output/Autechre_-_Puch_uuid-50b4ad17b34c3.mp3':
                
              Stream #0.0(und): Audio: libmp3lame, 44100 Hz, stereo, 128 kb/s
              Stream mapping:
                
              Stream #0.0 -> #0.0
              Press [qto stop encoding
              size
              =     130kB time=8.3 bitrate128.0kbits/s    
              size
              =     264kB time=16.9 bitrate128.0kbits/s    
              size
              =     397kB time=25.4 bitrate128.0kbits/s    
              size
              =     533kB time=34.1 bitrate128.0kbits/s    
              size
              =     674kB time=43.1 bitrate128.0kbits/s    
              size
              =     811kB time=51.9 bitrate128.0kbits/s    
              size
              =     956kB time=61.2 bitrate128.0kbits/s    
              size
              =    1104kB time=70.7 bitrate128.0kbits/s    
              size
              =    1253kB time=80.2 bitrate128.0kbits/s    
              size
              =    1391kB time=89.0 bitrate128.0kbits/s    
              size
              =    1534kB time=98.2 bitrate128.0kbits/s    
              size
              =    1653kB time=105.8 bitrate128.0kbits/s    
              size
              =    1795kB time=114.9 bitrate128.0kbits/s    
              size
              =    1929kB time=123.5 bitrate128.0kbits/s    
              size
              =    2048kB time=131.1 bitrate128.0kbits/s    
              size
              =    2172kB time=139.0 bitrate128.0kbits/s    
              size
              =    2300kB time=147.2 bitrate128.0kbits/s    
              size
              =    2439kB time=156.1 bitrate128.0kbits/s    
              size
              =    2579kB time=165.0 bitrate128.0kbits/s    
              size
              =    2720kB time=174.1 bitrate128.0kbits/s    
              size
              =    2861kB time=183.1 bitrate128.0kbits/s    
              size
              =    3000kB time=192.0 bitrate128.0kbits/s    
              size
              =    3138kB time=200.8 bitrate128.0kbits/s    
              size
              =    3247kB time=207.8 bitrate128.0kbits/s    
              size
              =    3384kB time=216.6 bitrate128.0kbits/s    
              size
              =    3526kB time=225.6 bitrate128.0kbits/s    
              size
              =    3670kB time=234.9 bitrate128.0kbits/s    
              size
              =    3808kB time=243.7 bitrate128.0kbits/s    
              size
              =    3946kB time=252.6 bitrate128.0kbits/s    
              size
              =    4082kB time=261.3 bitrate128.0kbits/s    
              size
              =    4211kB time=269.5 bitrate128.0kbits/s    
              size
              =    4349kB time=278.3 bitrate128.0kbits/s    
              size
              =    4482kB time=286.9 bitrate128.0kbits/s    
              size
              =    4626kB time=296.1 bitrate128.0kbits/s    
              size
              =    4774kB time=305.5 bitrate128.0kbits/s    
              size
              =    4914kB time=314.5 bitrate128.0kbits/s    
              size
              =    5056kB time=323.6 bitrate128.0kbits/s    
              size
              =    5197kB time=332.6 bitrate128.0kbits/s    
              size
              =    5336kB time=341.5 bitrate128.0kbits/s    
              size
              =    5478kB time=350.6 bitrate128.0kbits/s    
              size
              =    5619kB time=359.6 bitrate128.0kbits/s    
              size
              =    5763kB time=368.8 bitrate128.0kbits/s    
              size
              =    5904kB time=377.9 bitrate128.0kbits/s    
              size
              =    6050kB time=387.2 bitrate128.0kbits/s    
              size
              =    6182kB time=395.7 bitrate128.0kbits/s    
              size
              =    6305kB time=403.5 bitrate128.0kbits/s    
              size
              =    6438kB time=412.0 bitrate128.0kbits/s    
              size
              =    6587kB time=421.6 bitrate128.0kbits/s    
              size
              =    6734kB time=431.0 bitrate128.0kbits/s    
              size
              =    6870kB time=439.7 bitrate128.0kbits/s    
              size
              =    7009kB time=448.6 bitrate128.0kbits/s    
              size
              =    7140kB time=457.0 bitrate128.0kbits/s    
              size
              =    7268kB time=465.1 bitrate128.0kbits/s    
              video
              :0kB audio:7268kB global headers:0kB muxing overhead 0.000430
              You are using a very old version of FFmpeg. Update your version of FFmpeg to the latest "stable" version. Do not get the "newest" version by compiling FFmpeg from git source. Use the default package install commands (will vary depending on your version of Linux) to get the most recent "stable" version.

              You also seem like you might be missing at least the libx264 codec (which enables conversion to video formats). Ensure that you have all the necessary codecs for FFmpeg.

              Do these things, and then we'll go from there...
              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, looks like youtube changed up there code again.

                So can no longer convert youtube videos into mp3.

                Please do let me know about this asap.

                Thanks!

                Comment


                • Originally posted by bbrog View Post
                  Hey, looks like youtube changed up there code again.

                  So can no longer convert youtube videos into mp3.

                  Please do let me know about this asap.

                  Thanks!
                  I can confirm this. I will work on a fix and publish it here as soon as possible. Thanks for the heads up...
                  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


                  • No problem Thanks let us know asap

                    Comment


                    • Originally posted by bbrog View Post
                      Hey, looks like youtube changed up there code again.

                      So can no longer convert youtube videos into mp3.

                      Please do let me know about this asap.

                      Thanks!
                      Are you using the free version of the software? The paid-for version? Linux or Windows?

                      My tests indicate that this is only an issue for the free version. The paid-for version of the software is still functioning perfectly!

                      For the free version, in YouTubeToMp3Converter.class.php, please change the following code accordingly:

                      PHP Code:
                              function ExtractSongTrackName($vidSrc$srcType)
                              {
                                  
                      $name '';
                                  
                      $vidSrcTypes $this->GetVidSrcTypes();
                                  if (
                      in_array($srcType$vidSrcTypes))
                                  {
                                      
                      $vidSrc = ($srcType == $vidSrcTypes[1]) ? file_get_contents($vidSrc) : $vidSrc;
                                      if (
                      $vidSrc !== false)
                                      {
                                          if (
                      preg_match('/(<title>)(.+?)( - YouTube)(<\/title>)/'$vidSrc$matches) == 1)
                                          {
                                              
                      $name trim($matches[2]);
                                              
                      $name iconv("UTF-8""ISO-8859-1//TRANSLIT"$name);
                                              
                      $name = (!empty($name)) ? html_entity_decode($name) : 'unknown_'.time();
                                          }
                                      }
                                  }
                                  return 
                      $name;
                              } 
                      Do let me know if that solves your problem...
                      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, thanks this solved the problem. And yes I was using the free version.

                        Also you had created me custom backend stuff will changing this effect the backend operations in any way?

                        Let me know thanks!

                        Comment


                        • Originally posted by bbrog View Post
                          Also you had created me custom backend stuff will changing this effect the backend operations in any way?
                          I doubt it, but let me know if it does...
                          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


                          • The new (updated and hopefully stable) distribution of files is located at the bottom of this post.

                            PLEASE SEE THIS POST FOR IMPORTANT INFO REGARDING THE USE AND INSTALLATION OF THIS SCRIPT.

                            DO NOT USE THE ZIP DISTRIBUTION LOCATED AT THE ABOVE LINKED PAGE. USE ONLY THE ZIP FILE ATTACHED TO THE BOTTOM OF THIS POST.
                            New in this release:

                            1) Per recent changes to YouTube's site front end, I fixed the script's ability to determine a given video's title.

                            The paid-for version of the app is not affected by YouTube's recent changes. The full version of the software will continue to function as before -- perfectly!!

                            As always, please let me know if you have any questions/concerns regarding the above and/or the code.
                            Attached Files
                            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, getting errors again when downloading videos. Think youtube changed its code again

                              Comment


                              • Originally posted by bbrog View Post
                                Hi, getting errors again when downloading videos. Think youtube changed its code again
                                Hi, I can confirm this. Neither the free nor paid version appears to be working. I will work on a fix and post it here as soon as I can. Thanks for your patience.
                                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

                                Working...
                                X