Re: QTMovie grabing while playback
Well, I'm glad I had an excuse to play around with Quartz Composer; I knew about it but had never spent any time with it, very cool! Unfortunately, it doesn't solve my immediate problem. As far as I can tell, compositions won't play streaming video at all. They work great with movies from files, and with local live sources (iSight, DV). But giving the Image With Movie patch an .sdp file just results in a static QuickTime logo, it never shows any actual video. Now I have at least three different methods for adding overlays to pre-recorded video, but none of those seem able to deal with RTSP/RTP streaming video. I'm going out on a limb here and conclude this isn't just one or the other of the APIs having an issue, rather it is a fundamental limitation in QuickTime, which can't (or won't) break out individual frames for compositing when it is playing streaming video. There are still things I haven't tried (i.e. Core Animation), but unfortunately I'm out of time to spend on this. I have a stop- gap solution in the separate overlay window approach, which works on anything, the drawback being a lousy frame rate if the overlay is in motion. But it is better than nothing, and I can have my app use that only when it is playing streaming video, switching to one of the better methods for other sources. Thanks very much to everyone for the suggestions and help! Bob On Apr 24, 2008, at 6:34 PM, douglas a. welton wrote: Bob, Scott took the words right out of my keyboard... ;^} Have you taken a look at the QCTV sample code? It does almost exactly what you want. regards, douglas On Apr 24, 2008, at 9:16 PM, Scott Anguish wrote: On Apr 24, 2008, at 9:05 PM, Bob Smith wrote: In my case all I want to do is be able to add a scrolling text overlay to whatever video is being played. My app is an informational video kiosk display driver, it's meant to run mostly unattended from playlists of images and pre-recorded video, but with occasional scheduled live segments from streaming video cameras on the local network. I'll take a look at Core Animation, however one of my limitations is the app has to run under Tiger, and I thought most of the CA stuff was new to Leopard. Would using Quartz Composer directly be an option for your app? I don't know about the performance issues, but overlaying text on top of video should be easy this way. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Hey, thank you very much. it helped a lot. but i still got one problem. The image I derive from NSBitmapImageRep initWithCIImage is much smaller than the original pixel size of the video. Because of that i can't use this method for production use. Is there another way to do this? regards, nikolai Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. Note: Depending on what type of analysis you are doing you may need to convert the CIImage into a pixel-based format. If that is too slow you may want to get friendly with QTVisualContextIsNewImageAvailable() and the Display Link... check out the CIVideoDemoGL sample code. regards, douglas On Apr 23, 2008, at 12:19 PM, Nikolai Hellwig wrote: Hi, I've done some image analysing software for QTKit Capture. It works fine. Now i need to use this for a quicktime movie. I can playback the quicktime movie, but i can't find any delegate which tells my application, that a new frame is rendered. If i can get this information i could grab this frame in order to analyse it. can anyone tell me how to do it? I don't want the user to click grabFrame or something like that. regards Nikolai Hellwig Mit freundlichen Grüßen Nikolai Hellwig [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Bob, re: Quartz Composer Did you check the Asynchronous Mode checkbox on the Movie Loader patch's Settings panel? This box is specifically available to allow for playback of streaming material. re: QT flaw The supposition that QuickTime is fundamentally flawed is not accurate. If you had time to explore, I would point you in the direction of the QT Broadcaster interface and the sample code available for receiving (and parsing) RTSP/RTP streams. If you don't have time, don't go down this path - the API is cryptic (at best) and very poorly documented. later, douglas On Apr 25, 2008, at 5:17 AM, Bob Smith wrote: Well, I'm glad I had an excuse to play around with Quartz Composer; I knew about it but had never spent any time with it, very cool! Unfortunately, it doesn't solve my immediate problem. As far as I can tell, compositions won't play streaming video at all. They work great with movies from files, and with local live sources (iSight, DV). But giving the Image With Movie patch an .sdp file just results in a static QuickTime logo, it never shows any actual video. Now I have at least three different methods for adding overlays to pre-recorded video, but none of those seem able to deal with RTSP/ RTP streaming video. I'm going out on a limb here and conclude this isn't just one or the other of the APIs having an issue, rather it is a fundamental limitation in QuickTime, which can't (or won't) break out individual frames for compositing when it is playing streaming video. There are still things I haven't tried (i.e. Core Animation), but unfortunately I'm out of time to spend on this. I have a stop-gap solution in the separate overlay window approach, which works on anything, the drawback being a lousy frame rate if the overlay is in motion. But it is better than nothing, and I can have my app use that only when it is playing streaming video, switching to one of the better methods for other sources. Thanks very much to everyone for the suggestions and help! Bob On Apr 24, 2008, at 6:34 PM, douglas a. welton wrote: Bob, Scott took the words right out of my keyboard... ;^} Have you taken a look at the QCTV sample code? It does almost exactly what you want. regards, douglas On Apr 24, 2008, at 9:16 PM, Scott Anguish wrote: On Apr 24, 2008, at 9:05 PM, Bob Smith wrote: In my case all I want to do is be able to add a scrolling text overlay to whatever video is being played. My app is an informational video kiosk display driver, it's meant to run mostly unattended from playlists of images and pre-recorded video, but with occasional scheduled live segments from streaming video cameras on the local network. I'll take a look at Core Animation, however one of my limitations is the app has to run under Tiger, and I thought most of the CA stuff was new to Leopard. Would using Quartz Composer directly be an option for your app? I don't know about the performance issues, but overlaying text on top of video should be easy this way. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Nikolai, Can you post a snippet of the code you are using for the conversion? regards, douglas On Apr 25, 2008, at 9:04 AM, Nikolai Hellwig wrote: Hey, thank you very much. it helped a lot. but i still got one problem. The image I derive from NSBitmapImageRep initWithCIImage is much smaller than the original pixel size of the video. Because of that i can't use this method for production use. Is there another way to do this? regards, nikolai Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. Note: Depending on what type of analysis you are doing you may need to convert the CIImage into a pixel-based format. If that is too slow you may want to get friendly with QTVisualContextIsNewImageAvailable() and the Display Link... check out the CIVideoDemoGL sample code. regards, douglas On Apr 23, 2008, at 12:19 PM, Nikolai Hellwig wrote: Hi, I've done some image analysing software for QTKit Capture. It works fine. Now i need to use this for a quicktime movie. I can playback the quicktime movie, but i can't find any delegate which tells my application, that a new frame is rendered. If i can get this information i could grab this frame in order to analyse it. can anyone tell me how to do it? I don't want the user to click grabFrame or something like that. regards Nikolai Hellwig Mit freundlichen Grüßen Nikolai Hellwig [EMAIL PROTECTED] Sands Logo Text klein.png ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Hi, the image comes from: - (CIImage*) view: (QTMovieView *)view willDisplayImage: (CIImage *)image { ... // this is the conversion code NSBitmapImageRep* bitmap = [[NSBitmapImageRep alloc] initWithCIImage: image]; ... } regards, nikolai Am 25.04.2008 um 16:43 schrieb douglas a. welton: Nikolai, Can you post a snippet of the code you are using for the conversion? regards, douglas On Apr 25, 2008, at 9:04 AM, Nikolai Hellwig wrote: Hey, thank you very much. it helped a lot. but i still got one problem. The image I derive from NSBitmapImageRep initWithCIImage is much smaller than the original pixel size of the video. Because of that i can't use this method for production use. Is there another way to do this? regards, nikolai Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. Note: Depending on what type of analysis you are doing you may need to convert the CIImage into a pixel-based format. If that is too slow you may want to get friendly with QTVisualContextIsNewImageAvailable() and the Display Link... check out the CIVideoDemoGL sample code. regards, douglas On Apr 23, 2008, at 12:19 PM, Nikolai Hellwig wrote: Hi, I've done some image analysing software for QTKit Capture. It works fine. Now i need to use this for a quicktime movie. I can playback the quicktime movie, but i can't find any delegate which tells my application, that a new frame is rendered. If i can get this information i could grab this frame in order to analyse it. can anyone tell me how to do it? I don't want the user to click grabFrame or something like that. regards Nikolai Hellwig Mit freundlichen Grüßen Nikolai Hellwig [EMAIL PROTECTED] Sands Logo Text klein.png Mit freundlichen Grüßen Nikolai Hellwig [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Nikolai, Perhaps you might try creating an empty NSBitmapImageRep with the size and pixel attributes you need. Then, use the resultant object as a graphic context and draw your CIImage into that. The Reducer sample code does something similar to this. I can imagine that this process might be slow, but I don't know what your performance requirements are. regards, douglas On Apr 25, 2008, at 11:58 AM, Nikolai Hellwig wrote: Hi, the image comes from: - (CIImage*) view: (QTMovieView *)view willDisplayImage: (CIImage *)image { ... // this is the conversion code NSBitmapImageRep* bitmap = [[NSBitmapImageRep alloc] initWithCIImage: image]; ... } regards, nikolai Am 25.04.2008 um 16:43 schrieb douglas a. welton: Nikolai, Can you post a snippet of the code you are using for the conversion? regards, douglas On Apr 25, 2008, at 9:04 AM, Nikolai Hellwig wrote: Hey, thank you very much. it helped a lot. but i still got one problem. The image I derive from NSBitmapImageRep initWithCIImage is much smaller than the original pixel size of the video. Because of that i can't use this method for production use. Is there another way to do this? regards, nikolai Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. Note: Depending on what type of analysis you are doing you may need to convert the CIImage into a pixel-based format. If that is too slow you may want to get friendly with QTVisualContextIsNewImageAvailable() and the Display Link... check out the CIVideoDemoGL sample code. regards, douglas On Apr 23, 2008, at 12:19 PM, Nikolai Hellwig wrote: Hi, I've done some image analysing software for QTKit Capture. It works fine. Now i need to use this for a quicktime movie. I can playback the quicktime movie, but i can't find any delegate which tells my application, that a new frame is rendered. If i can get this information i could grab this frame in order to analyse it. can anyone tell me how to do it? I don't want the user to click grabFrame or something like that. regards Nikolai Hellwig Mit freundlichen Grüßen Nikolai Hellwig [EMAIL PROTECTED] Sands Logo Text klein.png Mit freundlichen Grüßen Nikolai Hellwig [EMAIL PROTECTED] Sands Logo Text klein.png ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Sorry to come in late, but this is something that occasionally comes up on quicktime-api and quicktime-java. To get text or images on top of a movie, sometimes it's easier to skip the programming approach and achieve the effect with authoring. Using the old QuickTime API, you could add a text track or a one-sample video track (higher in the Z- order, and with a suitable compositing mode), to achieve this effect without having to hack the rendering pipeline. Even easier still, just author a SMIL movie as an XML file and load that as your movie. Example on my blog: http://www.subfurther.com/blog/?p=84 Authoring won't always take you as far as you need to go, of course; in the case of a capture preview, you almost certainly have to do something clever with the QTCaptureView, or via Core Animation with the layers (Bill Dudney has an example of this in his new CA book from the Pragmatic Programmers). --Chris On Wed, 23 Apr 2008 16:08:38 -0400 douglas a. welton wrote: Bob Randall, If all you want to do is slap some arbitrary text over a movie, I would suggest that you take a look at using QTMovieLayer and CATextLayer as the mechanism for doing this. I don't have any code that I can share with you on this, but a previous client project used these two Core Animation objects with excellent results. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On 25.04.2008, at 11:17, Bob Smith wrote: Well, I'm glad I had an excuse to play around with Quartz Composer; I knew about it but had never spent any time with it, very cool! Unfortunately, it doesn't solve my immediate problem. As far as I can tell, compositions won't play streaming video at all. They work great with movies from files, and with local live sources (iSight, DV). But giving the Image With Movie patch an .sdp file just results in a static QuickTime logo, it never shows any actual video. IIRC QCPerformer is the sample that shows how to - use a CVDisplayLink for VBL-synched movie decoding - feed the result via OPenGL into Quartz Composer, that might be what you want to throw into the QCTV source mixer... Regards, Tom_E ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Apr 25, 2008, at 7:41 AM, douglas a. welton wrote: Bob, re: Quartz Composer Did you check the Asynchronous Mode checkbox on the Movie Loader patch's Settings panel? This box is specifically available to allow for playback of streaming material. Eh? I don't see a patch called Movie Loader at all. I see a Generator patch called Image With Movie, and the only setting is Highest Quality. I'm doing all development under Tiger because I have to deploy on older systems, could you be describing something which is new to Leopard? I should repeat my tests under 10.5, it is possible one of these approaches will just work. That isn't necessarily a solution since I would have to persuade the client to upgrade a pile of old G5 systems, but I should find out if this problem is only on Tiger. re: QT flaw The supposition that QuickTime is fundamentally flawed is not accurate. If you had time to explore, I would point you in the direction of the QT Broadcaster interface and the sample code available for receiving (and parsing) RTSP/RTP streams. If you don't have time, don't go down this path - the API is cryptic (at best) and very poorly documented. Today I agree with you, my jumped-to conclusion isn't justified. Sorry, I was feeling a bit frustrated last night. There is surely some way to get this to work by using the QuickTime C APIs directly, but some subtlety involved in streaming just isn't being handled by the Cocoa APIs, at least not on 10.4. However, other than doing some tests on 10.5, I have to set this aside due to time constraints. I've got something deliverable now, hopefully I'll have a chance to figure out how to do it right later. Thanks! Bob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Apr 23, 2008, at 1:08 PM, douglas a. welton wrote: Bob Randall, If all you want to do is slap some arbitrary text over a movie, I would suggest that you take a look at using QTMovieLayer and CATextLayer as the mechanism for doing this. I don't have any code that I can share with you on this, but a previous client project used these two Core Animation objects with excellent results. regards, douglas I will look into that, because my problem isn't solved yet. I wasn't able to get my app working using the Core Video display link because QuickTime wouldn't give me new frames when it was playing live streaming video. However using the -view:willDisplayImage: delegate callback... doesn't work either, for the same reason! The delegate method works fine for video from a file, but it is _never_called_ when QuickTime is playing a live video stream. Anyone know what is going on here? Is this some sort of DRM nonsense to prevent us from capturing live streams? In my case all I want to do is be able to add a scrolling text overlay to whatever video is being played. My app is an informational video kiosk display driver, it's meant to run mostly unattended from playlists of images and pre-recorded video, but with occasional scheduled live segments from streaming video cameras on the local network. I'll take a look at Core Animation, however one of my limitations is the app has to run under Tiger, and I thought most of the CA stuff was new to Leopard. Thanks to all for your help. Bob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Am 24.04.2008 um 22:14 schrieb Bob Smith: In my case all I want to do is be able to add a scrolling text overlay to whatever video is being played. My app is an informational video kiosk display driver, it's meant to run mostly unattended from playlists of images and pre-recorded video, but with occasional scheduled live segments from streaming video cameras on the local network. I'll take a look at Core Animation, however one of my limitations is the app has to run under Tiger, and I thought most of the CA stuff was new to Leopard. Have you considered rendering your text in a separate layer (not CA layer) on top of the movie? Several options: 1) borderless overlay window. Could be a child window if the window with the movie in it can be moved around, so they stick together. If your Macs are recent enough, the Quartz Compositing engine in Quartz Extreme will take care of using the GPU to composite the two windows on top of each other 2) IIRC movies can be rendered into OpenGL polygons. You could try doing that and then rendering your text into a separate OpenGL surface on top 3) I think QuickTime movies can contain layers, layered sprites etc. You might be able to modify the movie before playing it, adding such a track to it. 4) I think there's a sample on Apple's web site somewhere that draws pushbuttons etc. on top of a movie (or maybe it was an OpenGL scene?). Anyway, that approach might work for your movie, too. Just some avenues to explore. HTH. Cheers, -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Apr 24, 2008, at 4:03 PM, Uli Kusterer wrote: 4) I think there's a sample on Apple's web site somewhere that draws pushbuttons etc. on top of a movie (or maybe it was an OpenGL scene?). Anyway, that approach might work for your movie, too. The sample that does this uses Core Animation to do the layering, which of course will result in text that does not use sub-pixel antialiasing (which I presume is why you said not to use a CALayer). -- David Duncan Apple DTS Animation and Printing [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
it's the example in the Core Animation Programming Guide, last chapter. Source isn't available at the moment other than in the book. It's text laid over a QCCompositionLayer that is running. On Apr 24, 2008, at 7:03 PM, Uli Kusterer wrote: 4) I think there's a sample on Apple's web site somewhere that draws pushbuttons etc. on top of a movie (or maybe it was an OpenGL scene?). Anyway, that approach might work for your movie, too. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Apr 24, 2008, at 4:03 PM, Uli Kusterer wrote: Am 24.04.2008 um 22:14 schrieb Bob Smith: In my case all I want to do is be able to add a scrolling text overlay to whatever video is being played. My app is an informational video kiosk display driver, it's meant to run mostly unattended from playlists of images and pre-recorded video, but with occasional scheduled live segments from streaming video cameras on the local network. I'll take a look at Core Animation, however one of my limitations is the app has to run under Tiger, and I thought most of the CA stuff was new to Leopard. Have you considered rendering your text in a separate layer (not CA layer) on top of the movie? Several options: 1) borderless overlay window. Could be a child window if the window with the movie in it can be moved around, so they stick together. If your Macs are recent enough, the Quartz Compositing engine in Quartz Extreme will take care of using the GPU to composite the two windows on top of each other 2) IIRC movies can be rendered into OpenGL polygons. You could try doing that and then rendering your text into a separate OpenGL surface on top 3) I think QuickTime movies can contain layers, layered sprites etc. You might be able to modify the movie before playing it, adding such a track to it. 4) I think there's a sample on Apple's web site somewhere that draws pushbuttons etc. on top of a movie (or maybe it was an OpenGL scene?). Anyway, that approach might work for your movie, too. Just some avenues to explore. HTH. I did try the overlay window approach and the problem was performance on older G5 systems. I expected the GPU to take care of the compositing, but it seems as if the higher-level window gets rendered in software if the lower-level window is using OpenGL directly, which I assume is what QTMovieView is doing. The result was the video would play fine, but the frame rate on the scrolling text overlay was very low. It may work on a faster system or with a better graphics card; unfortunately this app has to run on older Macs. But your other suggestions sound like good possibilities, I'll investigate those further. Thanks! Bob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Apr 24, 2008, at 9:05 PM, Bob Smith wrote: In my case all I want to do is be able to add a scrolling text overlay to whatever video is being played. My app is an informational video kiosk display driver, it's meant to run mostly unattended from playlists of images and pre-recorded video, but with occasional scheduled live segments from streaming video cameras on the local network. I'll take a look at Core Animation, however one of my limitations is the app has to run under Tiger, and I thought most of the CA stuff was new to Leopard. Would using Quartz Composer directly be an option for your app? I don't know about the performance issues, but overlaying text on top of video should be easy this way. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Bob, Scott took the words right out of my keyboard... ;^} Have you taken a look at the QCTV sample code? It does almost exactly what you want. regards, douglas On Apr 24, 2008, at 9:16 PM, Scott Anguish wrote: On Apr 24, 2008, at 9:05 PM, Bob Smith wrote: In my case all I want to do is be able to add a scrolling text overlay to whatever video is being played. My app is an informational video kiosk display driver, it's meant to run mostly unattended from playlists of images and pre-recorded video, but with occasional scheduled live segments from streaming video cameras on the local network. I'll take a look at Core Animation, however one of my limitations is the app has to run under Tiger, and I thought most of the CA stuff was new to Leopard. Would using Quartz Composer directly be an option for your app? I don't know about the performance issues, but overlaying text on top of video should be easy this way. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. Note: Depending on what type of analysis you are doing you may need to convert the CIImage into a pixel-based format. If that is too slow you may want to get friendly with QTVisualContextIsNewImageAvailable() and the Display Link... check out the CIVideoDemoGL sample code. regards, douglas On Apr 23, 2008, at 12:19 PM, Nikolai Hellwig wrote: Hi, I've done some image analysing software for QTKit Capture. It works fine. Now i need to use this for a quicktime movie. I can playback the quicktime movie, but i can't find any delegate which tells my application, that a new frame is rendered. If i can get this information i could grab this frame in order to analyse it. can anyone tell me how to do it? I don't want the user to click grabFrame or something like that. regards Nikolai Hellwig ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Le 23 avr. 08 à 19:30, Bob Smith a écrit : On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: Nikolai, QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. I cannot find this method in the documentation, where is it described? Is it in the public interface? This is the perfect solution to a similar problem I'm having with a Cocoa app using QuickTime, but I don't want to use undocumented private APIs. Yes, it's a public method even if the documentation is missing. Undocumented does not mean private. You may considere that everything that is declared in public headers is public (except if there is a comment that say it's not, but it's unusual). This method is not documented because this is a method introduce with QTKit 7.2 and the documentation was not updated to reflect the change. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Apr 23, 2008, at 11:30 AM, Bob Smith wrote: On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. I cannot find this method in the documentation, where is it described? Is it in the public interface? This is the perfect solution to a similar problem I'm having with a Cocoa app using QuickTime, but I don't want to use undocumented private APIs. I think he means QTCaptureView. It's not undocumented; you'll find it in the QTCaptureView class reference material (available in QT 7.2.1 and later). Whether it's relevant for you or not depends on how you're displaying the movie. I *think* (but am not 100% sure) that this delegate method is only valid for this particular type of view (which displays a video preview of a capture session). ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Le 23 avr. 08 à 19:58, Randall Meadows a écrit : On Apr 23, 2008, at 11:30 AM, Bob Smith wrote: On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. I cannot find this method in the documentation, where is it described? Is it in the public interface? This is the perfect solution to a similar problem I'm having with a Cocoa app using QuickTime, but I don't want to use undocumented private APIs. I think he means QTCaptureView. It's not undocumented; you'll find it in the QTCaptureView class reference material (available in QT 7.2.1 and later). Whether it's relevant for you or not depends on how you're displaying the movie. I *think* (but am not 100% sure) that this delegate method is only valid for this particular type of view (which displays a video preview of a capture session). This delegate method was also added to QTMovieView. It's really helpfull for example if you want to apply some effect or if you want to insert text in your movie. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Apr 23, 2008, at 12:15 PM, Jean-Daniel Dupas wrote: This delegate method was also added to QTMovieView. It's really helpfull for example if you want to apply some effect or if you want to insert text in your movie. Nice. I use the QTCaptureView version in my app to rotate a live video preview coming from a digital camera. I use CIImage's - imagebyApplyingTransform: to rotate it 90° to match the orientation of the camera, but I can only get about 3 1/3 frames per second out of it. MY client has requested a better frame rate than that, but I've been stymied so far. Any suggestions on how to do better?___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
On Wed, 23 Apr 2008 20:15:39 +0200 Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Le 23 avr. 08 à 19:58, Randall Meadows a écrit : On Apr 23, 2008, at 11:30 AM, Bob Smith wrote: On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. I cannot find this method in the documentation, where is it described? Is it in the public interface? This is the perfect solution to a similar problem I'm having with a Cocoa app using QuickTime, but I don't want to use undocumented private APIs. I think he means QTCaptureView. It's not undocumented; you'll find it in the QTCaptureView class reference material (available in QT 7.2.1 and later). Whether it's relevant for you or not depends on how you're displaying the movie. I *think* (but am not 100% sure) that this delegate method is only valid for this particular type of view (which displays a video preview of a capture session). This delegate method was also added to QTMovieView. It's really helpfull for example if you want to apply some effect or if you want to insert text in your movie. Exactly what I'm trying to do, add text overlay to any movie being played. I have been using the Core Video display link which is fine most of the time, except for unknown reasons it doesn't work with a streaming video source. QTMovieView plays streams just fine, so if I can hook in to it's Core Image processing chain to add my overlays, problem solved. One question, is it correct to assume the delegate method might be called on a secondary thread? Thanks! Bob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: QTMovie grabing while playback
Bob Randall, If all you want to do is slap some arbitrary text over a movie, I would suggest that you take a look at using QTMovieLayer and CATextLayer as the mechanism for doing this. I don't have any code that I can share with you on this, but a previous client project used these two Core Animation objects with excellent results. regards, douglas On Apr 23, 2008, at 2:39 PM, Bob Smith wrote: On Wed, 23 Apr 2008 20:15:39 +0200 Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Le 23 avr. 08 à 19:58, Randall Meadows a écrit : On Apr 23, 2008, at 11:30 AM, Bob Smith wrote: On Apr 23, 2008, at 10:05 AM, douglas a. welton wrote: QTMovieView has a delegate method - (CIImage*) view: (QTMovieView *)Target_View willDisplayImage: (CIImage *)New_Image This method gives you a CIImage to play with before it is displayed in the Target_View. Check the header file for QTMovieView.h (near the bottom). I think the the MyMovieFilter sample code uses this method. I cannot find this method in the documentation, where is it described? Is it in the public interface? This is the perfect solution to a similar problem I'm having with a Cocoa app using QuickTime, but I don't want to use undocumented private APIs. I think he means QTCaptureView. It's not undocumented; you'll find it in the QTCaptureView class reference material (available in QT 7.2.1 and later). Whether it's relevant for you or not depends on how you're displaying the movie. I *think* (but am not 100% sure) that this delegate method is only valid for this particular type of view (which displays a video preview of a capture session). This delegate method was also added to QTMovieView. It's really helpfull for example if you want to apply some effect or if you want to insert text in your movie. Exactly what I'm trying to do, add text overlay to any movie being played. I have been using the Core Video display link which is fine most of the time, except for unknown reasons it doesn't work with a streaming video source. QTMovieView plays streams just fine, so if I can hook in to it's Core Image processing chain to add my overlays, problem solved. One question, is it correct to assume the delegate method might be called on a secondary thread? Thanks! Bob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/douglas_welton%40earthlink.net This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]