The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.
Whiteboard stream recording relies on the cloud recording of TRTC. Enabling recording will incur corresponding recording costs. For specific billing rules, refer to Billing of On-Cloud Recording.
Whiteboard Stream Recording
The whiteboard stream service itself does not provide a recording feature, but you can use the cloud recording feature of the TRTC service to perform whiteboard stream recording.
TRTC cloud recording offers two recording modes: Global Auto Recording and Specified User Recording.
Global Auto Recording (Recommended)
In the Global Auto Recording mode of TRTC cloud recording, every user's audio and video upstream stream in each TRTC room will be automatically recorded. The start and stop of the recording task are automatic, requiring no additional effort, making it simple and easy to use. The whiteboard stream, as an upstream stream in the room, will also be automatically recorded.
Global Auto Recording configuration method:
1. Log in to the TRTC console, and select Application Management in the left navigation bar.
2. Click Application Management under Recording Management, click Global Auto Recording, and you will see the Global Auto Recording template.
3. In the settings page of the Global Auto Recording template, choose MP4 as the recording file format, and select other settings as needed.
4. Click the Submit button at the bottom, and then click the checkbox for Global Auto Recording.
5. For newly created applications: More settings for enabling TRTC cloud recording can be found on the TRTC Implement Cloud Recording and Playback page.
Specified User Recording
If you need fine control over the recording of each stream, such as which streams need to be recorded and which do not, selecting the Specified User Recording mode is more suitable for this scenario.
The configuration method of the Specified User Recording mode is similar to the Global Auto Recording mode. Just select the Specified User Recording option when choosing the cloud recording form.
When you have selected the Specified User Recording mode, extra work is needed to complete the recording:
1. If you need to record a user's single stream video, specify userDefineRecordId via the client SDK API when the user enters the room, indicating that the user's video stream needs to be recorded.
2. If you need to record a single stream video of whiteboard pushing, set the AutoRecord parameter to true when starting the whiteboard stream pushing, indicating that the whiteboard push stream needs to be recorded.
// Whiteboard streaming provides backup streaming capability. If you need to push a backup stream, you need to provide another UserID and UserSig in the Backup parameter
// Set the automatic stop streaming timeout. Here, it is set to 300 seconds, which means that if no one operates the whiteboard for more than 300 seconds, the whiteboard streaming will automatically stop
request.AutoStopTimeout = common.Int64Ptr(300)
// Set AutoRecord to true, indicating that TRTC's cloud recording needs to record the whiteboard streaming video
// Specify mixed-stream audio and video encoding parameters, and adjust as needed
request.EncodeParams = &trtc.EncodeParams{
AudioSampleRate: common.Uint64Ptr(48000),
AudioChannels: common.Uint64Ptr(1),
AudioBitrate: common.Uint64Ptr(50),
VideoWidth: common.Uint64Ptr(1280),
VideoHeight: common.Uint64Ptr(720),
VideoBitrate: common.Uint64Ptr(500),
VideoFramerate: common.Uint64Ptr(20),
VideoGop: common.Uint64Ptr(3),
}
// Specify the mixed-stream layout, here we choose the predefined layout template 2 (screen sharing template), and set the large screen to display the whiteboard streaming video.
// Here we assume the user's whiteboard streaming ID is "tic_push_user_880528_test", please replace it with the actual whiteboard streaming user ID when in use