Create thumbnail image for video

I use VSTS 2008 + C # .Net 3.5 on Windows 7. I want to use Expression Encoder 3 to create a thumbnail image for video (wmv format) every 30 seconds - for example, within 5 minutes there will be 10 thumbnails that reflect the video in for 0 seconds, 30 seconds, 1 minute, 1 minute and 30 seconds, etc.

Any reference code?

+4
source share
1 answer

Using the SDK , you can try using GetThumbnail :

var video = new MediaItem(filePath); using (var bitmap = video.MainMediaFile.GetThumbnail( new TimeSpan(0, 0, 5), new System.Drawing.Size(640, 480))) { // do something with the bitmap like: bitmap.Save("thumb1.jpg"); } 
+9
source

Source: https://habr.com/ru/post/1309867/


All Articles