Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 20, 2013, 07:05 AM   #1
anandcta123
macrumors newbie
 
Join Date: Dec 2012
AVFoundation video capture.

Dear All,

I am new bie to MAC AVFoundation programming.

I am trying to capture video from camera with a specific resolution, but I am not understanding about configuring video device with specific video dimension like 320x240.

In one way, I am setting as following code snippet. But even though I am setting with 320x240, it is capturing at 320x176 resolution. I am not understanding which are the APIs to use.

Please suggest proper way to handle this Media capture. Also provide me links, if any documentation or samples.

NSDictionary* captureDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithDouble:176], (id)kCVPixelBufferWidthKey,
[NSNumber numberWithDouble:144], (id)kCVPixelBufferHeightKey,
[NSNumber numberWithUnsignedInt:kCVPixelFormatType_24RGB],
(id)kCVPixelBufferPixelFormatTypeKey, nil];

// Specify the pixel format
vid_out.videoSettings = captureDictionary;

Regards,
Anand
anandcta123 is offline   0 Reply With Quote
Old Mar 21, 2013, 11:13 PM   #2
xStep
macrumors 68000
 
Join Date: Jan 2003
Location: Less lost in L.A.
Perhaps Apples AVCam sample can help you understand your question, along with the docs of course.
__________________
My App: CameraTime - Time lapse photography for novice and advanced users.
xStep is offline   0 Reply With Quote
Old Apr 4, 2013, 11:37 PM   #3
anandcta123
Thread Starter
macrumors newbie
 
Join Date: Dec 2012
AVFoundation video capture at specific resolution.

Dear sir,

I explored and understood video capture using AVFoundation. It is allowing me to set preset only for fixed resolutions as described in session presets. But cameras will support different resolutions other than these preset resolutions like 640x360. I am trying to capture at this resolution, but this is not working for me. Please tell me how I can set format to capture video at this resolution.

Thanks and Regards,
Anand
anandcta123 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Audio not working w. iOS 5.1.1 on iPad 1 [AVFoundation] Danneman101 iPhone/iPad Programming 2 Feb 9, 2014 05:19 PM
Noob Objective-C / Framework / AVFoundation question Golgafrincham Mac Programming 0 Jan 30, 2014 02:54 AM
Resolved: AVFoundation sound lag xArtx iPhone/iPad Programming 14 Jan 14, 2013 07:10 PM
out of disk space while transferring video using elgato video capture savanahrose Digital Video 2 Aug 16, 2012 05:55 PM
Strange crash with AVFoundation rukasu01 iPhone/iPad Programming 5 Jul 9, 2012 09:40 PM

Forum Jump

All times are GMT -5. The time now is 06:29 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC