locked
Is it Possible to access avfil32.dll from windows app..?

    Question

  • Hi

    I tried to create an app which generates avi file. A screen recording application. I ported my desktop app to winrt, converted all System.Drawing to winrt equivalent.

    I used avifi32.dll via DllImport. 

    Now in Build it doesn't give any error or warning however when I run it, System.DllNotfoundException occured.

    I checked the System32 folder and the file is there.

    So my question is can I access it..? If not any alternative source/method for it..? 

    Regards

    Ajit

    Sunday, November 16, 2014 12:51 PM

Answers

All replies

  • No. You can use only the Win32 and Com API that are specifically allowed for Windows Store apps. See Win32 and COM for Windows Runtime apps . Windows Store apps use the Media Foundation API for most media work.

    David Catuhe blogged about creating video files and provides sample code for a component at Developing a WinRT component to create a video file using Media Foundation

    • Marked as answer by Ajit7832 Monday, November 17, 2014 11:41 AM
    Sunday, November 16, 2014 3:31 PM
    Owner
  • Ok 

    So avifil32 and ffmpeg are out of the picture.

    I saw the blog and other related materiel on sink-writer.

    It creates uncompressed video. How do you create compressed video..?

    Sunday, November 16, 2014 4:04 PM
  • do not use avifil32. it was introduced for 16 bit windows and was superseded by DirectX.

    Windows Store apps can use Windows Media Foundation API so if you got a codec with MFT support you can use it to encode video.



    Visual C++ MVP

    • Marked as answer by Ajit7832 Monday, November 17, 2014 11:41 AM
    Sunday, November 16, 2014 5:04 PM
  • I used the code mentioned in this blog.

    http://blogs.msdn.com/b/eternalcoding/archive/2013/03/06/developing-a-winrt-component-to-create-a-video-file-using-media-foundation.aspx

    It takes more than 3 minutes to create 8sec video. Is it really good to use it in real time.?

    Sunday, November 16, 2014 5:33 PM
  • Try reduce compression (or do not do compression at all) doing recording. You can re-encode the file with higher compress ratio after the recording is complete.


    Visual C++ MVP

    Sunday, November 16, 2014 6:19 PM