AydinAdn/MediaToolkit — pull request #8 by TCGV (2014-07-22 20:20:57+00:00)
Title: Allow video re-size to custom dimensions, and enable scaling down video ...

I'm trying out your ffmpeg wrapper for scaling down video files uploaded to my web site and I've noticed that their aspect ratio was not being preserved.

In order to preserve aspect ratio I forked your repository and made a few changes to the CommandBuilder class to use [ffmpeg's scale filter](https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg).

I also added a unit test for this new conversion option:

```
[TestCase]
public void Can_ScaleDownPreservingAspectRatio()
{
string outputPath = string.Format(@"{0}\Convert_Basic_Test.mp4", Path.GetDirectoryName(_outputFilePath));

var inputFile = new MediaFile { Filename = _inputFilePath };
var outputFile = new MediaFile { Filename = outputPath };

using (var engine = new Engine())
{
engine.ConvertProgressEvent += engine_ConvertProgressEvent;
engine.ConversionCompleteEvent += engine_ConversionCompleteEvent;

engine.Convert(inputFile, outputFile, new ConversionOptions { VideoSize = VideoSize.Custom, CustomHeight = 120 });
engine.GetMetadata(inputFile);
engine.GetMetadata(outputFile);
}

Assert.AreEqual("214x120", outputFile.Metadata.VideoData.FrameSize);

PrintMetadata(inputFile.Metadata);
PrintMetadata(outputFile.Metadata);
}
```

Decided to create this pull request just in case you find this changes helpful.

Regards!