Ask a Question related to Mac Programming, Design and Development.
-
pinibz #1
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
-
When recording a stream where is the actual file saved?
I am trying to find the actual flv file for conversion (a whole different issue I know), but it is not where I would have thought it would be. I... -
Recording Audio and Video to a file...
I am looking at setting up a site that would allow users to record audio and video to a server-side file that is database and can be viewed later. ... -
Adjusting ruler increments from every 12 pixels to every 10 pixels?
My rulers in Illustator are set to every 12 pixels, how can i change the increments so it counts every pixel instead of every 2 pixels? Thanks, Rob -
Recording sound file
Does anyone know a way for me to allow a user to record a sound file on my web page so that I can save it directly to the server? I read somewhere... -
CAN I CHANGE SIZE (PIXELS) OF A PROJECTOR TO REDUCE THE FILE SIZE?
as far as I know you would have to transform bitmap scale all bitmap members to the new size, then readjust their positions to score, and adjust... -
Mikey #2
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. ]]
There are lots of samples, but I think that the size/complexity of QT> 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?
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
-
Mikey #3
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.5006c9c6@posting.google.com >, pinibz
<pinibz@fourier-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
-
pinibz #4
Re: Accessing frame pixels while recording to a file
Mikey <Forget@forget.com> wrote in message news:<030820030901406942%Forget@forget.com>...
> [[ This message was both posted and mailed: see
> the "To," "Cc," and "Newsgroups" headers for details. ]]
>
> In article <7ca9fe8f.0307280827.5006c9c6@posting.google.com >, pinibz
> <pinibz@fourier-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



Reply With Quote

