I have just finished updating the paid-for version of my software. New in this version:
- You can now enable the direct downloading of videos from YouTube and Dailymotion, for video file types only. This feature works as follows:
- Each video file type in the VideoConverter::$_convertedFileTypes array now has a new 'qualityTolerance' key.
- Possible values are 'hd', 'hq', 'sd', or 'ld' (corresponding to 'high definition', 'high quality', 'standard definition', and 'low definition' respectively).
- 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:
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.
- VideoConverter.class.php updated
- config.class.php updated
- index.php updated
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!