Automating Via a Console Application
If you would like to automate expression to combine media files via a console application, this is how you would do it with our little helper. Note, as has been said elsewhere, the utility that this uses is only for automating the splicing of a media resource
(image or video) to the beginning or end (or both) of a .wmv.
This is a very early version of this code. It appears to work but your mileage may vary. Note that ALL it does is combine media files. That is the only automation at this point.
To do this...
- Create a console application.
- Then reference the ExpressionAutomation library in the source download for C4MVC.
- Call the MediaItemCombiner class as is exemplified below.
static void Main(string args)
string basePath = @"C:\Dev\PowershellFun\";
string introPath = basePath + "FirstResource.jpg";
string moviePath = basePath + "livemeeting_cut.wmv";
string outroPath = basePath + "LastResource.jpg";
string destinationPath = basePath;
var combiner = new MediaItemCombiner();
combiner.OnCombinerProgress += new EventHandler<EncodeProgressEventArgs>(combiner_OnCombinerProgress);
combiner.Combine(moviePath, introPath, outroPath, destinationPath);
static void combiner_OnCombinerProgress(object sender, EncodeProgressEventArgs e)
Expression Encoder will create a folder in your destination path folder that will include the newly encoded video.