Version Description
- October 12, 2013 =
- Fixed bug that disabled FFMPEG when other plugin settings were changed.
Download this release
Release Info
Developer | kylegilman |
Plugin | Video Embed & Thumbnail Generator |
Version | 4.2.5 |
Comparing to | |
See all releases |
Code changes from version 4.2.4 to 4.2.5
- js/kgvid_video_plugin_admin.js +2 -1
- readme.txt +4 -1
- video-embed-thumbnail-generator.php +10 -10
js/kgvid_video_plugin_admin.js
CHANGED
@@ -838,7 +838,8 @@ function kgvid_save_plugin_settings(input_obj) {
|
|
838 |
jQuery( '.kgvid_setting_nearvid' ).width( jQuery('#width').val() );
|
839 |
}
|
840 |
if ( save_queue[0].id == "app_path" || save_queue[0].id == "video_app" ) {
|
841 |
-
jQuery('#app_path').val(data.app_path)
|
|
|
842 |
kgvid_hide_plugin_settings();
|
843 |
}
|
844 |
if ( jQuery(input_obj).hasClass('affects_player') == true ) {
|
838 |
jQuery( '.kgvid_setting_nearvid' ).width( jQuery('#width').val() );
|
839 |
}
|
840 |
if ( save_queue[0].id == "app_path" || save_queue[0].id == "video_app" ) {
|
841 |
+
jQuery('#app_path').val(data.app_path);
|
842 |
+
jQuery('#app_path').data('ffmpeg_exists', data.ffmpeg_exists);
|
843 |
kgvid_hide_plugin_settings();
|
844 |
}
|
845 |
if ( jQuery(input_obj).hasClass('affects_player') == true ) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kyleg
|
|
4 |
Tags: video, video player, video gallery, html5, shortcode, thumbnail, poster, ffmpeg, libav, embed, mobile, webm, ogg, h.264, h264, responsive, mp4
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.7
|
7 |
-
Stable tag: 4.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -155,6 +155,9 @@ Enter the username & password in the plugin settings "FFMPEG Settings" tab, or u
|
|
155 |
|
156 |
== Changelog ==
|
157 |
|
|
|
|
|
|
|
158 |
= 4.2.4 - October 12, 2013 =
|
159 |
* Fixed bug that ignored "Enlarge lower resolution videos to max width" plugin setting after thumbnails were generated.
|
160 |
* Fixed bug that caused in-browser thumbnail generation to fail after switching between several attachments in Chrome.
|
4 |
Tags: video, video player, video gallery, html5, shortcode, thumbnail, poster, ffmpeg, libav, embed, mobile, webm, ogg, h.264, h264, responsive, mp4
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.7
|
7 |
+
Stable tag: 4.2.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
155 |
|
156 |
== Changelog ==
|
157 |
|
158 |
+
= 4.2.5 - October 12, 2013 =
|
159 |
+
* Fixed bug that disabled FFMPEG when other plugin settings were changed.
|
160 |
+
|
161 |
= 4.2.4 - October 12, 2013 =
|
162 |
* Fixed bug that ignored "Enlarge lower resolution videos to max width" plugin setting after thumbnails were generated.
|
163 |
* Fixed bug that caused in-browser thumbnail generation to fail after switching between several attachments in Chrome.
|
video-embed-thumbnail-generator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Video Embed & Thumbnail Generator
|
4 |
Plugin URI: http://www.kylegilman.net/2011/01/18/video-embed-thumbnail-generator-wordpress-plugin/
|
5 |
Description: Generates thumbnails, HTML5-compliant videos, and embed codes for locally hosted videos. Requires FFMPEG or LIBAV for encoding. <a href="options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php">Settings</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kylegilman@gmail.com&item_name=Video%20Embed%20And%20Thumbnail%20Generator%20Plugin%20Donation">Donate</a>
|
6 |
-
Version: 4.2.
|
7 |
Author: Kyle Gilman
|
8 |
Author URI: http://www.kylegilman.net/
|
9 |
|
@@ -47,7 +47,7 @@ function kgvid_default_options_fn() {
|
|
47 |
$upload_capable = kgvid_upload_capable();
|
48 |
|
49 |
$options = array(
|
50 |
-
"version"=>4.
|
51 |
"embed_method"=>"Video.js",
|
52 |
"template"=>false,
|
53 |
"template_gentle"=>"on",
|
@@ -361,7 +361,6 @@ function kgvid_check_ffmpeg_exists($options, $save) {
|
|
361 |
if ( !file_exists($uploads['path'].'/ffmpeg_exists_test.jpg') ) { //if FFMPEG has not executed successfully
|
362 |
$test_path = substr($test_path, 0, -strlen($options['video_app'])-1 );
|
363 |
$cmd = escapeshellcmd($test_path.'/'.$options['video_app'].' -i '.plugin_dir_path(__FILE__).'images/sample-video-h264.mp4 -vframes 1 -f mjpeg '.$uploads['path'].'/ffmpeg_exists_test.jpg');
|
364 |
-
error_log($cmd);
|
365 |
exec ( $cmd, $output, $returnvalue );
|
366 |
}
|
367 |
|
@@ -1680,7 +1679,6 @@ function kgvid_FMPOptionsPage() {
|
|
1680 |
|
1681 |
<?php echo "<script type='text/javascript'>
|
1682 |
jQuery(document).ready(function() {
|
1683 |
-
jQuery('#app_path').data('ffmpeg_exists', '".$options['ffmpeg_exists']."');
|
1684 |
kgvid_switch_settings_tab('general');
|
1685 |
jQuery('form :input').change(function() {
|
1686 |
kgvid_save_plugin_settings(this);
|
@@ -1992,7 +1990,7 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
|
|
1992 |
|
1993 |
function kgvid_app_path_callback() {
|
1994 |
$options = get_option('kgvid_video_embed_options');
|
1995 |
-
echo "<input class='affects_ffmpeg regular-text code' id='app_path' name='kgvid_video_embed_options[app_path]' type='text' value='".$options['app_path']."' /><a class='kgvid_tooltip' href='javascript:void(0);'><img src='../wp-includes/images/blank.gif'><span class='kgvid_tooltip_classic'>This should be the folder where applications are installed on your server, not a direct path to an application, so it doesn't usually end with <code><strong class='video_app_name'>".strtoupper($options['video_app'])."</strong></code> Example: <code>/usr/local/bin</code>."."\n\t";
|
1996 |
}
|
1997 |
|
1998 |
function kgvid_video_app_callback() {
|
@@ -2273,7 +2271,6 @@ function kgvid_update_settings() {
|
|
2273 |
$options['inline'] = "on";
|
2274 |
}
|
2275 |
if ( $options['version'] < 4.2 ) {
|
2276 |
-
|
2277 |
$options['version'] = 4.2;
|
2278 |
$options["bitrate_multiplier"] = 0.1;
|
2279 |
$options["h264_CRF"] = 23;
|
@@ -2322,7 +2319,10 @@ function kgvid_update_settings() {
|
|
2322 |
}
|
2323 |
}
|
2324 |
}
|
2325 |
-
|
|
|
|
|
|
|
2326 |
if ( $options['version'] != $default_options['version'] ) { $options['version'] = $default_options['version']; }
|
2327 |
if ( $options !== $options_old ) { update_option('kgvid_video_embed_options', $options); }
|
2328 |
}
|
@@ -2343,10 +2343,9 @@ function kgvid_video_embed_options_validate($input) { //validate & sanitize inpu
|
|
2343 |
if ( $input['app_path'] != $options['app_path'] || $input['video_app'] != $options['video_app'] ) {
|
2344 |
|
2345 |
$ffmpeg_info = kgvid_check_ffmpeg_exists($input, false);
|
2346 |
-
|
2347 |
$input['app_path'] = $ffmpeg_info['app_path'];
|
2348 |
|
2349 |
-
|
2350 |
if ( $ffmpeg_info['exec_enabled'] == false ) {
|
2351 |
add_settings_error( __FILE__, "ffmpeg-disabled", $ffmpeg_info['function']." is disabled in PHP settings. You can embed existing videos and make thumbnails with compatible browsers, but video encoding will not work. Contact your System Administrator to find out if you can enable ".$ffmpeg_info['function'].".", "updated");
|
2352 |
$input['ffmpeg_exists'] = "notinstalled";
|
@@ -2355,8 +2354,9 @@ function kgvid_video_embed_options_validate($input) { //validate & sanitize inpu
|
|
2355 |
add_settings_error( __FILE__, "ffmpeg-disabled", strtoupper($input['video_app'])." not found at ".$input['app_path'].". You can embed existing videos and make thumbnails with compatible browsers, but video encoding is not possible without ".strtoupper($input['video_app']).".", "updated");
|
2356 |
$input['ffmpeg_exists'] = "notinstalled";
|
2357 |
}
|
2358 |
-
|
2359 |
}
|
|
|
2360 |
|
2361 |
if ( empty($input['width']) ) {
|
2362 |
add_settings_error( __FILE__, "width-zero", "You must enter a value for the maximum video width.");
|
3 |
Plugin Name: Video Embed & Thumbnail Generator
|
4 |
Plugin URI: http://www.kylegilman.net/2011/01/18/video-embed-thumbnail-generator-wordpress-plugin/
|
5 |
Description: Generates thumbnails, HTML5-compliant videos, and embed codes for locally hosted videos. Requires FFMPEG or LIBAV for encoding. <a href="options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php">Settings</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kylegilman@gmail.com&item_name=Video%20Embed%20And%20Thumbnail%20Generator%20Plugin%20Donation">Donate</a>
|
6 |
+
Version: 4.2.5
|
7 |
Author: Kyle Gilman
|
8 |
Author URI: http://www.kylegilman.net/
|
9 |
|
47 |
$upload_capable = kgvid_upload_capable();
|
48 |
|
49 |
$options = array(
|
50 |
+
"version"=>4.25,
|
51 |
"embed_method"=>"Video.js",
|
52 |
"template"=>false,
|
53 |
"template_gentle"=>"on",
|
361 |
if ( !file_exists($uploads['path'].'/ffmpeg_exists_test.jpg') ) { //if FFMPEG has not executed successfully
|
362 |
$test_path = substr($test_path, 0, -strlen($options['video_app'])-1 );
|
363 |
$cmd = escapeshellcmd($test_path.'/'.$options['video_app'].' -i '.plugin_dir_path(__FILE__).'images/sample-video-h264.mp4 -vframes 1 -f mjpeg '.$uploads['path'].'/ffmpeg_exists_test.jpg');
|
|
|
364 |
exec ( $cmd, $output, $returnvalue );
|
365 |
}
|
366 |
|
1679 |
|
1680 |
<?php echo "<script type='text/javascript'>
|
1681 |
jQuery(document).ready(function() {
|
|
|
1682 |
kgvid_switch_settings_tab('general');
|
1683 |
jQuery('form :input').change(function() {
|
1684 |
kgvid_save_plugin_settings(this);
|
1990 |
|
1991 |
function kgvid_app_path_callback() {
|
1992 |
$options = get_option('kgvid_video_embed_options');
|
1993 |
+
echo "<input class='affects_ffmpeg regular-text code' id='app_path' data-ffmpeg_exists='".$options['ffmpeg_exists']."' name='kgvid_video_embed_options[app_path]' type='text' value='".$options['app_path']."' /><a class='kgvid_tooltip' href='javascript:void(0);'><img src='../wp-includes/images/blank.gif'><span class='kgvid_tooltip_classic'>This should be the folder where applications are installed on your server, not a direct path to an application, so it doesn't usually end with <code><strong class='video_app_name'>".strtoupper($options['video_app'])."</strong></code> Example: <code>/usr/local/bin</code>."."\n\t";
|
1994 |
}
|
1995 |
|
1996 |
function kgvid_video_app_callback() {
|
2271 |
$options['inline'] = "on";
|
2272 |
}
|
2273 |
if ( $options['version'] < 4.2 ) {
|
|
|
2274 |
$options['version'] = 4.2;
|
2275 |
$options["bitrate_multiplier"] = 0.1;
|
2276 |
$options["h264_CRF"] = 23;
|
2319 |
}
|
2320 |
}
|
2321 |
}
|
2322 |
+
if ( $options['version'] < 4.25 ) {
|
2323 |
+
$options['version'] = 4.25;
|
2324 |
+
kgvid_check_ffmpeg_exists($options, true);
|
2325 |
+
}
|
2326 |
if ( $options['version'] != $default_options['version'] ) { $options['version'] = $default_options['version']; }
|
2327 |
if ( $options !== $options_old ) { update_option('kgvid_video_embed_options', $options); }
|
2328 |
}
|
2343 |
if ( $input['app_path'] != $options['app_path'] || $input['video_app'] != $options['video_app'] ) {
|
2344 |
|
2345 |
$ffmpeg_info = kgvid_check_ffmpeg_exists($input, false);
|
2346 |
+
if ( $ffmpeg_info['ffmpeg_exists'] == true ) { $input['ffmpeg_exists'] = "on"; }
|
2347 |
$input['app_path'] = $ffmpeg_info['app_path'];
|
2348 |
|
|
|
2349 |
if ( $ffmpeg_info['exec_enabled'] == false ) {
|
2350 |
add_settings_error( __FILE__, "ffmpeg-disabled", $ffmpeg_info['function']." is disabled in PHP settings. You can embed existing videos and make thumbnails with compatible browsers, but video encoding will not work. Contact your System Administrator to find out if you can enable ".$ffmpeg_info['function'].".", "updated");
|
2351 |
$input['ffmpeg_exists'] = "notinstalled";
|
2354 |
add_settings_error( __FILE__, "ffmpeg-disabled", strtoupper($input['video_app'])." not found at ".$input['app_path'].". You can embed existing videos and make thumbnails with compatible browsers, but video encoding is not possible without ".strtoupper($input['video_app']).".", "updated");
|
2355 |
$input['ffmpeg_exists'] = "notinstalled";
|
2356 |
}
|
2357 |
+
|
2358 |
}
|
2359 |
+
else { $input['ffmpeg_exists'] = $options['ffmpeg_exists']; }
|
2360 |
|
2361 |
if ( empty($input['width']) ) {
|
2362 |
add_settings_error( __FILE__, "width-zero", "You must enter a value for the maximum video width.");
|