Video Embed & Thumbnail Generator - Version 4.1.2

Version Description

May 23, 2013 = * Changed check for FFMPEG to use the H.264 sample video as input to avoid any PNG-related red herrings. * Added -f mjpeg to thumbnail-generating command to maintain compatibility with versions of FFMPEG that can't figure it out on their own.

Download this release

Release Info

Developer kylegilman
Plugin Icon 128x128 Video Embed & Thumbnail Generator
Version 4.1.2
Comparing to
See all releases

Code changes from version 4.1.1 to 4.1.2

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, responsive
5
  Requires at least: 3.2
6
  Tested up to: 3.6
7
- Stable tag: 4.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -40,11 +40,9 @@ If you want to make it easier for people to save the video to their computers, y
40
 
41
  Sometimes for various reasons you might need to embed video files that are not saved in the Wordpress Media Library. Maybe your file is too large to upload through the media upload form (if it is, I suggest the excellent "Add From Server" plugin), or maybe it's hosted on another server. Either way, you can use the tab "Embed Video From URL" in the Add Media window. Just enter the Video URL manually, and all other steps are the same as the Media Library options. The plugin will look for alternate encoded files in the same directory as the original, but this takes a long time when the video is on another server so it will only check for them once. If you add additional formats you can click the "Re-scan External Server" button in the meta box below the post you've embedded the video in to check again.
42
 
43
- =To embed videos on other sites= you can use code like this.
44
 
45
- <iframe src='http://www.kylegilman.net/?attachment_id=1906&kgvid_video_embed[enable]=true' frameborder='0' scrolling='no' width='640' height='360'></iframe>
46
-
47
- <iframe width="960" height="540" frameborder="0" scrolling="no" src="http://www.kylegilman.net/?attachment_id=1906"></iframe>
48
 
49
  = Once you've filled in all your options, click "Insert into Post" and you'll get a shortcode in the visual editor like this =
50
 
@@ -57,7 +55,7 @@ width="720" height="404"]http://www.kylegilman.net/wp-content/uploads/2011/10/Re
57
  * `width="xxx"`
58
  * `height="xxx"`
59
  * `align="left/right/center"`
