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 55 of 81 FirstFirst ... 545535455565765 ... LastLast
Results 811 to 825 of 1209
Like Tree7Likes

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

  1. #811
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    YouTube has changed the encryption used on video signatures again!

    I have updated the free version with a very minor (but necessary!) tweak to the code, to address an issue with the auto-updating feature.

    Please download the latest version of the code here: http://www.codingforums.com/showpost...&postcount=807

    As soon as I am comfortable that the auto-updating feature is working as expected, I will move the code to the paid-for version of my software as well.
    For now, I will post the latest decryption code here and email all previous purchasers of the paid-for version with the URL to the corresponding forum post.

    Edit: It is imperative that you guys let me know if the auto-updating feature is working correctly for you! In the not-so-distant future, I will no longer be posting video signature encryption fixes here, and I will instead be updating your software directly via the auto-updating functionality. So if you are experiencing any kind of issues with this feature (and even if you aren't!), I need to know NOW. I'm available via this forum thread, forum PM, Skype, or email. So, good or bad, I need your feedback about this new functionality -- to ensure that my software continues to operate as expected for all of you. Thanks!
    Last edited by chump2877; 07-31-2013 at 03:01 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!

  2. #812
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    YouTube changed their encryption again!

    Here is the fix. This function is meant to be a drop-in replacement for the function of the same name in VideoConverter.class.php (paid version):

    PHP Code:
            private function DecryptYouTubeCypher($signature)
            {
                
    $s $signature;
                
    $sigLength strlen($s);
                switch (
    $sigLength)
                {
                    case 
    92:
                        
    $s substr($s251) . substr($s322) . substr($s01) . substr($s2616) . substr($s791) . substr($s4336) . substr($s911) . substr($s803);
                        break;
                    case 
    90:
                        
    $s substr($s251) . substr($s322) . substr($s21) . substr($s2614) . substr($s771) . substr($s4136) . substr($s891) . substr($s783);
                        break;
                    case 
    88:
                        
    $s substr($s481) . strrev(substr($s6814)) . substr($s821) . strrev(substr($s634)) . substr($s851) . strrev(substr($s4913)) . substr($s671) . strrev(substr($s1335)) . substr($s31) . strrev(substr($s48)) . substr($s21) . substr($s121);
                        break;
                    case 
    87:
                        
    $s substr($s419) . substr($s861) . substr($s2461);
                        break;
                    case 
    86:
                        
    $s substr($s832) . substr($s261) . strrev(substr($s4733)) . substr($s851) . strrev(substr($s379)) . substr($s301) . strrev(substr($s315)) . substr($s461) . strrev(substr($s273)) . substr($s821) . strrev(substr($s224));
                        
    //$s = substr($s, 2, 61) . substr($s, 82, 1) . substr($s, 64, 18) . substr($s, 63, 1);
                        
    break;
                    case 
    85:
                        
    $s substr($s26) . substr($s01) . substr($s912) . substr($s651) . substr($s2243) . substr($s841) . substr($s6616) . substr($s211);
                        break;
                    case 
    84:
                        
    $s strrev(substr($s3747)) . substr($s21) . strrev(substr($s279)) . substr($s31) . strrev(substr($s422)) . substr($s261);
                        break;
                    case 
    83:
                        
    $s substr($s61) . substr($s33) . substr($s331) . substr($s717) . substr($s01) . substr($s258) . substr($s531) . substr($s3419) . substr($s241) . substr($s54);
                        break;
                    case 
    82:
                        
    $s substr($s361) . strrev(substr($s6812)) . substr($s811) . strrev(substr($s4126)) . substr($s331) . strrev(substr($s373)) . substr($s401) . substr($s351) . substr($s01) . substr($s671) . strrev(substr($s132)) . substr($s341);
                        break;
                    case 
    81:
                        
    $s substr($s561) . strrev(substr($s5723)) . substr($s411) . strrev(substr($s4214)) . substr($s801) . strrev(substr($s356)) . substr($s01) . strrev(substr($s304)) . substr($s341) . strrev(substr($s1019)) . substr($s291) . strrev(substr($s18)) . substr($s91);
                        break;
                    case 
    79:
                        
    $s substr($s541) . strrev(substr($s5523)) . substr($s391) . strrev(substr($s4014)) . substr($s781) . strrev(substr($s354)) . substr($s01) . strrev(substr($s304)) . substr($s341) . strrev(substr($s1019)) . substr($s291) . strrev(substr($s18)) . substr($s91);
                        break;
                    default:
                        
    $s $signature;
                }
                return 
    $s;
            } 
    I will email a link (to this forum post) to all buyers who have previously purchased the paid-for version of my software.

    Thanks!

    Edit: Users of the free version of my software should begin to migrate to this version here: http://www.codingforums.com/showpost...&postcount=807. Again, I will update the paid-for version with the auto-updating functionality just as soon as I have worked out any remaining bugs in this new feature!
    Last edited by chump2877; 07-31-2013 at 02:29 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!

  3. Users who have thanked chump2877 for this post:

    bakermanus (08-01-2013)

  4. #813
    New Coder
    Join Date
    Jun 2012
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi, is this fix also for the free version? Or only paid?

  5. #814
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by bbrog View Post
    Hi, is this fix also for the free version? Or only paid?
    Free version: http://www.codingforums.com/showpost...&postcount=807

    Paid version: http://www.codingforums.com/showpost...&postcount=811

    The decryption code is the same for both the free and paid-for versions, and it always will be. But soon I will be implementing the new "auto-update" feature (currently only in beta testing, in the free version) in all versions of my software (both free and commercial). And at that point, I will no longer post decryption code fixes directly to the forum. So, as soon as the "auto-update" feature is available for whichever version you are using, I suggest that you start using it ASAP. Because eventually the only way to get the updated decryption code will be via the new auto-update functionality.
    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!

  6. Users who have thanked chump2877 for this post:

    rajah (08-01-2013)

  7. #815
    New Coder
    Join Date
    Jun 2013
    Posts
    29
    Thanks
    3
    Thanked 1 Time in 1 Post
    I think when FixYouTubeDecryption called in saveVideo func, it will failed to download that times, do you think it is better to "re-download" the video after update DecryptYouTubeCypher func? (just my opinion no offence)

    regards,
    Vidtunez admin
    www.vidtunez.com

  8. #816
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by rajah View Post
    I think when FixYouTubeDecryption called in saveVideo func, it will failed to download that times, do you think it is better to "re-download" the video after update DecryptYouTubeCypher func? (just my opinion no offence)

    regards,
    Vidtunez admin
    www.vidtunez.com
    Hi,

    So you have tried the auto-updating feature and it is working for you? Just looking for general feedback about the new feature's performance...

    With regard to your suggestion: Yes, I could have the code retry the conversion that triggered the update immediately after the decryption code is updated. But you're talking about one conversion request, approximately once (maybe twice?) a week, on your site. So in the scheme of things, this is a pretty minor inconvenience -- especially if you offer a useful error message like this: "Temporary error, download failed, please try again in a few moments".

    That said, I do appreciate your suggestion, and I will definitely add it to my "to-do" list. So when I have some free time, I will consider integrating this idea into a future version of the software. For what it's worth, I don't think it would be terribly difficult to "fix" this..

    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!

  9. #817
    New Coder
    Join Date
    Jun 2013
    Posts
    29
    Thanks
    3
    Thanked 1 Time in 1 Post
    I'm integrating your code to my web. But it not worked properly, I don't have time to debugging it right now(Maybe I'll do it this weekend), so I still use the previous version.

    I'm only "roughly" read your code. but my question , you make ytcipher variable to global (private in class). Will it affect the second times convert? (I means if the first convert is "signatured")

    regards,
    Vidtunez admin
    www.vidtunez.com

  10. #818
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi it is working for me with vevo, however some video is grabbed in webm formate and it will not convert. Here is my log file.

    FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
    built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
    libavutil 50.15. 1 / 50.15. 1
    libavcodec 52.72. 2 / 52.72. 2
    libavformat 52.64. 2 / 52.64. 2
    libavdevice 52. 2. 0 / 52. 2. 0
    libavfilter 1.19. 0 / 1.19. 0
    libswscale 0.11. 0 / 0.11. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    [matroska @ 0x656d90]Estimating duration from bitrate, this may be inaccurate

    Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
    Input #0, matroska, from 'videos/1375349837_51fa2c4d480887.91454099.flv':
    Metadata:
    doctype : webm
    Duration: 00:03:39.97, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: 0x0000, 1280x720, PAR 1:1 DAR 16:9, 1k fps, 25 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: vorbis, 44100 Hz, stereo, s16
    swScaler: Unknown format is not supported as input pixel format
    Cannot get resampling context



    Can you look into it? thanks

  11. #819
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by bakermanus View Post
    Hi it is working for me with vevo, however some video is grabbed in webm formate and it will not convert. Here is my log file.

    FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
    built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
    libavutil 50.15. 1 / 50.15. 1
    libavcodec 52.72. 2 / 52.72. 2
    libavformat 52.64. 2 / 52.64. 2
    libavdevice 52. 2. 0 / 52. 2. 0
    libavfilter 1.19. 0 / 1.19. 0
    libswscale 0.11. 0 / 0.11. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    [matroska @ 0x656d90]Estimating duration from bitrate, this may be inaccurate

    Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
    Input #0, matroska, from 'videos/1375349837_51fa2c4d480887.91454099.flv':
    Metadata:
    doctype : webm
    Duration: 00:03:39.97, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: 0x0000, 1280x720, PAR 1:1 DAR 16:9, 1k fps, 25 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: vorbis, 44100 Hz, stereo, s16
    swScaler: Unknown format is not supported as input pixel format
    Cannot get resampling context



    Can you look into it? thanks


    Actually the issue seems to be only if convert to flv or mp4. Its ok mp3 or 3gp. why is this? Thanks

  12. #820
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by rajah View Post
    I'm only "roughly" read your code. but my question , you make ytcipher variable to global (private in class). Will it affect the second times convert? (I means if the first convert is "signatured")

    regards,
    Vidtunez admin
    www.vidtunez.com
    By default, each conversion uses a new instance of the class. So unless you are performing simultaneous (and/or multiple) conversions in the same HTTP request, and you are re-using the same class object over and over again, then having $_ytCypherUsed set as a global class field will not adversely affect your site performance. And even if you were doing this, you could simply switch $_ytCypherUsed to 'false' prior to calling DownloadVideo() 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!

  13. #821
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by bakermanus View Post
    Actually the issue seems to be only if convert to flv or mp4. Its ok mp3 or 3gp. why is this? Thanks
    The log file output seems to indicate that your installation of FFmpeg is unable to recognize 'webm' an an input video format. Regardless of exactly what video format FFmpeg is having trouble recognizing, it looks like you are missing whatever relevant codec is required to parse that video.

    By default, when you convert to flv or mp4 formats, you are downloading the 720p version of the YouTube video (if one is available). If you check the table here, it would seem that you are probably downloading the 720p, webm version of the video. The table indicates that this video is encoded with the VP8 codec. So you'll want to ensure that you have the VP8 codec compiled with FFmpeg and that it is installed correctly.

    Try looking into that first, and then we can go from there...
    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. #822
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi,
    Thanks for your reply. If thats the case then 3gp would not be converted either. Thats the funny bit that 3gp converts properly. The file that downloads is in flv and not webm.


    Quote Originally Posted by chump2877 View Post
    The log file output seems to indicate that your installation of FFmpeg is unable to recognize 'webm' an an input video format. Regardless of exactly what video format FFmpeg is having trouble recognizing, it looks like you are missing whatever relevant codec is required to parse that video.

    By default, when you convert to flv or mp4 formats, you are downloading the 720p version of the YouTube video (if one is available). If you check the table here, it would seem that you are probably downloading the 720p, webm version of the video. The table indicates that this video is encoded with the VP8 codec. So you'll want to ensure that you have the VP8 codec compiled with FFmpeg and that it is installed correctly.

    Try looking into that first, and then we can go from there...

  15. #823
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by bakermanus View Post
    Hi,
    Thanks for your reply. If thats the case then 3gp would not be converted either. Thats the funny bit that 3gp converts properly. The file that downloads is in flv and not webm.
    Just because the video is saved with a .flv extension does not mean the encoding of the video has changed. The input file for FFmpeg is still encoded as webm/VP8 despite the file extension of the video.

    Can you confirm that you have the VP8 codec installed and working correctly?

    Edit: Also, are you absolutely sure that a given video downloaded from Youtube -- targeted for 3gp conversion -- is encoded with webm/VP8? If such a video is not encoded with webm/VP8, then that probably explains why you can convert to 3gp.
    Last edited by chump2877; 08-01-2013 at 08: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!

  16. #824
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, I'm new here, I was seeking for a script which converts youtube to mp3 and I found yours, so here I am.
    I tried to make it run but i got a problem:
    PHP Code:
    WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in 
    Which concerns this line:
    $percent = round($downloaded/$downloadSize, 2) * 100;
    I guess that $downloadSize is not defined or equal to 0.
    So I'd like to know why I'm getting this.
    I'm on debian, I installed everything chmod ....

    Thanks in advance

  17. #825
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,794
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by Sylvaind View Post
    Hi, I'm new here, I was seeking for a script which converts youtube to mp3 and I found yours, so here I am.
    I tried to make it run but i got a problem:
    PHP Code:
    WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in /var/www/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 111 WarningDivision by zero in 
    Which concerns this line:
    $percent = round($downloaded/$downloadSize, 2) * 100;
    I guess that $downloadSize is not defined or equal to 0.
    So I'd like to know why I'm getting this.
    I'm on debian, I installed everything chmod ....

    Thanks in advance
    That is a side effect of the download progress bar. It is nothing to worry about. If you disable error reporting in the script (which you should always do anyway for security reasons), then you won't see this warning and neither will your site visitors.
    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 55 of 81 FirstFirst ... 545535455565765 ... LastLast

LinkBacks (?)

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