Archived:Getting a larger size video recorded by CVideoRecorderUtility
Article Metadata
Compatibility
Article
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.