60
- * `inline="true/false" allow other content on the same line as the video
61
  * `volume="0.x"` pre-sets the volume for unusually loud videos. Value between 0 and 1.
62
  * `controlbar="docked/floating/none"` sets the controlbar position. Video.js only responds to the "none" option.
63
  * `loop="true/false"`
@@ -141,6 +139,10 @@ Use the "Embed from URL" tab and enter the URL in this format http://username:pa
141
 
142
  == Changelog ==
143
 
 
 
 
 
144
  = 4.1.1 May 21, 2013 =
145
  * Removed second argument from json_encode() which caused video setup & resizing features to fail when servers were running PHP 5.2.
146
 
4
  Tags: video, video player, video gallery, html5, shortcode, thumbnail, poster, ffmpeg, libav, embed, mobile, webm, ogg, h.264, responsive
5
  Requires at least: 3.2
6
  Tested up to: 3.6
7
+ Stable tag: 4.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
40
 
41
  Sometimes for various reasons you might need to embed video files that are not saved in the Wordpress Media Library. Maybe your file is too large to upload through the media upload form (if it is, I suggest the excellent "Add From Server" plugin), or maybe it's hosted on another server. Either way, you can use the tab "Embed Video From URL" in the Add Media window. Just enter the Video URL manually, and all other steps are the same as the Media Library options. The plugin will look for alternate encoded files in the same directory as the original, but this takes a long time when the video is on another server so it will only check for them once. If you add additional formats you can click the "Re-scan External Server" button in the meta box below the post you've embedded the video in to check again.
42
 
43
+ To embed videos on other sites you can use code like this.
44
 
45
+ `<iframe src='http://www.kylegilman.net/?attachment_id=1906&kgvid_video_embed[enable]=true' frameborder='0' scrolling='no' width='640' height='360'></iframe>`
 
 
46
 
47
  = Once you've filled in all your options, click "Insert into Post" and you'll get a shortcode in the visual editor like this =
48
 
55
  * `width="xxx"`
56
  * `height="xxx"`
57
  * `align="left/right/center"`
58
+ * `inline="true/false"` allow other content on the same line as the video
59
  * `volume="0.x"` pre-sets the volume for unusually loud videos. Value between 0 and 1.
60
  * `controlbar="docked/floating/none"` sets the controlbar position. Video.js only responds to the "none" option.
61
  * `loop="true/false"`
139
 
140
  == Changelog ==
141
 
142
+ = 4.1.2 May 23, 2013 =
143
+ * Changed check for FFMPEG to use the H.264 sample video as input to avoid any PNG-related red herrings.
144
+ * Added `-f mjpeg` to thumbnail-generating command to maintain compatibility with versions of FFMPEG that can't figure it out on their own.
145
+
146
  = 4.1.1 May 21, 2013 =
147
  * Removed second argument from json_encode() which caused video setup & resizing features to fail when servers were running PHP 5.2.
148
 
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 for thumbnails and encodes. <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.1.1
7
  Author: Kyle Gilman
8
  Author URI: http://www.kylegilman.net/
9
 
@@ -41,7 +41,7 @@ if ( ! defined( 'ABSPATH' ) )
41
 
42
  function kgvid_default_options_fn() {
43
  $options = array(
44
- "version"=>4.11,
45
  "embed_method"=>"Video.js",
46
  "template"=>false,
47
  "template_gentle"=>"on",
@@ -235,7 +235,7 @@ function kgvid_check_ffmpeg_exists($options, $save) {
235
  if(function_exists('exec')) {
236
  if (function_exists('escapeshellcmd')) {
237
  $exec_enabled = true;
238
- $cmd = escapeshellcmd($options['app_path'].'/'.$options['video_app'].' -i '.plugin_dir_path(__FILE__).'/flash/skin/images/PlayNormal.png '.$uploads['path'].'/ffmpeg_exists_test.jpg');
239
  exec ( $cmd, $output, $returnvalue );
240
  }
241
  else { $function = "ESCAPESHELLCMD"; }
@@ -2481,7 +2481,7 @@ function kgvid_make_thumbs($postID, $movieurl, $numberofthumbs, $i, $iincreaser,
2481
 
2482
  $thumbnailfilename[$i] = $jpgpath.$moviefilebasename."_thumb".$movieoffset.".jpg";
2483
  $thumbnailfilename[$i] = str_replace(" ", "_", $thumbnailfilename[$i]);
2484
- $ffmpeg_options = '-y -ss '.$movieoffset.' -i "'.$moviefilepath.'" '.$movie_info['rotate'].' -qscale 1 -vframes 1 "'.$thumbnailfilename[$i].'"';
2485
  $thumbnailurl = $thumbnailfilebase."_thumb".$movieoffset.'.jpg';
2486
  $thumbnailurl = str_replace(" ", "_", $thumbnailurl);
2487
 
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 for thumbnails and encodes. <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.1.2
7
  Author: Kyle Gilman
8
  Author URI: http://www.kylegilman.net/
9
 
41
 
42
  function kgvid_default_options_fn() {
43
  $options = array(
44
+ "version"=>4.12,
45
  "embed_method"=>"Video.js",
46
  "template"=>false,
47
  "template_gentle"=>"on",
235
  if(function_exists('exec')) {
236
  if (function_exists('escapeshellcmd')) {
237
  $exec_enabled = true;
238
+ $cmd = escapeshellcmd($options['app_path'].'/'.$options['video_app'].' -i '.plugin_dir_path(__FILE__).'/images/sample-video-h264.mp4 -vframes 1 -f mjpeg '.$uploads['path'].'/ffmpeg_exists_test.jpg');
239
  exec ( $cmd, $output, $returnvalue );
240
  }
241
  else { $function = "ESCAPESHELLCMD"; }
2481
 
2482
  $thumbnailfilename[$i] = $jpgpath.$moviefilebasename."_thumb".$movieoffset.".jpg";
2483
  $thumbnailfilename[$i] = str_replace(" ", "_", $thumbnailfilename[$i]);
2484
+ $ffmpeg_options = '-y -ss '.$movieoffset.' -i "'.$moviefilepath.'" '.$movie_info['rotate'].' -qscale 1 -vframes 1 -f mjpeg "'.$thumbnailfilename[$i].'"';
2485
  $thumbnailurl = $thumbnailfilebase."_thumb".$movieoffset.'.jpg';
2486
  $thumbnailurl = str_replace(" ", "_", $thumbnailurl);
2487