Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Custom Audio And Video Recording Library On Android From WINSOFT For Delphi

Overview

To make their jobs easier, all photo and video editing applications make use of media libraries. This article is about the WINSOFT Media Recorder component for Android. This Media Recorder component for Android makes use of the Android MediaRecorder API to record audio and video.

The Android MediaRecorder API supports capturing and encoding a wide range of popular audio and video formats. In this post, you’ll learn how to create a custom audio and video library on Android using Winsoft Media Recorder and IDE software.

Intro

This is a commercial library that has a trial version with all features for evaluation only and if you wish to distribute the Media Recorder component as a part of your project you should get a license.

Moreover, some of the demo applications were built with the TACamera component for Android by WINSOFT. 

Specifications

Configuration

The installation of this Media Recorder component is easy, you just need to download the installer and run the installer. RAD Studio should be closed while installing.

Development

The UI is simple, we have the Settings button which requests permission and shows the camera settings. The Start button starts capturing, it can be a Stop button when it is capturing. Take Picture button takes a picture and we have a triggered function that ensures the photo taking is finished and saves the data to .jpeg file.

Here is the implementation for the Take Picture button and the PictureTaken procedure.

[crayon-673fa53143158888004508/]

Within the TTimer component, we can set output file format and path.

[crayon-673fa53143163171056891/]

As you can see after giving the path and format, it changes Active status to True and starts recording. 

TAMediaRecorder component has many built-in features to use. For instance, you can set VideoEncodingBitRate, VideoFrameRate, Video Encoding types like H263, Mpeg4SP, and many more options to utilize.

Here is the list of all the features of the TAMediaRecorder component:

In the next post, we will see how we can record audio with the TAMediaRecorder component.

Head over and check out the full WINSOFT Media Recorder component!

Exit mobile version