Video - MP4 Recording

Materials

Example

Introduction

In this example, we will use the Ameba Pro2 development board to record video and audio data from the on-board camera sensor (JXF37) and audio codec to an MP4 file on the SD card.

The following examples shows different use cases for MP4 recording.
1. RecordMP4AudioOnly
2. RecordMP4VideoOnly
3. RecordMP4SingleVideoWithAudio
4. RecordMP4DoubleVideoWithAudio

Procedure

Open one of the RecordMP4 examples in “File” -> “Examples” -> “AmebaVideo”.

1

Since the camera video output will be used, ensure that the “Video Init” option in “Tools” is set to enabled.

1

Compile the code and upload it to Ameba. After pressing the Reset button, the Ameba Pro 2 board will start recording MP4 to SD card.

1

After the recording duration has passed, the MP4 file will stop recording.

1

Disconnect power from the Ameba Pro 2 board, remove the SD card and connect it to a computer to view the contents. Depending on the compiled example, there will be either one or two MP4 videos. Using VLC to open the MP4 file, detailed information about the MP4 files can be obtained in “Tools” -> “Codec Information”.

ExampleMP4 file details
RecordMP4AudioOnlySingle 30 second MP4 file with audio only 1
RecordMP4VideoOnlySingle 30 second MP4 file with video only 1
RecordMP4SingleVideoWithAudioSingle 30 second MP4 file with audio and video 1
RecordMP4DoubleVideoWithAudioOne 30 second and one 15 second MP4 file
Both files with audio and video
1
1
Please confirm that QQ communication software is installed