Adding Effects

MediaTranscoder exposes AddVideoEffect and AddAudioEffect methods just like MediaElement. (Although for some reason it has a method named ClearEffects rather than RemoveAllEffects. Both do the same thing.) It exposes simpler overloads that require only the string ID of the effect, if you want the effect to be required and you don’t need to pass any settings. Therefore, you can replace the preceding example’s two lines of trimming code with the following line of code to add video stabilization to the source video file instead:

// Apply the video stabilization effecttranscoder.AddVideoEffect(VideoEffects.VideoStabilization);

The ability to insert effects makes the transcoding process completely extensible ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.