FFmpeg Plugin

Dynamically extract frames from videos by time or percentage. Includes basic blank frame avoidance. Based on ffmpeg.

Installation

  1. Add ImageResizer.Plugins.FFmpeg.dll to your project using Visual Studio.
  2. Add <add name="FFmpeg" downloadNativeDependencies="true" /> inside <resizer><plugins></plugins></resizer> in Web.config.
  3. During Application_Start, call ImageResizer.Configuration.Config.Current.Plugins.LoadPlugins() to ensure that ffmpeg is downloaded before the application starts accepting requests.

Use

http://example.com/videos/thisvideo.m4v?ffmpeg.seconds=45.3

  • ffmpeg.seconds=45.3 - Will grab the frame 45.3 seconds into the video file. Fastest way to grab an image.
  • ffmpeg.percent=50.1 - Will grab the frame 50.1 percent through the video file (slower, as the videos length must be queried)
  • ffmpeg.skipblankframes=true - Even slower - if the acquired frame is blank, another frame 5 seconds later will be chosen, and so on, up to 4 times.

This plugin (FFmpeg Plugin) is part of the Elite Edition

Where is the plugins section?

The <plugins> section is located in Web.config, and is nested inside the <resizer> element, which is nested inside <configuration>. For examples, see this sample Web.config file.

Where can I find the dll?

We prefer that you install via NuGet, but you can also find the plugin DLL files in the /dlls/release folder of your download.

How do I typically install a plugin via Web.Config?

  1. In Visual Studio, right click on your project and choose "Add reference". Browse to the plugin DLL and click "OK".
  2. In the <plugins> section of Web.config, insert <add name="PluginName" />
  3. Look at the plugin documentation to see what configuration options (if any) are available.

How do I typically install a plugin via code?