(Easy question) Exporting video on Windows: do I use DirectX or something else?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: (Easy question) Exporting video on Windows: do I use DirectX or something else?

  1. #1
    Join Date
    Feb 2010
    Posts
    3

    (Easy question) Exporting video on Windows: do I use DirectX or something else?

    I am adding a video export feature to a 3D game. This feature allows you to set a desired framerate n for the video, then it rejiggers the main loop of the game to simulate 1000/n milliseconds per frame (even though, due to the overhead of the export, the actual framerate is significantly less.)

    For the Linux version of the game, I am using libavcodec to accomplish this, and it's working fine.

    However, this is a cross-platform game and I need to get this working on Windows as well. Given the way Windows (doesn't) handle dependencies, I want to use a library which is basically ubiquitous. There is an entrenched base of users with everything from Windows 2000 through Windows 7, and I don't want to alienate any of them.

    This game is in C, but I'm not against doing sections in C++ if I have to.

    Each frame, I am getting a bitmap with GLReadPixels. From there, I can convert to BGR, YUV, whatever the API requires. I'm flexible there.

    I'm pretty new to Windows development (having very rarely booted Windows for the past two years,) so if I'm thinking about this the wrong way don't hesitate to let me know.


    Oh, one more thing: I need to be able to use the library in a GPL compatible way (that is, if the library isn't GPL compatible, it MUST be dynamically linked at runtime!)


    Thanks in advance,
    -Max.

  2. #2
    Join Date
    Oct 2005
    Posts
    229

    Re: (Easy question) Exporting video on Windows: do I use DirectX or something else?

    Im not sure i really understand your question..

    It appears it can be compiled for win32. (http://forum.videohelp.com/threads/2...G-Win32-binary)

    Also, if the above link is not correct.. read up about required export file format you want. I would be very surprised if there was no information on converting a bitmaps into a particular format.
    Learning somthing new every day!

  3. #3
    Join Date
    Feb 2010
    Posts
    3

    Re: (Easy question) Exporting video on Windows: do I use DirectX or something else?

    The only way to compile it in Windows is with MinGW32 or Cygwin, which both emulate the UNIX environment on Windows (and would require users of the game to have MingGW32/Cygwin installed in order to use the feature.) I want to avoid resorting to that if possible.

    Thanks for the response!

  4. #4
    Join Date
    Oct 2005
    Posts
    229

    Re: (Easy question) Exporting video on Windows: do I use DirectX or something else?

    Quote Originally Posted by maxtothemax View Post
    The only way to compile it in Windows is with MinGW32 or Cygwin, which both emulate the UNIX environment on Windows (and would require users of the game to have MingGW32/Cygwin installed in order to use the feature.) I want to avoid resorting to that if possible.

    Thanks for the response!
    What about the second part of my reply .... Look at the following, they would also be very easy to convert to c.

    http://www.codeguru.com/cpp/g-m/mult...icle.php/c1571 (Download the source at the bottom).
    http://www.adp-gmbh.ch/win/programming/avi/avi.html
    http://www.wischik.com/lu/programmer/avi_utils.html

    If Avi isnt your desired output format search for what is. Google is your friend.
    Learning somthing new every day!

  5. #5
    Join Date
    Feb 2010
    Posts
    3

    Re: (Easy question) Exporting video on Windows: do I use DirectX or something else?

    These are perfect, thanks!

    (I really don't care about the codec as long as it's pretty common.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center