OK so I want to record the screen of a Mac directly to a .mov or .m4v. I've taken a look at Son of Grab from Apple, but I would prefer not to deal with screenshots and individual images and just work with video.
I thought there should be something in QTKit but I can't find it. I know this can be done in OpenGL, but 1) I don't know how and 2) I'd like to avoid that if possible.
Just to elaborate, I am recording from iSight using QTCaptureDeviceInput and (obviously a QTDevice) because I need to solution to work on Snow Leopard.
It seems like there should be a way to just target the screen as the input device for QTMediaTypeVideo.
Any help would be greatly appreciated.
You can use AVFoundation to do screen recording on the Mac. It's only available on 10.7 though.
You can use CGDisplayCreateImage/CGDisplayCreateImageFromRect APIs (10.6+) to obtain still images of screen and then making a movie out of them.
I'm not sure how good will be the performance though.
I have found that when faced with the question, will it be fast enough or not, just give it a try. Do a quick test by gabbing frame after frame say 1000 times and time it. CGDisplayCreateImageFromRect is not that hard to call at all. I have called it for single screen shots of the whole screen when the mouse was clicked, and it hardly slowed my mac down (only a basic dual core machine).
Apple has two samples showing the main two ways this can be done: :-
ScreenSnapshot
SonOfGrab
It would be easy to modify these to do it say 1000 times in a loop!
Related
I'm currently working on a project for an interactive visitor space and one of the interactive screens will be two landscape 4K screens side by side with an extended/stretched desktop.
So, the total screen resolution will be 7680px x 2180px. The application will be browser based and will allow multiple users to work with a media library and bring pictures and videos onto the screen and stretch, pan and play them and all that good stuff.
My problem is in testing this solution as we go through development. The actual screens are in Laguna Beach, CA and we are based in London. We can work with 1080p touchscreens, however there is nothing like testing on the real thing and I foresee difficulties.
Does anyone have any ideas how I could emulate this screen size, which would at least allow a little more confidence? I'm thinking of virtual machines, but not sure if this will even work.
Any help appreciated.
Many thanks
Pete
Try following this. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003
Good luck!
I'm trying to reproduce a gridview for a landscape only iPad app.
I've tried a few know Gridviews such as AQGridview or GMGridView but it doesn't fit since it's not a "traditional" gridview (it is for an epg so the elements are not of the same size - depending on their duration).
What I would like to achieve should be more like the iTunes Movie Trailers app.
I was wondering if you know any library (free & open source, if possible) that could help me to achieve this.
Last one I've seen is NGVaryingGridView which sounds promising but it doesn't seem to be optimized (try to rotate it just for fun).
Thanks in advance for any advice.
Since iOS 6, Apple added UICollectionView. Using a UIFlowLayout you can do exactly what you want. It's pretty neat. The only downside is that it's not available in iOS 5.
I'm basically trying to work out how to take a slice of an image, say a screenshot of an iPhone home screen, slice out the first icon and compare it to a set array of images in a library. Any help on where to start?
I'm no iPhone programmer, but I might be able to suggest a few things:
The SURF feature detection implemented in OpenCV should help you with this
There is a nice article on using OpenCV in Objective-C code.
A quick & dirty way might be to use the difference blend mode which should return the difference between the 1st image(top) and the 2nd image(bottom). If there is no difference the result will be completely black. So, the more black pixels in the difference result, potentially, the more similarities between the compared images.
I'm not an iOS developer, so I don't know if there is an image library that ships with sdk or if there's a free/opensource library for basic image processing. Still this should be trivial to implement:
e.g.
- (int)difference((int)topPixel,(int)bottomPixel)
{
return abs(topPixel-bottomPixel);
}
Note: Syntax might not be correct :)
HTH
This may not help you with taking a screenshot of the iOS home screen... But these articles show how to take snapshots from within a UIKit application:
https://developer.apple.com/library/prerelease/ios/#qa/qa1703/_index.html
https://developer.apple.com/library/prerelease/ios/#qa/qa1714/_index.html
Perhaps you would instruct the user to press home-power (buttons) to take a snapshot and store in the photo roll, then load that screenshot into an app to process the screenshot.
Hope this helps!
I'm just learning to use XCode and program in Objective-C (my plan is to write a an app we need for my business since I can't find one that does what I need). It's going well and as an exercise I've been playing with database apps and screensavers.
I'm trying to write a screensaver that all it does is to show 3 or 4 pictures randomly floating on the screen. Similar to the out of the box pictures screensaver that comes with Mac OS X.
I've played with the code in http://cocoadevcentral.com/articles/000088.php and while very informative I still don't know how to add those 3 or 4 pictures and make them move.
Anyone out there can point me to sample code? Or a project that I can use as reference?
Again, this is just self learning.
Thank you!
This will probably be your first port of call.
My approach to this was to create a Quartz Composition using Quartz composer. I found this easier than figuring out how to draw and animate everything by hand.
You can display a quartz composition inside a ScreensaverView by using the QCView class. This setup worked well for me.
I am making an application in iPhone , in that I want to give animation to my image like
Growing from beginning to end and also waving in air, it seems to work like flower, growing from root and also waving in air from left to right smoothly.
I don't know how to perform such kind of animation.
If any one do have any idea or sample please let me know.
Thanks and regrards Viral
This would be a pretty complex animation. It can be done, but it will be somewhat tedious. Here is a tutorial by John Blackburn that demonstrates making a jack-in-the-box animation step by step. It would probably be a good starting point for you as you will need to use the same method as John uses.