sample code for cutting doesnt do anything
Closed this issue · 2 comments
wildeyes commented
var inputFile = new MediaFile {Filename = @"C:\Path\To_Video.flv"};
var outputFile = new MediaFile {Filename = @"C:\Path\To_Save_ExtractedVideo.flv"};
using (var engine = new Engine())
{
engine.GetMetadata(inputFile);
var options = new ConversionOptions();
// This example will create a 25 second video, starting from the
// 30th second of the original video.
//// First parameter requests the starting frame to cut the media from.
//// Second parameter requests how long to cut the video.
options.CutMedia(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(25));
engine.Convert(inputFile, outputFile, options);
}
AydinAdn commented
It does, it cuts out a clip by first seeking to a position specified as a TimeSpan, and then extracts a clip of the specified duration, again expressed as a TimeSpan
wildeyes commented
I'll check again, but last time I ran it, it didn't work on my machien with
the latest version of MediaToolkit
On Mon, Feb 1, 2016 at 5:41 PM Aydin notifications@github.com wrote:
It does, it cuts out a clip by first seeking to a position specified as a
TimeSpan, and then extracts a clip of the specified duration, again
expressed as a TimeSpan—
Reply to this email directly or view it on GitHub
#26 (comment)
.
Sincerely, Daniel.