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 32 of 88 FirstFirst ... 2230313233344282 ... LastLast
Results 466 to 480 of 1313
Like Tree13Likes

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

  1. #466
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by drakus View Post
    on line 121 change of VideoConverter.class.php
    Code:
    $percent = round($downloaded/$downloadSize, 2) * 100;
    to

    Code:
    $percent = @round($downloaded/$downloadSize, 2) * 100;
    than on line 230 same file, change

    Code:
    if ($vidSrc !== false && eregi('eow-title',$vidSrc))
    to

    Code:
    if ($vidSrc !== false && preg_match('eow-title$/i',$vidSrc))
    Thank should fix it.
    Thanks, but now it gets stuck to this "Error downloading video!" Says that on every video... Before changing those 2 lines, it worked.

  2. #467
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by Lanibox View Post
    Im getting this error at Site5 hosting...
    Any help?

    Code:
    [18-Sep-2012 11:54:57] PHP Deprecated:  Function eregi() is deprecated in /home/tubeconv/public_html/VideoConverter.class.php on line 230
    [18-Sep-2012 11:54:57] PHP Deprecated:  Function eregi() is deprecated in /home/tubeconv/public_html/VideoConverter.class.php on line 230
    [18-Sep-2012 11:54:58] PHP Warning:  Division by zero in /home/tubeconv/public_html/VideoConverter.class.php on line 121
    [18-Sep-2012 11:54:58] PHP Warning:  Division by zero in /home/tubeconv/public_html/VideoConverter.class.php on line 121
    Im using updated version of paid script.
    If you turn off error reporting, then you won't see any of those warnings. (You should ALWAYS turn of error reporting on a live, production-level site. Hackers can use the info in error messages to cause harm to your site.)

    At the top of index.php, I have already disabled error reporting via this line of code:

    PHP Code:
    ini_set('display_errors',0); 
    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!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  3. #468
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    If you turn off error reporting, then you won't see any of those warnings. (You should ALWAYS turn of error reporting on a live, production-level site. Hackers can use the info in error messages to cause harm to your site.)

    At the top of index.php, I have already disabled error reporting via this line of code:

    PHP Code:
    ini_set('display_errors',0); 
    Its not still gonna fix my problem im having... In previous page somebody gave me 2 lines to change, then it got stuck to downloading and it gives me "Error downloading video" message. Before changing those lines it got stuck to converting.

    Any idea whats wrong?

  4. #469
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by Lanibox View Post
    Its not still gonna fix my problem im having... In previous page somebody gave me 2 lines to change, then it got stuck to downloading and it gives me "Error downloading video" message. Before changing those lines it got stuck to converting.

    Any idea whats wrong?
    So if you change the code back to the way it was, and you disable error reporting, you still have trouble with converting?

    First of all, I strongly suggest that you search this forum thread for ways to troubleshoot this issue. I have addressed this problem many times before.

    Second, what is the URL of your site? (Is the site live and online?) I can take a quick look...Also, you could paste a copy of a FFmpeg log file from a failed conversion, and I can see if there are any issues 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!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  5. #470
    New Coder
    Join Date
    Feb 2012
    Posts
    24
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Lanibox View Post
    Its not still gonna fix my problem im having... In previous page somebody gave me 2 lines to change, then it got stuck to downloading and it gives me "Error downloading video" message. Before changing those lines it got stuck to converting.

    Any idea whats wrong?
    Those 2 lines fix for php 5.2 which is way outdated. If a host is still using it, than do not use them, it's a sign of no security updates. centrix is running cpanel which always uses the lateste version of apache2 & php5.3 or 5.4 now.

    I tell you a secret, if the server is misonfigured or heavily configured like mine is for major speed and caching, it most likely will not work. I set up another server defaulted with some security to it and works great.

    google page speed messes with it, APC as well memcache(d) as well.

    for $20 - $30 a month you can get your own VPS from a decent provider and won't be oversold. if you are looking to advance beyond shared hosting, i suggest it.

  6. #471
    New Coder
    Join Date
    Sep 2012
    Location
    Germany
    Posts
    43
    Thanks
    11
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by chump2877 View Post
    Looking good!

    It should be fairly straightforward to add additional converted file types...Was it for you?
    Thanks

    Yes it was very easy

    PHP Code:
    protected $_convertedFileTypes = array(
                
    => array(
                    
    'fileExt' => 'flv',
                    
    'mimeType' => 'video/x-flv',
                    
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libmp3lame -ab %quality%k -vcodec libx264 -vpre veryfast -vb %vquality%k %newFile% 2> logs/%id%.txt'
                
    ),
                
    => array(
                    
    'fileExt' => 'mp4',
                    
    'mimeType' => 'video/mp4',
                    
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libmp3lame -ab %quality%k -vcodec libx264 -vpre veryfast -vb %vquality%k %newFile% 2> logs/%id%.txt'
                
    ),
                
    => array(
                    
    'fileExt' => 'mp3',
                    
    'mimeType' => 'audio/mpeg3',
                    
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libmp3lame -ab %quality%k %newFile% 2> logs/%id%.txt',
                    
    'quality' => '192',
                    
    'checked' => 'checked'
                
    ),
                
    => array(
                    
    'fileExt' => 'mp3',
                    
    'mimeType' => 'audio/mpeg3',
                    
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libmp3lame -ab %quality%k %newFile% 2> logs/%id%.txt',
                    
    'quality' => '320'
                         
    ),
                
    => array(
                    
    'fileExt' => 'aac',
                    
    'mimeType' => 'audio/aac',
                    
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libfaac -ab %quality%k %newFile% 2> logs/%id%.txt',

                ),
                
    => array(
                    
    'fileExt' => '3gp',
                    
    'mimeType' => 'video/3gpp',
                    
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec copy -ab %quality%k -vcodec libx264 -vpre veryfast %newFile% 2> logs/%id%.txt'
                         
    ),
                
    => array(
                    
    'fileExt' => 'avi',
                    
    'mimeType' => 'video/avi',
                    
    'ffmpeg' => '%ffmpeg% -i %tempFile% -vol %volume% -y -acodec libmp3lame -ab %quality%k -vcodec libxvid -vb 1000k %newFile% 2> logs/%id%.txt'

                
    )
            ); 

  7. #472
    New Coder
    Join Date
    May 2012
    Posts
    81
    Thanks
    2
    Thanked 0 Times in 0 Posts
    please tell me how to fix download files size limit
    like limit on 10mb files when file above 10mb its not download
    help me please

  8. #473
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by blacktiger786 View Post
    please tell me how to fix download files size limit
    like limit on 10mb files when file above 10mb its not download
    help me please
    I have already answered this question here: http://www.codingforums.com/showpost...&postcount=433

    If you want me to implement this for you, I will have to charge you to do this custom work at my hourly rate. Please contact me privately if you are interested.
    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!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  9. #474
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i'm getting this error:

    Parse error: syntax error, unexpected T_FUNCTION in /home/admin/domains/xxx.xx[real domain]/public_html/youtubedown/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 188

    the line is $url = preg_replace_callback('/(&type=)(.+?)(&)/', function($match){return $match[1].urlencode($match[2]).$match[3];}, $url);

    i enabled error_reporting.

    the script is not working

  10. #475
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by Komshir View Post
    i'm getting this error:

    Parse error: syntax error, unexpected T_FUNCTION in /home/admin/domains/xxx.xx[real domain]/public_html/youtubedown/VideoToMp3Converter/YouTubeToMp3Converter.class.php on line 188

    the line is $url = preg_replace_callback('/(&type=)(.+?)(&)/', function($match){return $match[1].urlencode($match[2]).$match[3];}, $url);

    i enabled error_reporting.

    the script is not working
    What version of PHP are you running? You need at least PHP 5.3 for anonymous functions to work as type "callable" arguments. I'm guessing that is the source of your error.
    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!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  11. #476
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    What version of PHP are you running? You need at least PHP 5.3 for anonymous functions to work as type "callable" arguments. I'm guessing that is the source of your error.
    I'm running php5.2, can i somehow replace it with different function?

  12. #477
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by Komshir View Post
    I'm running php5.2, can i somehow replace it with different function?
    You could replace with create_function, but this is not the only part of the code that requires PHP 5.3. For example, the download/conversion progress bar will not work with PHP 5.2.

    I highly recommend that you either upgrade to 5.3 or find another server/hosting company that supports 5.3. As "drakus" noted earlier, recently, in this thread:

    If a host is still using it [PHP 5.2], than do not use them, it's a sign of no security updates.
    That about sums it up...
    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!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  13. #478
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm struggling to find a hosting with proper ffmpeg
    Either they have PHP 5.2 or they just mention ffmpeg but don't have it on the server..
    Any suggestions?

  14. #479
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,845
    Thanks
    21
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by dareweb View Post
    I'm struggling to find a hosting with proper ffmpeg
    Either they have PHP 5.2 or they just mention ffmpeg but don't have it on the server..
    Any suggestions?
    My suggestion is to opt for a VPS, cloud, or dedicated server. This type of plan will give you more control over your environment and is more suited to resource-intensive sites. You basically install whatever you want. There are some reasonably priced VPS/cloud hosting plans out there, but you have to be willing to spend more than you would for shared hosting. With a VPS, you will be able to install at least PHP 5.3/FFmpeg/ffmpeg-php extension, and you could even compile it yourself via a simple web interface if your plan includes WHM/cPanel (if you aren't comfortable with SSH and the comand line interface)...
    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!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  15. #480
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    After 2 days searching, applying and claiming my money back from several hosters I finally found one with ffmpeg and PHP 5.3

    It is HostForWeb
    http://www.hostforweb.com/1873.html
    It will cost you $6.36 for 1 month when you use promotional code "autumn"
    I think it is a good choice for those who want to test their scripts first before applying for more serious hosting.

    Script is working properly.


 
Page 32 of 88 FirstFirst ... 2230313233344282 ... LastLast

LinkBacks (?)

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