×
Namespaces

Variants
Actions

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
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 2 (13 Jun 2007)
Last edited: hamishwillee (14 Jun 2013)

Overview

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

Description

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 ));
...
iRecorder->Prepare();

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.

This page was last modified on 14 June 2013, at 05:05.
62 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.

×