Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Delphi: Video frames to bitmaps? (SXMedia install help!)

  1. #1

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    Hi,

    I guess this is not quite the correct forum for this but I've googled for almost an hour and haven't found any delphi programming forums. This is also pretty urgent (it's for a game competition which ends on sunday) so I appreciate it a lot if you can help me.

    This delphi project is actually a plugin for AdventureGameStudio. What I'm trying to achieve is to play an Avi file (compressed with DivX) outputting it onto a screen bitmap (TBitmap, 640x400). Can this be done using the TMediaPlayer component or perhaps the VideoLab components (I can't figure out how to use them without the graphical ide)? The bitmap will then be passed on to the game engine which draws it onto the screen.

    Thanks for any help!

    -edit-
    Oh, and I'm pretty much a beginner with this sort of stuff. I've made programs in delphi but that's easy when you can use the graphical ide.

  2. #2

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    Hi and Welcome

    There are a number of ways to do this.

    The SXMedia Components renders any movie using DirectShow and DirectX (the components use DelphiX) so you could base some of your code on that, and just capture each frame to a bitmap.

    There are probably some avi.pas units around somewhere (I think I have one) tht will allow you to get a bitmap image from the avi file. IF I can find that I will post it (no promises though as I wrote that code about 10 years ago).

    Dean
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  3. #3

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    I wasn't able to install SXMedia (required package 'vcl30' not found). I don't think DelphiX was installed properly either. I'm using Delphi 2005, by the way.

    I have no idea what to try next. VideoLab components didn't work. They just crashed the game or maybe I was just doing something wrong.

    Help...

    -edit-
    And if I just remove the requires, I get the error "File not found: 'dsgnintf.dcu'"

  4. #4

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    Just remove the refernece to vcl30 and it will automatically pick up the correct packages. :-)

    That package was developed in Delphi 3 soyou will definately need to modify the pgk file.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  5. #5

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    Okay, I guess that's sorted out now. But I still get these errors:
    [Error] DShow.pas(1897): E2003 Undeclared identifier: 'DDSURFACEDESC'
    [Error] DShow.pas(2630): E2003 Undeclared identifier: 'DDCAPS'
    [Error] DShow.pas(3011): E2003 Undeclared identifier: 'DDPIXELFORMAT'
    [Error] DShow.pas(3279): E2003 Undeclared identifier: 'DDCOLORCONTROL'

    There must be some library or something still missing?

  6. #6

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    Seems you need a DirectDraw.pas (or DDraw.pas ?) compatible with your DShow unit.
    There are only 10 types of people in this world; those who understand binary and those who don't.

  7. #7

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    Okay, I it should work now. When I compile SXMedia, it says it will add DelphiX90. But when I click ok delphi highlights the requires line "DelphiX90" and gives this error message:
    [Error] SXM.dpk(31): E2399 Namespace conflicts with unit name '(null)'

    What do I do?

  8. #8

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    I'd like to ask - do you need just to show your video in some rectangle, or would you want to be able to capture every frame shown (hence the TBitmap thing)? Or is it neither and you want to show video on some surface (side of a cube say..)? Now i'm kind of uncertain whether i could be of any use to you or not, 'cause i don't know which one of these you're trying to achieve

  9. #9

    Delphi: Video frames to bitmaps? (SXMedia install help!)

    Well, what I want to do is to play a video file one frame at a time and convert that frame into a PBitmap which is then forwarded to the AGS engine and it draws the bitmap onto the screen. This is supposed to be a plugin.

    One problem with all this is that it might not be fast enough to play the video in real time.

  10. #10

    Re: Delphi: Video frames to bitmaps? (SXMedia install help!)

    To Aja¬£¬?

    Please provide the download address of SXMedia Components.

    Http://Www.cerebral-bicycle.co.uk Is unable to visit¡£If is convenient£¬Please send the Components to : dollavon@263.net. Thx

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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