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 60 of 78 FirstFirst ... 1050585960616270 ... LastLast
Results 886 to 900 of 1167
Like Tree4Likes

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

  1. #886
    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
    Hi everyone,

    It seems YouTube has stopped encrypting signatures for some video channels (like Vevo). And even so, in the corresponding YouTube "video info" pages, these videos are still tagged/marked as using encryption.

    I don't know if this is temporary or permanent or a fluke or what, so in the meantime, please do the following to keep my software operational:

    Free Version:

    In YouTubeToMp3Converter.class.php, in SetFlvUrls(), please comment out the following line like so:

    PHP Code:
    //$vars['signature'] = UtilityFunctions::DecryptYouTubeCypher($vars['signature']); 
    Paid Version:

    In VideoConverter.class.php, in PrepareYouTubeDownloadLink(), please comment out the following line like so:

    PHP Code:
    //$vars['signature'] = UtilityFunctions::DecryptYouTubeCypher($vars['signature']); 
    Soon, I will release a "fix" for both the free and paid for versions that:

    1) First tries to download videos marked as using encryption using a decrypted signature
    2) If that fails, the original signature is used (sans any decryption) to initiate the download

    This should effectively accommodate our current situation here.

    Thanks for your patience while I address this issue!
    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. #887
    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
    Soon, I will release a "fix" for both the free and paid for versions that:

    1) First tries to download videos marked as using encryption using a decrypted signature
    2) If that fails, the original signature is used (sans any decryption) to initiate the download

    This should effectively accommodate our current situation here.
    After contemplating this some more, I've decided that a "wait-and-see" approach is the best course of action here.

    The fact that YouTube is telling us that a given video is encrypted, and then not encrypting the corresponding video's signature, seems to imply that YouTube is in some kind of volatile state right now -- and further changes may be coming?

    So I'd rather not "fix" something here (in the base app code as opposed to just updating a signature decryption) until I am convinced that these changes with YouTube are relatively long-term.

    In the meantime, any new (and existing) users of either the free or paid-for versions should following the instructions here to keep the software functioning.

    I will post an update here when I decide that a permanent "fix" is warranted for this issue or if this temporary fix is no longer required.

    Thanks for your understanding.
    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. The Following 2 Users Say Thank You to chump2877 For This Useful Post:

    bbrog (08-21-2013), zhanly (08-22-2013)

  4. #888
    New to the CF scene
    Join Date
    Jul 2013
    Location
    Bali, Indonesia
    Posts
    8
    Thanks
    2
    Thanked 2 Times in 1 Post

    Question [OOT] Recommended VPS?

    Hi!

    Can you guys please suggest me VPS provider for this kind of website?

    FYI, my website traffic is only about 1,000 UV / Day, but the bandwidth has exceeded to 1TB

    My question is, what is the recommended specs/reqs for the VPS hosting?

    Thanks.

  5. #889
    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 chiman View Post
    Hi!

    Can you guys please suggest me VPS provider for this kind of website?

    FYI, my website traffic is only about 1,000 UV / Day, but the bandwidth has exceeded to 1TB

    My question is, what is the recommended specs/reqs for the VPS hosting?

    Thanks.
    Are your site visitors downloading/converting full-length movies on your site? If you have the paid-for version of my software, then you can set the maximum duration of videos that can be downloaded for each converted file type. So, for example, people can only download/convert videos to .mp4 that are less than 15 minutes long.

    Also, are you sure that your VPS isn't using bandwidth for something other than my software?

    What are the current specs of your VPS? Is your traffic metered? Perhaps that is the problem? You'll probably want to find hosting that allows for "unlimited" traffic...You might also consider upgrading to a better VPS plan or even dedicated hosting.

    I have had good experiences with the following web hosting companies (for this kind of software):

    1) http://www.ovh.co.uk/
    2) http://www.altushost.com/
    Last edited by chump2877; 08-22-2013 at 03:02 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!

  6. #890
    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 Cokaric View Post
    Can someone explain me why lighttpd (web server) gets
    sh: 1: /root/bin/ffmpeg: Permission denied
    when accessing ffmpeg?

    Solution was to move ffmpeg bin to same folder as script but I want to know why it doesn't work with /root/bin/ffmpeg bin and how to make script work with /root/bin/ffmpeg bin.
    If you are installing on Ubuntu, and it sounds like you are (or did), then '/root/bin/ffmpeg' is a non-standard location for the FFmpeg binary. On Ubuntu/Debian, you generally have FFmpeg located at '/usr/bin/ffmpeg', and on CentOS/Red Hat, you'll commonly find it at '/usr/local/bin/ffmpeg'.
    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. #891
    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
    Hello everyone,

    YouTube is once again encrypting video signatures!

    If you followed the instructions here, please undo that change per the following:

    Free Version:

    In YouTubeToMp3Converter.class.php, in SetFlvUrls(), please remove the comment from the following line like so:

    PHP Code:
    $vars['signature'] = UtilityFunctions::DecryptYouTubeCypher($vars['signature']); 
    Paid Version:

    In VideoConverter.class.php, in PrepareYouTubeDownloadLink(), please remove the comment from the following line like so:

    PHP Code:
    $vars['signature'] = UtilityFunctions::DecryptYouTubeCypher($vars['signature']); 
    After doing that (assuming that you needed to), your software will auto-update to decryption fix version 1.1 within the hour.

    Please let me know if you have any additional questions/concerns.
    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!

  8. Users who have thanked chump2877 for this post:

    bbrog (08-23-2013)

  9. #892
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy

    Hello Chump! I apologize for my bad english
    I bought your script a couple of days ago, thank you for your work!

    I made all server configuration requirements and install your script on the server, made all the settings in the file config.class.php as it was written README.txt.
    When I run the index.php, the browser displays 3 lines:
    Social Networking Buttons Placeholder
    youtubeconverting.com
    Convert YouTube and Dailymotion videos to
    that's all. There are no field to enter youtube-url and conversion parameters. What could be wrong?

    Settings for php on my server can be found here: youtubeconverting.com/VideoConverter/php.php

    I try to solve this problem: into the code of file index.php, I make comment of the lines N 146-152 (I see that script stops on these lines)
    Code:
    		array_walk($uniqueFtypes, function(&$ftype, $key) {$ftype = $ftype['fileExt'];});
    		$uniqueFtypes = array_values(array_unique($uniqueFtypes));
    		foreach ($uniqueFtypes as $key => $uftype)
    		{
    			echo $uftype;
    			echo ($uftype != end($uniqueFtypes)) ? (($key != count($uniqueFtypes)-2) ? ', ' : ', or ') : '';
    		}
    Script was loaded fine (without displaying the supported formats, which I commented out).
    Result you can check here: youtubeconverting.com/VideoConverter/index.php?
    Then I try to convert youtube video - script displays name of video and its preview, progress bar is empty with label under it: "Downloading video ... " Thats all, nothing happens ... I waited 20 minutes Nothing has happened in that time. Folders: videos, output, logs are empty.

    Please help! Tell me, what is a problem?

  10. #893
    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 pablos View Post
    Hello Chump! I apologize for my bad english
    I bought your script a couple of days ago, thank you for your work!

    I made all server configuration requirements and install your script on the server, made all the settings in the file config.class.php as it was written README.txt.
    When I run the index.php, the browser displays 3 lines:


    that's all. There are no field to enter youtube-url and conversion parameters. What could be wrong?

    Settings for php on my server can be found here: youtubeconverting.com/VideoConverter/php.php

    I try to solve this problem: into the code of file index.php, I make comment of the lines N 146-152 (I see that script stops on these lines)
    Code:
    		array_walk($uniqueFtypes, function(&$ftype, $key) {$ftype = $ftype['fileExt'];});
    		$uniqueFtypes = array_values(array_unique($uniqueFtypes));
    		foreach ($uniqueFtypes as $key => $uftype)
    		{
    			echo $uftype;
    			echo ($uftype != end($uniqueFtypes)) ? (($key != count($uniqueFtypes)-2) ? ', ' : ', or ') : '';
    		}
    Script was loaded fine (without displaying the supported formats, which I commented out).
    Result you can check here: youtubeconverting.com/VideoConverter/index.php?
    Then I try to convert youtube video - script displays name of video and its preview, progress bar is empty with label under it: "Downloading video ... " Thats all, nothing happens ... I waited 20 minutes Nothing has happened in that time. Folders: videos, output, logs are empty.

    Please help! Tell me, what is a problem?
    Hi pablos,

    A couple things I noticed:

    1) You're server OS is FreeBSD. FreeBSD and Linux are similar, but they are not the same. I have never tested my software on FreeBSD. Thus, while I can guarantee that my software will work as expected on Linux and Windows, I cannot guarantee it's successful operation on any other OS.

    2) The position of your error in index.php implies that the PHP code is struggling with the use of anonymous functions. But you are running PHP 5.3+, so I'm not sure why this would be a problem.


    So, the first thing you should do here is check your Apache error log. Do you see any relevant errors 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!

  11. Users who have thanked chump2877 for this post:

    pablos (08-27-2013)

  12. #894
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    So, the first thing you should do here is check your Apache error log. Do you see any relevant errors there?
    I allow showing errors in browser window, so now we can see next error:
    Code:
    Fatal error: Invalid opcode 153/1/8. in /home/sotiris/www/youtubeconverting.com/VideoConverter/index.php on line 148
    line 148 -
    PHP Code:
    array_walk($uniqueFtypes, function(&$ftype$key) {$ftype $ftype['fileExt'];}); 

  13. #895
    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 pablos View Post
    I allow showing errors in browser window, so now we can see next error:
    Code:
    Fatal error: Invalid opcode 153/1/8. in /home/sotiris/www/youtubeconverting.com/VideoConverter/index.php on line 148
    line 148 -
    PHP Code:
    array_walk($uniqueFtypes, function(&$ftype$key) {$ftype $ftype['fileExt'];}); 
    Are you using "eAccelerator": https://github.com/eaccelerator/eaccelerator

    Related issue: https://github.com/eaccelerator/eaccelerator/issues/16

    After checking your phpinfo(), you are indeed using eAccelerator:

    Additional .ini files parsed /usr/local/etc/php/eaccelerator.ini, /usr/local/etc/php/extensions.ini
    ...so this is probably your issue. eAccelerator does not seem to support PHP anonymous functions.
    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. #896
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you for your answer! I disable eAccelerator for this domain and now when I try to convert some youtube video I see next errors:
    Code:
    Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush in /home/sotiris/www/youtubeconverting.com/VideoConverter/index.php on line 173
    
    Warning: Division by zero in /home/sotiris/www/youtubeconverting.com/VideoConverter/VideoConverter.class.php on line 132
    Notice: ob_end_flush() [ref.outcontrol]: failed to delete and flush buffer. No buffer to delete or flush in /home/sotiris/www/youtubeconverting.com/VideoConverter/VideoConverter.class.php on line 137
    
    Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush in /home/sotiris/www/youtubeconverting.com/VideoConverter/VideoConverter.class.php on line 138
    Last 2 rows many times.
    And then script make its work, I see 1 file in "videos" folder. But folder "output" is empty.

  15. #897
    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 pablos View Post
    Thank you for your answer! I disable eAccelerator for this domain and now when I try to convert some youtube video I see next errors:
    Code:
    Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush in /home/sotiris/www/youtubeconverting.com/VideoConverter/index.php on line 173
    
    Warning: Division by zero in /home/sotiris/www/youtubeconverting.com/VideoConverter/VideoConverter.class.php on line 132
    Notice: ob_end_flush() [ref.outcontrol]: failed to delete and flush buffer. No buffer to delete or flush in /home/sotiris/www/youtubeconverting.com/VideoConverter/VideoConverter.class.php on line 137
    
    Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush in /home/sotiris/www/youtubeconverting.com/VideoConverter/VideoConverter.class.php on line 138
    Last 2 rows many times.
    And then script make its work, I see 1 file in "videos" folder. But folder "output" is empty.
    These PHP warnings/notices are of no consequence and do not adversely affect my app's performance. Simply suppress error reporting again in the script to make those messages disappear.

    If the 'output' folder is empty, then try the following:

    1) Please check that the _FFMPEG constant value in config.class.php points to the correct location of the FFmpeg binary on your Linux server.
    2) Please ensure that all relevant directories and files are chmod to 0777
    3) Please check your ‘videos’ directory. Are there video files in the directory? If so, are the video files playable? Are the videos fully downloaded? Are the videos 0 kb in length?
    4) Please check your ‘logs’ directory for FFmpeg log files. Are there any log files in the directory? If so, please copy and paste the contents of a log file that corresponds to a failed conversion. (There should be errors in the log file.)
    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. #898
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    1) Please check that the _FFMPEG constant value in config.class.php points to the correct location of the FFmpeg binary on your Linux server.
    2) Please ensure that all relevant directories and files are chmod to 0777
    3) Please check your videos directory. Are there video files in the directory? If so, are the video files playable? Are the videos fully downloaded? Are the videos 0 kb in length?
    4) Please check your logs directory for FFmpeg log files. Are there any log files in the directory? If so, please copy and paste the contents of a log file that corresponds to a failed conversion. (There should be errors in the log file.)
    1) its ok, I use right path: /usr/local/bin/ffmpeg
    2) i made 0777 to "logs", "output","ringtones", "videos" directories. Also UtilityFunctions.class.php and software.xml are 0777
    3) 1 file in "video" directory - it playable and fully downloaded.
    4) There are no any files in "logs" directory.

  17. #899
    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 pablos View Post
    1) its ok, I use right path: /usr/local/bin/ffmpeg
    2) i made 0777 to "logs", "output","ringtones", "videos" directories. Also UtilityFunctions.class.php and software.xml are 0777
    3) 1 file in "video" directory - it playable and fully downloaded.
    4) There are no any files in "logs" directory.
    Try "un-commenting" this line in DoConversion() in VideoConverter.class.php:

    PHP Code:
    //die($exec_string); 
    (Line 81 in my editor)

    That will output the FFmpeg command to the screen. Try running that command in the CLI. Does it work?

    Also check your paths to the relevant directories in config.class.php:

    PHP Code:
    const _TEMPVIDDIR 'videos/';
    const 
    _CONVERTED_FILEDIR 'output/';
    const 
    _LOGSDIR 'logs/'
    Try using absolute server paths here (instead of relative paths), i.e.: /home/user/public_html/videos/

    Also try using an absolute path to the 'logs/' directory in your individual FFmpeg commands for each converted file type, i.e. (in Config::_convertedFileTypes array):

    PHP Code:
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libmp3lame -ab %quality%k %newFile% 2> /home/user/public_html/logs/%id%.txt'
    Let me know how it goes...
    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!

  18. #900
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    Try "un-commenting" this line in DoConversion() in VideoConverter.class.php:

    PHP Code:
    //die($exec_string); 
    (Line 81 in my editor)

    That will output the FFmpeg command to the screen.
    Done. After that I see next in screen :
    Code:
    /usr/local/bin/ffmpeg/ -i videos/1377702083_521e10c3ef4081.86060449.flv -vol 256 -y -acodec libmp3lame -ab 128k output/Autechre_-_Puch_uuid-521e111d0a2ab.mp3 2> logs/1377702083_521e10c3ef4081.86060449.txt

    Quote Originally Posted by chump2877 View Post
    Also check your paths to the relevant directories in config.class.php:

    PHP Code:
    const _TEMPVIDDIR 'videos/';
    const 
    _CONVERTED_FILEDIR 'output/';
    const 
    _LOGSDIR 'logs/'
    Thats all correct in my config.class.php

    Quote Originally Posted by chump2877 View Post
    Try using absolute server paths here (instead of relative paths), i.e.: /home/user/public_html/videos/
    Done. Without positive effect. Not working yet.

    Quote Originally Posted by chump2877 View Post
    Also try using an absolute path to the 'logs/' directory in your individual FFmpeg commands for each converted file type, i.e. (in Config::_convertedFileTypes array):

    PHP Code:
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libmp3lame -ab %quality%k %newFile% 2> /home/user/public_html/logs/%id%.txt'
    Let me know how it goes...
    I try it, but script stops on "converting video..." again


 
Page 60 of 78 FirstFirst ... 1050585960616270 ... 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
  •