Revision as of 10:38, 14 June 2012 by hamishwillee (Talk | contribs)

Archived:Getting a larger size video recorded by CVideoRecorderUtility

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Created: User:Technical writer 2 (13 Jun 2007)
Last edited: hamishwillee (14 Jun 2012)


This code snippet shows how to get the larger size video recorded by CVideoRecorderUtility.


To get a resolution greater than QCIF (176x144) for video recording, MPEG-4 format ("video/mp4v-es") must be used.

_LIT8(KMimeTypeMPEG4VSPL3, "video/mp4v-es; profile-level-id=3");  // MPEG-4 Visual Simple Profile Level 3
_LIT8(KMimeTypeMPEG4VSPL4, "video/mp4v-es; profile-level-id=4"); // MPEG-4 Visual Simple Profile Level 4

Video capture in VGA (640x480) at 30 fps is possible in devices that support MPEG-4 Visual Simple Profile Level 4 (e.g. Nokia N93, Nokia N95). Most other S60 3rd Edition devices support as least VSP Level 3, that is, CIF (352x288) resolution at 30 fps. For example,

iRecorder->OpenFileL( iFilename, iCameraHandle, iControllerUid, iFormatUid, KMimeTypeMPEG4VSPL4, KMMFFourCCCodeAAC );

In MvruoOpenComplete callback capture size, frame rate, and bit rate must be set before calling CVideoRecorderUtility::Prepare(). For example,

void CMyVideoRecorder::MvruoOpenComplete( TInt aError )
if( aError == KErrNone )
// instead of using TRAP_IGNORE, proper error checking should be done
TRAP_IGNORE( iRecorder->SetVideoFrameSizeL( iResolution ));
TRAP_IGNORE( iRecorder->SetVideoFrameRateL( iFps ));
TRAP_IGNORE( iRecorder->SetVideoBitRateL( KMMFVariableVideoBitRate ));

Retrieving maximum supported video capture size and frame rate from CCamera:

TInt sizeIndex = 0, rateIndex = 0;
iCamera->EnumerateVideoFrameSizes( iResolution, sizeIndex, CCamera::EFormatYUV420Planar );
iCamera->EnumerateVideoFrameRates( iFps, rateIndex, CCamera::EFormatYUV420Planar, sizeIndex );

Note that some devices might not return the maximum supported values at the first index (0).

For detailed information about supported video capture sizes, see the Nokia Developer Audio & Video feature tables.

54 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.