How to Create your own Video Editor for Windows 10

Did you know that Windows 10 SDK provides simple and yet powerful library for basic video editing? If you are up to the great idea or just want to improve your existing application with such a feature, Windows.Media.Editing namespace is a great tool to do that easily!

 

I spent the last few months developing the Universal Windows application called Flashback, which allows you to create videos from your clips, photos, and music. The application uses Windows.Media.Editing namespace and provides basic video editing features like trimming, creating photo slideshows and organizing a composition in a really simple manner. Moreover, you can select background music, apply photo filters or add titles. Thanks to the great developers at Microsoft, these operations are easy and can be done with a few lines of code. In addition, it’s universal and works on every Windows 10 device :)

Trimming

The editing namespace works with objects of MediaClip class, which can represent a single clip created from video file, photo or a solid color. Trimming is done by simple setting of two parameters: TrimTimeFromStart and TrimTimeFromEnd.

Building composition

Object of MediaComposition class is used like a timeline. All clips, overlays and background audio tracks are appended here, while composition provides functions for preview and rendering final movie.

Previewing video

Preview of final video can be shown in MediaElement.

Adding background music

Adding a song to a composition and its trimming is also very simple.

Saving video file

MediaComposition provides an asynchronous task to save the final video into the .mp4 file.

Effects

But, all of these has been available since Windows Phone 8.1, so what has been improved? The UWP version of Windows.Media.Editing namespace provides new interfaces like IBasicVideoEffect, IBasicAudioEffect, and IVideoCompositor that allows you to create custom video and audio effects and overlays.

 

Those effects process every video frame as an image, while you can use SDKs like Win2D or Lumia.Imaging to do whatever you want! Let’s take a look at the example of the saturation video effect.

Result

Now, I hope that nothing stops you in creating great video editing features and applications of your own! In case you are not going to create your own application, you can always use the Flashback, or help me make it better by your contribution.

Recommended sources

https://msdn.microsoft.com/en-us/windows/uwp/audio-video-camera/media-compositions-and-editing

https://channel9.msdn.com/events/Build/2015/3-634

http://codingcoda.com/posts/2015/04/30/creative-video-experiences-with-the-universal-windows-platform/

https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples

2 Responses to “How to Create your own Video Editor for Windows 10”

  1. Anas says:

    I am developing an app I am stuck at adding multiple background audio tracks to play one after the other. Please can you help me with the code to time the delay.

Leave a Reply