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 17 of 78 FirstFirst ... 715161718192767 ... LastLast
Results 241 to 255 of 1167
Like Tree4Likes

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

  1. #241
    New Coder
    Join Date
    Feb 2012
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts
    its all correct in the config.class file, what i meant with ffmpeg-64.exe is that i am using 64bit version :P

    can you shed some light on ffmpeg-php please...

  2. #242
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,773
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by umang.goyal View Post
    Hi,
    i have been trying to run this script on my laptop with xampp for windows.
    i have done everything(latest ffmpeg.exe, latest php script of your app) and have setup it as said in instructions but still i am not getting it work for me..when ever i try to convert a youtube video it stuck on the page where is shows downloading video, it never progress. i have even checked in the video folder video size is always zero kb and process freezes there only. No error is shown neither any log. Please can you help me sort out the problem.

    Thanks & Regards,
    Umang Goyal
    Sounds like a cURL problem...make sure cURL is enabled in php.ini...check to make sure cURL is listed in your phpinfo()
    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. Users who have thanked chump2877 for this post:

    umang.goyal (02-24-2012)

  4. #243
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,773
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by umang.goyal View Post
    its all correct in the config.class file, what i meant with ffmpeg-64.exe is that i am using 64bit version :P

    can you shed some light on ffmpeg-php please...
    You don't need ffmpeg-php if you are running XAMPP for Windows. Only ffmpeg.exe is required.

    I'm still using the 32-bit version of ffmpeg.exe on my Windows 7 Pro 64-bit OS and it works fine.
    Last edited by chump2877; 02-24-2012 at 03:53 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!

  5. #244
    New Coder
    Join Date
    Feb 2012
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    Sounds like a cURL problem...make sure cURL is enabled in php.ini...check to make sure cURL is listed in your phpinfo()
    hi, thanks for pointing that out. i just enabled the cURL and it worked like charm. the only thing is that the progress bar doesn't show progress while converting the video into mp3.
    and thanks for the script i loved it

  6. #245
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,773
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by umang.goyal View Post
    the only thing is that the progress bar doesn't show progress while converting the video into mp3.
    I've posted all kinds of ways to troubleshoot this issue in this thread, so please try some of those things...if you still can't get it to work, come back here, update me with what you were able to find out, and I'll see if I can help you further...
    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. #246
    New Coder
    Join Date
    Feb 2012
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by umang.goyal View Post
    hi, thanks for pointing that out. i just enabled the cURL and it worked like charm. the only thing is that the progress bar doesn't show progress while converting the video into mp3.
    and thanks for the script i loved it
    I've the same problem, no progress bar on conversion problem ... I search why !

  8. #247
    New Coder
    Join Date
    Feb 2012
    Posts
    15
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Can anybaddy check this url if you can download that: http://www.youtube.com/watch?v=XeqcEhrOM7s

    I become "Error downloading video!"

  9. #248
    New Coder
    Join Date
    Feb 2012
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Well i am thinking of putting it up on a linux server. can we do that? i will need to do the needful changes in php.ini like extensions and maybe some other changes...can someone help me with this??

    Thanks & Regards,
    Umang Goyal

  10. #249
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,773
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by cana888 View Post
    Can anybaddy check this url if you can download that: http://www.youtube.com/watch?v=XeqcEhrOM7s

    I become "Error downloading video!"
    I can confirm that I had the same problem for that video. Other videos download/convert fine though, so this appears to be an isolated incident -- an anomaly. However, if you find that the code is "choking" on other videos as well, please let know. In that case, I may have to modify the code accordingly. Keep me posted.
    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!

  11. #250
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,773
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by umang.goyal View Post
    Well i am thinking of putting it up on a linux server. can we do that? i will need to do the needful changes in php.ini like extensions and maybe some other changes...can someone help me with this??

    Thanks & Regards,
    Umang Goyal
    The code will work on Linux. See this post: YouTube-to-MP3 conversion - PHP class and script. If you need help with this, let me know and I'll do my best.
    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. #251
    New Coder
    Join Date
    Feb 2012
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts
    For everything those who have a problem with the conversion progress bar, I've modified the script of chump, to resolve this problem

    it's not a very good modification but it's works fine

    in fact with the original script I've a problem with this line :

    PHP Code:
      $currentTime = (float)end($times[2]); 
    why no idear , so I wrote a modification :

    original script by chump :

    PHP Code:
      if (preg_match('/(Duration: )(\d\d):(\d\d):(\d\d\.\d\d)/i'$log$matches) == 1)
            {
                
    $totalTime = ((int)$matches[2] * 60 60) + ((int)$matches[3] * 60) + (float)$matches[4];
                
    $numTimes preg_match_all('/(time=)(.+?)(\s)/i'$log$times);
                if (
    $numTimes 0)
                {
                    
    $currentTime = (float)end($times[2]);
                    
    $progress round(($currentTime $totalTime) * 100);
                    if (
    $progress 100)
                    {
                        
    $newLogLength $file_size;
                    } 

    Modification by me :

    PHP Code:
     if (preg_match('/(Duration: )(\d\d):(\d\d):(\d\d\.\d\d)/i'$log$matches) == 1)
            {
                  
    $totalTime = ((int)$matches[2] * 60 60) + ((int)$matches[3] * 60) + (float)$matches[4];
                  
    $numTimes preg_match_all('/(time=)(.+?)(\s)/i'$log$times);


                  if (
    $numTimes  ) {
                                 
    $count=count($times[0]);
                                 for(
    $i=0;$i<$count;$i++)
                                 { 
                                 
    $numTimes $times[0][$i];
                                 
    $parse_numTimes =  list($hours,$minutes,$seconds,$mili) = split(':',$numTimes);
                                 
    $seconds_numTimes  $hours 3600 $minutes 60 $seconds;
                                 
    $progress round(($seconds_numTimes $totalTime) * 100);
                                 } 
                  if (
    $progress 100 )
                    {
                        
    $newLogLength $file_size;
                    } 
    I hope this help you if you've some problem with the original script !
    Last edited by chump2877; 02-26-2012 at 09:18 AM. Reason: Added PHP forum post tags

  13. #252
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,773
    Thanks
    19
    Thanked 155 Times in 146 Posts
    bedo1974, your issue appears to be with preg_match_all()...so in fact, your issue is with this line:

    PHP Code:
    $numTimes preg_match_all('/(time=)(.+?)(\s)/i'$log$times); 
    For you, it does not seem to be capturing matches of parenthesized (sub)patterns -- only matches of the entire regex pattern...

    Did you try adding a flag to preg_match_all, like so:

    PHP Code:
    $numTimes preg_match_all('/(time=)(.+?)(\s)/i'$log$timesPREG_PATTERN_ORDER); 
    If that doesn't do it, then perhaps there is some strange configuration/compilation error in PHP as it pertains to PCRE.
    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. #253
    New Coder
    Join Date
    Feb 2012
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hi chump, I test now with you'r suggestion

  15. #254
    New Coder
    Join Date
    Feb 2012
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts
    $numTimes = preg_match_all('/(time=)(.+?)(\s)/i', $log, $times, PREG_PATTERN_ORDER);
    don't work on my server chump, I think it's right, configuration/compilation error in my php I will see

  16. #255
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi,

    I'm having an issue: the video doesn't seem to get downloaded by the server. It creates a 0ko file and then try to convert it. As you might guess, I get a convert error in the log.
    cURL, ffmpeg and ffmpeg-php are installed and working.
    PHP Version 5.3.2-1 ubuntu 4.14

    For this video:
    http://www.youtube.com/watch?v=do23sTe4dhA
    it gives me this GetFlvUrl():
    http://o-o.preferred.par08s01.v5.lsc...8db7b137b87610

    I think the problem may be that link (it doesn't seem to be a FLV!)
    so the problem may come from SetFlvUrl(), which is at the very moment:

    PHP Code:
            private function SetFlvUrl($file_contents)
            {
                
    $vidUrl '';
                if (
    eregi('"url_encoded_fmt_stream_map": "url=',$file_contents))
                {
                    
    $vidUrl end(explode('"url_encoded_fmt_stream_map": "url=',$file_contents));
                    
    $vidUrl urldecode(urldecode(current(explode('\u0026',$vidUrl))));
                }
                
    //die($vidUrl);
                
    $this->_flvUrl $vidUrl;
            } 
    Any idea?
    Thanks in advance!

    P.S: Sorry for my english I'm doing my best
    Last edited by orditeck; 02-26-2012 at 06:18 PM.


 
Page 17 of 78 FirstFirst ... 715161718192767 ... LastLast

LinkBacks (?)

  1. 07-21-2014, 05:32 PM
  2. 07-12-2014, 05:59 PM
  3. 06-26-2014, 03:39 PM
  4. 05-31-2014, 09:13 PM
  5. 04-24-2014, 07:53 PM
  6. 04-19-2014, 10:22 AM
  7. 04-04-2014, 08:33 PM
  8. 04-04-2014, 01:58 AM
  9. 03-28-2014, 06:03 AM
  10. 03-20-2014, 06:11 PM
  11. 03-16-2014, 01:22 AM
  12. 03-08-2014, 04:56 PM
  13. 03-07-2014, 06:21 PM
  14. 03-01-2014, 12:48 PM
  15. 02-22-2014, 08:40 PM
  16. 02-22-2014, 12:02 AM
  17. 02-21-2014, 08:15 PM
  18. 02-21-2014, 12:00 AM
  19. 02-20-2014, 08:37 PM
  20. 02-20-2014, 06:53 PM
  21. 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
  •