If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

I meant you should try editing the log file path in the FFmpeg commands. The FFmpeg commands are located in the $_convertedFileTypes array. The _LOGSDIR constant is not in the $_convertedFileTypes array.

hi all. i have an big tubetomp3 site with 30k uniq users a day, my server i i7 16gb ram. but very loaded, load average: 229.70, 228.12, 175.45, so how to optimize a server or script. regards

First of all, are you using my code? If you are using someone else's code, then I can't vouch for the quality of the code you're using.

That said, in general, the server resources primarily used to download videos and convert them via FFmpeg are CPU and bandwidth. RAM is not as important. How many cores does your CPU have?

What you will want to do first is check your list of running processes on the server and determine what process or processes are causing the excessive CPU load. Then you will at least know where you need to troubleshoot the issue further.

The 'qualityTolerance' value indicates the minimum video quality that can be downloaded directly without FFmpeg conversion.

A couple of examples demonstrating how the 'qualityTolerance' setting works (assuming the new feature is enabled):

Your site user is converting a video to FLV, and the video hosting site has hd, hq, sd, and ld versions of FLV video available for download. You have set FLV to have a 'qualityTolerance' of hq. In this case, your user could download the video without FFmpeg conversion because both hd and hq versions meet your 'qualityTolerance' level of hq.

Your site user is converting a video to FLV, and the video hosting site has only sd and ld versions of FLV video available for download. You have set FLV to have a 'qualityTolerance' of hq. In this case, your user would have to download AND convert the video because neither sd nor ld versions meet your 'qualityTolerance' level of hq.

Note: When the feature is enabled and direct download is not possible, FFmpeg conversion is used as a fallback mechanism. And rest assured that the highest quality video (with respect to the corresponding file type) is being downloaded for use in FFmpeg conversions (just as it was before, and just like it will continue to be when the new feature is disabled).

In summary, when the feature is enabled, your site visitors can now (more often than not) download videos without needing to spend the extra time to convert them as well. Whether or not they can actually do this will depend on the availability of video file types of a certain quality as well as how you configure your 'qualityTolerance' settings for each video file type.

In general, enabling this feature will result in less CPU resources consumed on your server. Because, if you don't need FFmpeg for every conversion, then that can only decrease your server load averages.

Setting the volume to anything other than 100% will force a video to be downloaded AND converted via FFmpeg, regardless of whether or not the new feature is enabled.

Finally, and perhaps most important, you can enable or disable direct downloads (without FFmpeg conversion) via the Config::_ENABLE_DIRECT_DOWNLOAD constant in config.class.php. Again, if the requested video file type is available to download, AND it is at least the corresponding 'qualityTolerance' level set in Config::$_convertedFileTypes, then a 'true' value enables video download without conversion.

General refactoring of code

The following files/directories were changed/added:

VideoConverter.class.php updated

config.class.php updated

index.php updated

All files listed experienced significant code revisions. If you have modified these files (from their default versions), then you will likely need to use some kind of file content comparison utility to make the necessary changes to each file.

One last comment: I am aware that the nature of this "direct download" feature could be improved upon. Thus, I consider this feature a "stepping stone" to future, further enhancements to the functionality. In the future, I'd like to offer an intermediate screen between the conversion form and progress bar screens that allows your site users to choose an alternate file type for direct download if the requested file type is not available. For now, this feature still enables the majority of videos to be downloaded directly (without conversion) for video file types. And, in the process, it lessens the CPU load on your server (that would otherwise be required for FFmpeg).

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!

hi 1srt thanks for free scrpit but i have prblm its not work properly i dont know y chek here --> http://i.imgur.com/5qjVgnE.jpg waiting for reaply thanks

Hi, please search the forum thread for answers to frequently asked questions and common methods for troubleshooting. This is a very common issue, and it has been addressed over and over again.

I am generally very busy (trying to keep the software free, for one!), but one of these days I do intend to post a FAQ to address these kinds of common concerns. In the meantime, I need you guys to really make an effort and exploit the abundance of useful information that is in this forum thread.

Hi bro i'm the owner of you4mp3.com
i have probelm
Error downloading video

I see a blank page when visiting your site.

That said, please try the following:

1) Ensure that you have installed cURL and the PHP cURL extension correctly
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) Try a generic cURL request to any YouTube video page to see if a connection can be established.
5) Check your Apache error log for related errors