stlfalo.blogg.se

Microsoft video editor windows 10 tutorial
Microsoft video editor windows 10 tutorial







Using (CanvasRenderTarget renderTarget = CanvasRenderTarget.CreateFromDirect3D11Surface(_canvasDevice, 3DSurface)) Using (CanvasBitmap inputBitmap = CanvasBitmap.CreateFromDirect3D11Surface(_canvasDevice, 3DSurface)) public void ProcessFrame(ProcessVideoFrameContext context) 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. await mediaComposition.RenderToFileAsync(file) Effectsīut, all of these has been available since Windows Phone 8.1, so what has been improved? The UWP version of namespace provides new interfaces like IBasicVideoEffect, IBasicAudioEffect, and IVideoCompositor that allows you to create custom video and audio effects and overlays. MediaComposition provides an asynchronous task to save the final video into the. var backgroundAudioTrack = await BackgroundAudioTrack.CreateFromFileAsync(file) īackgroundAudioTrack.TrimTimeFromStart = TimeSpan.FromSeconds(5) MediaElement.SetMediaStreamSource(mediaStreamSource) Adding background musicĪdding a song to the composition and its trimming is also very simple. var mediaStreamSource = composition.GeneratePreviewMediaStreamSource((int)mediaElement.ActualWidth, (int)mediaElement.ActualHeight) Preview of the final video can be shown in MediaElement. Var mediaClip = await MediaClip.CreateFromFileAsync(file) var mediaComposition = new MediaComposition() MediaClip.TrimTimeFromEnd = TimeSpan.FromSeconds(1.5) Building compositionĪn object of MediaComposition class is used as a timeline. All clips, overlays and background audio tracks are appended here, while composition provides functions for preview and rendering a final movie.

microsoft video editor windows 10 tutorial

MediaClip.TrimTimeFromStart = TimeSpan.FromSeconds(3) var mediaClip = await MediaClip.CreateFromFileAsync(file) Trimming is done by the simple set of two parameters: TrimTimeFromStart and TrimTimeFromEnd. The editing namespace works with objects of MediaClip class, which can represent a single clip created from a video file, photo or a solid color.









Microsoft video editor windows 10 tutorial