Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 08:05, 2 July 2007.

通过CVideoRecorderUtility录制更大尺寸视频

From Forum Nokia Wiki

  • 设备, 软件 版本:

S60 3rd Edition


  • 详细描述:

如果想要录制尺寸超过QCIF(176x144)的视频,那就要使用MPEG-4格式("video/mp4v-es")。

_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


我们可以在支持MPEG-4 VSP Level4(Visual Simple Profile Level 4)的设备上捕捉到30fps的VGA(640x480)视频,大部分S60第三版手机至少都支持VSP Level 3,即CIF(352x288)30fps的视频。

如:

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


在MvruoOpenComplete回调函数中,capture size, frame rate以及bit rate应该在CVideoRecorderUtility::Prepare()前设置好,如下示例:

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();


我们可以通过CCamera获得当前设备所支持最大的视频capture size和frame rate

TInt sizeIndex = 0, rateIndex = 0;  
 
    iCamera->EnumerateVideoFrameSizes( iResolution, sizeIndex, CCamera::EFormatYUV420Planar );
 
    iCamera->EnumerateVideoFrameRates( iFps, rateIndex, CCamera::EFormatYUV420Planar, sizeIndex );
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX