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 67 of 75 FirstFirst ... 17576566676869 ... LastLast
Results 991 to 1,005 of 1115
Like Tree2Likes

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

  1. #991
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Hello everyone,

    I have just finished updating the paid-for version of my software. New in this version:

    1. I have introduced download/conversion support for Facebook videos !!
    2. Support for additional video URL formats:

      • https://www.facebook.com/photo.php?v=xxxxxxx
      • https://www.facebook.com/video/video.php?v=xxxxxxx
      • http://m.youtube.com/watch?v=xxxxxxx

    3. Fixed a bug related to the new Unicode support feature

    The following files were changed/added:

    1. VideoConverter.class.php updated
      • switch block case "Facebook" added to RetrieveVidInfo() method
      • switch block case "Facebook" added to SetVidSourceUrls() method
      • Added curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); to SaveVideo() method
      • ValidateConversionForm() method changed
      • SetConvertedFileName() method changed

    2. config.class.php updated

      • Facebook added to $_videoHosts array
      • Changed ‘url_root’ index for each video hosting site in $_videoHosts array

    3. index.php updated
      • $host['url_root'] becomes $host['url_root'][0] (in 2 places)

    VideoConverter.class.php experienced significant code revisions. If you have modified this file (from its default version), then you will likely need to use some kind of file content comparison utility to make the necessary changes.

    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!
    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!

  2. Users who have thanked chump2877 for this post:

    Luckyplaya (10-29-2013)

  3. #992
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it takes more than 1 hour to convert mp3 from youtube. what can be done to make it faster?

  4. #993
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by thestupid View Post
    it takes more than 1 hour to convert mp3 from youtube. what can be done to make it faster?
    What video is taking 1 hour to convert? What is the video URL? How long is the video?

    What is the URL of your site where my software is installed?

    What are the specs for your server? Processor speed (number of cores) and network connection/download speed are most important.

    What are you server load averages? What is your current server download speed?

    How much traffic do you have to your site?

    Perhaps your server requires a pro admin to troubleshoot the issue further and optimize your server for performance?
    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. #994
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, thanks for your reply. I contacted with the server admin, he wrote something like this, I hope u will understand the problem.

    It looks like the script runs in two phases, the first is very low cpu usage and basically looks like it's grabbing the files from the remote site (youtube). The second calls /usr/bin/ffmpeg and handles the conversion. The php script is basically responsible for updating the progress bar when this is happening. I suspect that the reason it's taking time is that ffmpeg is not using enough parallelism, as the cpu use is right about 100%, which is max of 1 core. You could be faster by using more parallelism, but this might require either editing the script code or recompiling ffmpeg. I need to look a little more into this.

    You should make sure the call to ffmpeg uses -threads auto to maximize parallelism. I'm not sure where in the code this happens, but this seems to be the issue with the speed. It's possible the codec has limitations on parallelism, but this would be a generally documented fact.

    Quote Originally Posted by chump2877 View Post
    What video is taking 1 hour to convert? What is the video URL? How long is the video?

    What is the URL of your site where my software is installed?

    What are the specs for your server? Processor speed (number of cores) and network connection/download speed are most important.

    What are you server load averages? What is your current server download speed?

    How much traffic do you have to your site?

    Perhaps your server requires a pro admin to troubleshoot the issue further and optimize your server for performance?

  6. #995
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by thestupid View Post
    I hope u will understand the problem.
    First of all, you haven't answered any of my questions. I have only a vague understanding of what is happening on your server (with respect to my software) and how your server is configured.

    It sounds like the videos are downloading OK, but they are taking a very long time to convert with FFmpeg?

    Quote Originally Posted by thestupid View Post
    I suspect that the reason it's taking time is that ffmpeg is not using enough parallelism, as the cpu use is right about 100%, which is max of 1 core. You could be faster by using more parallelism, but this might require either editing the script code or recompiling ffmpeg. I need to look a little more into this.

    You should make sure the call to ffmpeg uses -threads auto to maximize parallelism. I'm not sure where in the code this happens, but this seems to be the issue with the speed. It's possible the codec has limitations on parallelism, but this would be a generally documented fact.
    Does your CPU only have 1 core? You can't reasonably run a high-traffic, video conversion site (powered by FFmpeg) with a 1-core processor. Ideally, I suggest at least 6-8 cores to start with.

    Supposedly, FFmpeg is already optimized for parallelism (or multi-threading). The default value for the -threads flag is 0, which is supposed to be the optimal configuration of one thread per core: http://stackoverflow.com/questions/7...ersion-to-h264. You can try increasing the value for -threads, and subsequently the number of threads per core, but as that forum post indicates (and in my own experience), it doesn't help much.

    That forum post suggests that if you really want to run FFmpeg processes in parallel (more efficiently), then you can try the following: http://superuser.com/questions/53816.../547340#547340. But I'm not convinced that running multiple conversions in a single FFmpeg command is practical for a conversion site unless you employ some kind of complex queuing system. And with a queuing system, you could very well cancel out the CPU gains had by combining FFmpeg commands by having your users' browsers constantly poll the server to see where their conversions are in the queue. So, to some extent, you displace the server load used by FFmpeg with a rapid-fire barrage of asynchronous HTTP requests checking on the status of queued conversions. Which is the lesser of the 2 evils? I couldn't know for sure without running some tests...

    My advice is to start with upgrading your web server hardware/software (start with a server powerful enough for your site to "grow into"), and then worry about squeezing out every last ounce of CPU you can for a given number of FFmpeg processes. At the end of the day, as your site grows and you find that you need more "juice" to power your FFmpeg conversions, it may just be easier to upgrade your server hardware, use a more efficient web server (like NginX), and/or employ multiple servers in a load balancing configuration.

    Edit: As a quick fix, to ensure that FFmpeg doesn't max out your server's available CPU, you might also check your server's current load averages via PHP prior to each FFmpeg conversion: http://php.net/manual/en/function.sys-getloadavg.php. Then you only allow FFmpeg conversions if your CPU load is less than X load units. So, if your CPU load is approaching, equal to, or exceeding 100% capacity, then your users might get a message saying that the server is busy and they should try their conversion again in a few minutes. Of course, the downside to this strategy is that you can't accommodate all conversion requests. But, with any server, you inevitably have a finite number of resources before you need a more powerful server, so this strategy might help you in the interim (when your current CPU is maxing out and you are in the process of looking for another, more powerful server, or perhaps you're investigating upgrading your current server).
    Last edited by chump2877; 11-03-2013 at 01:54 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!

  7. #996
    New to the CF scene
    Join Date
    Nov 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Is there actually an free version which is working? I only see a paid version...

    Regards

    Thomas

  8. #997
    New to the CF scene
    Join Date
    Nov 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    dig rajwebconsulting.com
    Code:
    Domain Name: RAJWEBCONSULTING.COM
     Registrar: ENOM, INC.
     Name Server: DNS1.NAME-SERVICES.COM
     Name Server: DNS2.NAME-SERVICES.COM
     Name Server: DNS3.NAME-SERVICES.COM
     Name Server: DNS4.NAME-SERVICES.COM
     Name Server: DNS5.NAME-SERVICES.COM
     Status: clientTransferProhibited
     Updated Date: 01-nov-2013
     Creation Date: 31-oct-2010
     Expiration Date: 31-oct-2014
    Looks like someone forgot to renew the domain.
    Hopefully this will be fixed very soon.

  9. #998
    New Coder
    Join Date
    Jan 2013
    Posts
    42
    Thanks
    1
    Thanked 0 Times in 0 Posts

    hi



    i have big error website stop when 200 personne in my website
    please help

  10. #999
    New Coder
    Join Date
    Jan 2013
    Posts
    42
    Thanks
    1
    Thanked 0 Times in 0 Posts
    please reply the website use lot of ram
    now i have 4 gb and website slow

  11. #1000
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by successman View Post
    dig rajwebconsulting.com
    Code:
    Domain Name: RAJWEBCONSULTING.COM
     Registrar: ENOM, INC.
     Name Server: DNS1.NAME-SERVICES.COM
     Name Server: DNS2.NAME-SERVICES.COM
     Name Server: DNS3.NAME-SERVICES.COM
     Name Server: DNS4.NAME-SERVICES.COM
     Name Server: DNS5.NAME-SERVICES.COM
     Status: clientTransferProhibited
     Updated Date: 01-nov-2013
     Creation Date: 31-oct-2010
     Expiration Date: 31-oct-2014
    Looks like someone forgot to renew the domain.
    Hopefully this will be fixed very soon.
    Thanks for the heads up!!

    I renewed (paid for) the domain name close to 2 months ago. So this is a result of the incompetence of my domain name registrar.

    I have submitted a trouble ticket with their support team, and like you, I hope this is resolved very soon!

    In the meantime, I do apologize for the downtime!
    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. #1001
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by YConverter View Post
    Hi,

    Is there actually an free version which is working? I only see a paid version...

    Regards

    Thomas
    Yes, both the free version and the paid version do work!

    But due to the negligence of my domain name registrar, brand-new installations of my software will not currently convert encrypted YouTube videos.

    As soon as the domain name renewal issue is rectified, I will let you know here!!

    Again, I am truly sorry for the confusion. But this is not my fault!
    Last edited by chump2877; 11-03-2013 at 01:38 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!

  13. #1002
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts

    We're back in business!!

    The domain name is back online!

    Brand-new installations of both the free and commercial versions of my software should now work as expected!

    Existing installations of my software should not have experienced any downtime!

    Thank you to all those affected by this inconvenience for your understanding and patience!
    Last edited by chump2877; 11-03-2013 at 01:39 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!

  14. #1003
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by phpLover7 View Post
    please reply the website use lot of ram
    now i have 4 gb and website slow
    Hi,

    My software does not require a lot of RAM to function efficiently, even with high traffic to your site.

    4 GB of RAM for your amount of traffic should be sufficient.

    What kind of CPU does your server have? How many cores? What are your server load averages?

    Do you have anything else (any other sites?) installed and running on your server?

    Have you checked your Apache logs for errors?
    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!

  15. #1004
    New Coder
    Join Date
    Jan 2013
    Posts
    42
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Hi dear

    i have vps i have just one website in server
    4 cpu

  16. #1005
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by phpLover7 View Post
    i have vps i have just one website in server
    4 cpu
    Try checking the running processes on your server to see what is using up the most CPU and/or memory on your system. Then you can start by troubleshooting those particular processes...

    On Linux systems, the command "top" will give you this information....

    Edit: Also, are you sure this is not a network connection/speed issue?
    Last edited by chump2877; 11-03-2013 at 01:11 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!


 
Page 67 of 75 FirstFirst ... 17576566676869 ... LastLast

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
  •