quicktime-java

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: legal pixel formats for QDGraphics Jason Proctor Tue Oct 14 13:01:38 2008

thanks for the response.

the exception i quoted comes is thrown by the QDGraphics constructor. i'm using the constructor which takes a pixel format and an image size. literally my application does this -

QDSession.open ();
QDRect bounds = new QDRect (320, 240);
QDGraphics gworld = new QDGraphics (kYVYU422PixelFormat, bounds);

- and throws there.

thanks for the pointer to the code sample, i'll put it with the others ;-) btw i'm not showing the output from the camera in the Java application - the YUV stream will be piped down a network connection, and ffmpeg is at the other end of a train of components that i can't currently talk about.

i could go and try some of the RGBA formats etc, but other video sources in my system are spitting out YUV422 etc and it would be nice to keep everything consistent.

also yes it looks like QTJ is soon going to be another victim of Apple's gradual withdrawal from Java, which is a massive own goal IMHO. the QTJ component of this system is not expected to be long-lived (thankfully).

tx
jason



At 9:52 PM -0500 10/13/08, [EMAIL PROTECTED] wrote:
i'm trying to stream YUV from the MacBook Pro camera to an encoding process which is basically a pipe to ffmpeg.

problem is i'm getting the following exception -

quicktime.qd.QDException[QTJava:7.5.5g],-157=cDepthErrInvalid,QT.vers:7558000

- with some pixel formats and i don't really know why. ideally i'd use kYVYU422PixelFormat or kUYVY422PixelFormat, or even kYUV411PixelFormat, but all of these throw the exception. in fact, almost anything that i specify which has a near match with ffmpeg's YUV support causes QT Java a problem!

i kinda settled on kYUVUPixelFormat, but this reproducibly crashes the VM after calling my SGDataProc a few times.

what's going on? any help appreciated.

Can you give us some more details about the exception you're seeing? (Does it occur when grabbing video, constructing an object, processing an image, etc.)

And/or sample code would be useful.

If you're trying to capture video from the built-in iSight camera, here's an example of how to do that with QTJ:

http://javagraphics.blogspot.com/2007/04/qtj-video-capture-in-swing-components.html

This particular example continually updates a BufferedImage that paints to a Swing component, but you could instead pipe that image data somewhere else (like ffmpeg, I assume).

(quiet in here...)
'
I can't speak for everyone, but personally I'm trying to avoid new QTJ projects as much as possible. Depending on your goals you may want to reconsider using QTJ... it's days are numbered.

Regards,
 - Jeremy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      ([EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/alexiscircle%40gmail.com

This email sent to [EMAIL PROTECTED]