Capturing a video clip

To record video data to a file, descriptor, or an URL, use the video recorder utility of the Multimedia Framework (MMF) to develop your application. To make use of the onboard camera to capture a video clip, the application needs to repeat the steps described in the illustration below.

Figure: The steps required to capture a video clip

Important implementation considerations include:

  • To open a file for recording the CVideoRecorderUtility class requires the MMF Controller Framework API to specify controller and format UIDs. From S60 3rd Edition, Feature Pack 2 onwards, the MMF Controller Framework API is included in the SDK. The MMF Controller Framework is available in a separate Extensions plug-in, but only for S60 3rd Edition SDK, Maintenance Release. Note that you should not install this SDK version on top of the S60 3rd Edition, Feature Pack 1 or 2 SDKs, as this causes problems with the emulator.

  • If you need to use the display of the device as a viewfinder for your video application, request viewfinder frames using the CCamera class, and draw them yourself. For more information, see step 3 in Capturing a still image.

  • The settings you can use in your application depend on what the camera hardware on the device supports.

Capturing a video

To capture a video clip, use the methods of the CVideoRecorderUtility class to construct your application, and follow the steps below.

  1. Initialize the video recorder.

  2. Configure the audio/video settings.

    You can check and set, for example, the recording priority, audio track, video frame size and frame rate, audio and video codecs and bitrates, and recording gain of the video clip. For more information on the options, see the CVideoRecorderUtility class.

  3. Capture the video clip.

  4. To exit the application or to switch it to the background, close audio and video controllers using the CVideoRecorderUtility::Close() method.

  5. Include VideoRecorder.h and mmfcontrollerpluginresolver.h header files in the appropriate class file(s).

  6. Make sure you have correct capabilities information set for your application. You need at least the UserEnvironment capability. If you want to set the recording priority for the videoaudio device, you need the MultimediaDD capability.

  7. Make sure mediaclientvideo.lib and mmfcontrollerframework.lib are accessible to your linker when compiling your application by including it in your mmp file or by editing the project properties in your IDE, depending on your build environment.

Additional information on capturing a video

For a reference example, see the S60 Platform Video Example v2.0 on Forum Nokia.

For more information on CVideoRecorderUtility, see Video Recording and How to use the video recorder utility in the Symbian OS Library.