Starting and Stopping Recording

Once enabled correctly, PVRCarbon will be loaded and start recording for all launched applications. PVRCarbon Recorder on Android may lose data if it does not stop recording correctly. The following explains the right ways to end recording.

To stop recording, you will need to be familiar with setting Android properties using the setprop command, and/or editing the pvrcarbon.json configuration file. There is more information on how to do this, along with how to use the properties mentioned, in the Configuration Options section.

To stop recording, use one of these methods:

  • Set a fixed number of frames to record using the Android property pvrcbn.frames via setprop.

  • Set to exit after a specific frame, using the PVRCarbon property pvrcbn.exitAfterFrame via either the setprop or the pvrcarbon.json configuration file. Unlike with pvrcbn.frames, this will close the application. If PVRCarbon is recording at the time, it will finish and then finalise the file.

  • Send a SIGINT from the terminal to the process ID (PID) of the application being recorded e.g. kill -2 <PID>.

Note

These methods can also be applied to rooted and unrooted setups with both OpenGL ES and Vulkan libraries. Before rebooting the device use setprop pvrcbn.enable 0, otherwise the rooted device cannot be booted up.

This is an example of a configuration that enables and stops recording in the pvrcarbon.json file:

{
    "recording":
    {
        "enable": true,
        "exitAfterFrame": 500
    }
}

Note

For unrooted devices, setprop may not work, so the pvrcarbon.json configuration file will need to be used instead. Android does not report if the property has not been set, so use getprop to verify whether it was set.

Interactive Recording

On Android, if the method of configuring PVRCarbon via setprop is supported by the device the starting and stopping of recording can also be controlled while the application is running using property pvrcbn.record.

pvrcbn.record

Will trigger the start of a new recording. If a recording is already in progress it will be stopped and a new recording will begin. When you want to start recording, set pvrcbn.record to the number of frames you wish to record for, e.g. setprop pvrcbn.record 100. If the number of frames is unknown, set it to -1, e.g. setprop pvrcbn.record -1.

If you wish to stop recording, you can do this by setting pvrcbn.record to 0, e.g. setprop pvrcbn.record 0.

By default, this option isn’t available and needs to be enabled on application launch by setting pvrcbn.frames to -1 to indicate your intention for interactive recording.

Once consumed, PVRCarbon clears the pvrcbn.record property. If there are multiple processes being recorded one or more may consume pvrcbn.record.

pvrcbn.exit

When set to 1 this will stop a recording in progress and exit the application, e.g. setprop pvrcbn.exit 1. Once consumed, PVRCarbon clears the pvrcbn.exit property. If there are multiple processes being recorded one or more may consume pvrcbn.exit.