Professional Web Applications Themes

Accessing frame pixels while recording to a file - Mac Programming

Hello, I have used the MungGrab sample code in my application for grabbing and recording video. This uses a DataProc to put the grabbed sequence on screen. In order to actually start recording to a file, I use SGSetDataOutput to let the sequence grabber have the destination file (when not in recording mode, I use SGSetDataRef with the seqGrabDontMakeMovie flag to stop the sequence grabber from actually recording to a file). I am now trying to do some modifications to each frame's pixels that is added to the movie file and I thought of using bottle neck procedures for that ...

  1. #1

    Default Accessing frame pixels while recording to a file

    Hello,

    I have used the MungGrab sample code in my application for grabbing
    and recording video.
    This uses a DataProc to put the grabbed sequence on screen.
    In order to actually start recording to a file, I use SGSetDataOutput
    to let the sequence grabber have the destination file (when not in
    recording mode, I use SGSetDataRef with the seqGrabDontMakeMovie flag
    to stop the sequence grabber from actually recording to a file).

    I am now trying to do some modifications to each frame's pixels that
    is added to the movie file and I thought of using bottle neck
    procedures for that (or maybe there's a better way?). My purpose is
    to have the frame's modified pixels saved in the movie file . It is
    less important to me to show the modified pixels in the preview
    screen.

    What is the best suitable bottle neck function to do this? how can I
    access the pixels of the frame that is transferred to the output movie
    file in a way that the modifications will be saved in the file? any
    sample code for that available?

    Alternatively, I thought of post processing the movie after recording,
    i.e., load the recorded movie, take each frame, modify it's pixels
    according to my needs and save the movie again to a file.
    What will be the best approach to do that? How can I do that without
    actually playing the movie? any sample code available to show how this
    can be done?

    Hints will be welcomed,

    thanks
    Pini
    pinibz Guest

  2. #2

    Default Re: Accessing frame pixels while recording to a file

    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    > I am now trying to do some modifications to each frame's pixels that
    > is added to the movie file and I thought of using bottle neck
    > procedures for that (or maybe there's a better way?). My purpose is
    > to have the frame's modified pixels saved in the movie file . It is
    > less important to me to show the modified pixels in the preview
    > screen.
    >
    > What is the best suitable bottle neck function to do this? how can I
    > access the pixels of the frame that is transferred to the output movie
    > file in a way that the modifications will be saved in the file? any
    > sample code for that available?
    >
    > Alternatively, I thought of post processing the movie after recording,
    > i.e., load the recorded movie, take each frame, modify it's pixels
    > according to my needs and save the movie again to a file.
    > What will be the best approach to do that? How can I do that without
    > actually playing the movie? any sample code available to show how this
    > can be done?
    There are lots of samples, but I think that the size/complexity of QT
    can be daunting. You have to know what to look for, the jargon, etc.

    I think that your primary goal is to get each frame into a GWorld, and
    then back from the GWorld into a movie.Drawing frames into GWorlds is
    "core" QuickTime stuff; I think once you start looking under this topic
    you'll find a lot of stuff - a ton.

    From there you can manipulate the pixels in the GWorld row by row (or
    whatever), if that's what you want to do. That's generic QuickDraw code
    that you will find in a zillion examples. Search for any samples that
    contain GetPixBaseAddress, and you'll probably come up with the code.

    Don't forget that QT will perform a lot of complex pixel operations,
    and what you want to do may be translate-able into a matrix operation,
    etc.

    Now if you want to save the contents of those GWorlds frame-by-frame,
    as individual images, you can use QT's Export components. That's like 3
    or 4 lines of code, literally. Get all the Import & Export component
    samples, and you'll see.
    Mikey Guest

  3. #3

    Default Re: Accessing frame pixels while recording to a file

    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article <7ca9fe8f.0307280827.5006c9c6posting.google.com >, pinibz
    <pinibzfourier-sys.com> wrote:

    Oops, not done.

    _If_ you are capturing the data yourself; that is, if it's your
    sequence grabber, then you want to look at the ...ummm i think it's
    SGSendProc. That's in a sample called Mini Munge or something like
    that.

    In the other case, you're playing an existing movie into a GWorld,
    which is different, of course. I didn't get which one you were
    interested in.
    Mikey Guest

  4. #4

    Default Re: Accessing frame pixels while recording to a file

    Mikey <Forgetforget.com> wrote in message news:<030820030901406942%Forgetforget.com>...
    > [[ This message was both posted and mailed: see
    > the "To," "Cc," and "Newsgroups" headers for details. ]]
    >
    > In article <7ca9fe8f.0307280827.5006c9c6posting.google.com >, pinibz
    > <pinibzfourier-sys.com> wrote:
    >
    > Oops, not done.
    >
    > _If_ you are capturing the data yourself; that is, if it's your
    > sequence grabber, then you want to look at the ...ummm i think it's
    > SGSendProc. That's in a sample called Mini Munge or something like
    > that.
    >
    > In the other case, you're playing an existing movie into a GWorld,
    > which is different, of course. I didn't get which one you were
    > interested in.

    Thanks, I actually managed to do that a couple of days after I posted
    this message. I used
    bottlenecks functions for that.
    pinibz Guest

Similar Threads

  1. When recording a stream where is the actual file saved?
    By BackBayChef in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: August 10th, 07:33 AM
  2. Recording Audio and Video to a file...
    By LythoWeb in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: May 16th, 10:53 PM
  3. Adjusting ruler increments from every 12 pixels to every 10 pixels?
    By RobAbbott@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 2
    Last Post: April 15th, 10:39 PM
  4. Recording sound file
    By jlmjr webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 1
    Last Post: September 8th, 02:12 PM
  5. CAN I CHANGE SIZE (PIXELS) OF A PROJECTOR TO REDUCE THE FILE SIZE?
    By JB in forum Macromedia Director Basics
    Replies: 0
    Last Post: August 3rd, 06:04 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139