Windows 8 and 8.1 Forums

Using FFmpeg in Windows Applications

  1. #1

    Posts : 21,863
    64-bit Windows 10

    Using FFmpeg in Windows Applications

    It is important to Microsoft that developers can leverage open-source software when building apps for Windows. As part of this effort we’re very pleased to announce FFmpeg support for Window 8.1, Windows Phone 8.1, and Windows 10 applications.

    What is FFmpeg?
    FFmpeg is a free, open-source multimedia framework that includes a set of tools which can be used by end users for transcoding, streaming, and playing, as well as a set of libraries for developers to use in applications. These libraries are valuable to developers as they add support for virtually all media formats including .mkv, .flv, and .mov. Projects that use FFmpeg libraries include Google Chrome, VLC, and many more.

    What’s new?
    We have released a set of Compilation Instructions for a WinRT compatible build of FFmpeg. Typically, after including FFmpeg libraries, developers have to go through the costly effort of rendering audio and video frames themselves. To solve this issue, we have released an open-source project, FFmpegInterop library for Windows. This project includes the FFmpegInterop WinRT component which processes media with FFmpeg and then leverages the Windows Media Framework for playback. This approach works well because the Windows Media Framework automatically renders and synchronizes media samples while reaping the benefits of hardware acceleration.

    To demonstrate this we have also included three sample Media Player applications in C#, C++, and JavaScript.

    Compilation Instructions

    In order to leverage the powerful and diverse multimedia features of FFmpeg, we have contributed a set of compilation instructions for Windows 8.1, Windows Phone 8.1, and Windows 10 applications. After following the compilation instructions, developers can include FFmpeg libraries in their applications, enabling apps to play or stream almost any video format.

    FFmpegInterop Object
    FFmpegInterop is a WindowsRuntime Component that produces a MediaStreamSource which can be assigned to a XAML MediaElement or HTML5 video component for playback of any media file format supported by FFmpeg. This FFmpegInterop component can be used as a template to utilize further functionality of the FFmpeg libraries. Moreover the FFmpegInterop object can be accessed by multiple programming languages including C#, CX/C++, and JavaScript.

    Media Player Application Samples
    Also included with the FFmpegInterop library for Windows are sample Media Player applications in C#, C++, and JavaScript for Windows 8.1, Windows Phone 8.1, and Windows 10. They demonstrate how to achieve the following:

    1. Create a FFmpegInterop object that plugs easily into a XAML MediaElement or WinJS HTML5 Video component
    2. Open a local file using FileOpenPicker and pass it as a stream to FFmpegInterop
    3. Project the API to the different Windows Runtime languages (CX/C++, C#, and JavaScript)

    Using the FFmpeg MediaStreamSource Object in a XAML Media Element.


    // Instantiate FFmpeg object and pass the stream from opened file
     IRandomAccessStream^ readStream = stream.get();
     FFmpegMSS = FFmpegInteropMSS::CreateFFmpegInteropMSSFromStream(readStream, false, false);
    // Pass MediaStreamSource to Media Element


    // Instantiate FFmpeg object and pass the stream from opened file
     IRandomAccessStream readStream = await file.OpenAsync(FileAccessMode.Read);
     FFmpegMSS = FFmpegInteropMSS.CreateFFmpegInteropMSSFromStream(readStream, false, false);
    // Pass MediaStreamSource to Media Element
    To submit feedback, pull-requests, or issues, please check out the GitHub repo:

    If you have a suggestion for other open source projects that would help you make great applications, please let us know in the comments.

    For more information about Microsoft’s involvement with open source check out these sites:


      My System SpecsSystem Spec

  2. #2

    United States
    Posts : 3,093
    Windows 8.1 Pro 64-bit

    Better late than never I guess. Been using it for years through third party codec packages.
      My System SpecsSystem Spec

Using FFmpeg in Windows Applications

Similar Threads
Thread Forum
Processor Affinity - Set for Applications in Windows 8
How to Set Processor Affinity for an Application in Windows 8 and 8.1 Processor affinity or CPU Pinning enables the binding and un-binding of a process or thread to a physical CPU or a range of CPUs, so that the process or thread in question will run only on the CPU or range of CPUs in...
DEVEDE conversion error Uncheck use FFMPEG
HI there To any who are using DEVEDE on Linux (Host or VM) for creating DVD structures / isos / discs from AVI / MKV / MP4 etc files who (usually RARELY) receive Conversion error -- simply uncheck in Edit==>preferences the Use FFMPEG instead of MENCODER for videos --that fixes it. It's very...
Sound & Audio
Windows 8.1 Good Applications?
Hey, So I just upgraded my windows 8 into windows 8.1. and I would like to ask what applications should I use? like for security purposes, utility and entertainment?<br><br>So, I just installed CCleaner and Usb disk security? is that alright? and thinking of installing malwarebytes? is it a good...
Software and Apps
System cannot access windows 32 applications
Have a problem all of a sudden my Windows 8.1 Dell Latitude 10 tablet cannot access most all of the Win32 applications. I go to access an item in windows explorer or say device manager and get a message system could not access or may not have permission. Most programs seem to be working, but a lot...
Software and Apps
Unusable Applications in Windows 8
Hi I upgraded to Windows 8 about a month ago, and quite frankly I have never had so many problems on my previous operating systems (95, 98, 98SE, 2000NT, XP Home, XP Professional) as I have on this. I have had to completely reinstall Windows 8 three times now due to things going wrong, such...
General Support

Eight Forums Android App Eight Forums IOS App Follow us on Facebook