Video call recording optimization method, system and device and storage medium
By eliminating video decoding and encoding during video call recording and directly saving the original audio and video streams, the problem of high CPU resource consumption during video call recording is solved, achieving more efficient system resource utilization and stronger concurrency capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-04-14
AI Technical Summary
In existing video call recording solutions, the video encoding and decoding process consumes a large amount of system CPU resources, resulting in limited system stability and concurrency capabilities.
During the recording process, video decoding and encoding are canceled, and the media stream from the terminal is sent directly to the other party without modification. The original audio and video streams are saved to a file in dual-track format, thus avoiding video decoding and encoding operations.
It greatly reduces CPU performance consumption, reduces system resource usage, improves system concurrency, and achieves the goal of cost reduction and efficiency improvement.
Smart Images

Figure CN121864935A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio and video communication, and specifically to an optimized method, system, device, and storage medium for video call recording. Background Technology
[0002] In audio and video communication services, point-to-point two-way video calling based on the SIP protocol is the most common service function. Whether it is the caller or the called party, they can not only hear the other party's voice but also see the other party's video, providing customers with better service. However, in this real-time video call service, after the call is disconnected, customers usually cannot trace and reconstruct the scene. Therefore, it is usually necessary to record the ongoing audio and video call so that administrators can later query the call records and reconstruct the actual scene at that time.
[0003] During a video call, the server receives the caller's video and forwards it to the called party. Simultaneously, the server forwards the received called party's video back to the caller. After the call ends, in order to view the audio and video of both the calling and called parties, the audio and video data needs to be recorded and stored as audio and video files for later retrieval and playback.
[0004] There are many recording options, but there are generally two common ones.
[0005] Option 1: Deploy a separate recording server. During a video call, the call service sends the audio and video media of the caller and the called party to the recording server, which then performs the recording. The logical flow is as follows: Figure 1 .
[0006] Option 2: Develop a recording module for the video service. The video service will perform recording simultaneously with audio / video forwarding. The logical flow is as follows: Figure 2 .
[0007] In a two-way video call between the calling and called parties, the core of recording to a single file is screen fusion, meaning that when playing the recording, both the calling and called parties can be seen. Therefore, after receiving the calling party's video, the recording service first decodes both the calling and called party's video. Then, it merges the two decoded video streams and encodes them into a single video stream. The decoded calling party video is then re-encoded and sent to the called party, and similarly, the called party's decoded video is re-encoded and sent to the calling party. In summary, this process involves two-way decoding and three-way encoding.
[0008] Video encoding and decoding are inherently resource-intensive functions. The three encoding steps and two decoding steps in the recording logic described above will significantly consume system CPU resources, resulting in very high CPU usage across the entire system. Typically, a single audio / video call can consume up to 60% of the CPU.
[0009] If there are concurrent video services, multiple recordings will be performed, which will consume a lot of CPU and pose a huge challenge to the stability of the entire system.
[0010] Both recording solutions have their own advantages and disadvantages. Solution 1 requires a separate development and deployment of the recording service, and the recording service and the call service need to interact via signaling, which involves a large workload and requires separate resources. Solution 2, the video call service, is a business service and should serve as many customers as possible. If the recording service consumes a large amount of CPU resources, the call service itself will not be able to support more call traffic. Summary of the Invention
[0011] This invention addresses the shortcomings of existing technologies by providing an optimized method, system, device, and storage medium for video call recording. It stores files without requiring video decoding and encoding, solving the CPU performance overhead problem caused by video encoding and decoding, greatly reducing system performance consumption, minimizing unnecessary hardware resources, and providing better support for concurrent video services. It solves practical problems with relatively small resources, achieving cost reduction and efficiency improvement.
[0012] To achieve the above objectives, the present invention adopts the following technical solution: An optimization method for video call recording includes the following steps: Establish a two-way call between the calling terminal and the called terminal; The server starts the video call recording service; The calling terminal and the called terminal send their respective audio and video streams to the other terminal. The server records the audio and video files of both the calling terminal and the called terminal.
[0013] To optimize the above technical solution, the specific measures also include: Furthermore, the establishment of a two-way call between the calling terminal and the called terminal specifically involves: The calling terminal calls the called terminal through the server. After the called terminal answers, the server creates a calling session and a called session respectively, and the two-way call is officially established.
[0014] Furthermore, the server initiates the video call recording service as follows: The video service on the server opens an audio / video recording file named "Caller ID_Called ID_Year / Month / Day_Hour / Minute / Second.mp4" based on the parameters of the created caller session and starts the recording service.
[0015] Furthermore, the process of the calling terminal and the called terminal sending their respective audio and video streams to the other terminal is as follows: The calling terminal sends audio and video media to the server. The server's calling session receives the calling audio and video data and forwards it directly to the called terminal through the called session. The called terminal sends audio and video media to the server. The server's called session receives the called audio and video data and forwards it directly to the calling terminal through the calling session.
[0016] Furthermore, the server records the audio and video files of the calling terminal and the called terminal specifically as follows: Write the original caller's audio data to the first audio track of the already opened recording file, and write the original caller's video data to the first video track of the already opened recording file. Write the original called audio data to the second audio track of the already opened recording file, and write the original called video data to the second video track of the already opened recording file. If either the caller or the recipient hangs up, the call recording service ends and the recording file is closed.
[0017] The present invention also proposes a video call recording system, comprising: The call creation module is used to establish a two-way call between the calling terminal and the called terminal; The recording service startup module is used to start the video call recording service; The media forwarding module is used to send the audio and video streams of the calling terminal to the called terminal, and to send the audio and video streams of the called terminal to the calling terminal. The recording module is used to record the audio and video files of both the calling terminal and the called terminal.
[0018] The present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the optimized method for video call recording as described above.
[0019] The present invention also proposes a computer-readable storage medium storing a computer program that causes a computer to perform the optimized method for video call recording as described above.
[0020] The beneficial effects of this invention are: This invention eliminates video decoding and encoding. After receiving the media stream from the terminal, the server, with recording enabled, no longer decodes and then encodes the video; instead, it sends the received media stream to the other party unchanged. Terminals supporting this encoding type can directly play the media stream, resulting in smoother call service logic.
[0021] By eliminating the need for two decoding and two encoding steps, and without sending the bitstream to a separate recording service, there are no additional service deployments or signaling interaction issues. This makes the call service logic clearer. Most importantly, the absence of video encoding and decoding significantly reduces CPU consumption, resolving the issue of excessive CPU load and greatly improving system concurrency. In this way, the call service achieves both video calling and recording, saving additional system and service resources, thus achieving cost reduction and efficiency improvement.
[0022] The recording service of this invention eliminates encoding and directly saves the data to a file. After the recording module obtains the original bitstream, it no longer merges and encodes the data, but directly saves the two original video streams into one file according to the dual-track video file format. This saves another video encoding step, freeing up CPU time and reducing CPU load. This approach does not require significant changes to the logical structure or the use of third-party resources, achieving the main business requirements at minimal cost and reducing server resource overhead and service maintenance costs.
[0023] Conventional two-way video recording services require video decoding and encoding for both the calling and called parties. A single call involves two decodings and three encodings to complete the recording, which consumes a significant amount of system CPU resources and leads to excessive system load.
[0024] After optimization, the video server no longer decodes or encodes the video stream; it directly forwards the bitstream to the other party. In the recording business, it is also necessary to encode and merge the video streams before storing them in a file. Instead, the original two video streams are directly saved to the media file in a dual-track file format, which greatly reduces the CPU load and saves more system resources. Combined with the audio and video services provided by the server, the system resources saved can support the call volume many times over, achieving the goal of supporting higher call volume with fewer server resources.
[0025] The call service enables both video calls and recording, saving additional system and service resources and achieving the goal of cost reduction and efficiency improvement. Attached Figure Description
[0026] Figure 1 This is the logic flowchart of traditional video call recording solution one.
[0027] Figure 2 This is the logic flowchart of the traditional video call recording scheme two.
[0028] Figure 3 This is a sequence diagram of the server's video call service.
[0029] Figure 4 This is a logic flowchart of the optimized video call recording method proposed in this invention. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0031] Example 1 This invention proposes an optimized method for video call recording, such as... Figure 4 As shown, it includes the following steps: Establish a two-way call between the calling terminal and the called terminal; specifically: the calling terminal (the party initiating the video call) calls the called terminal (the party connecting the video call) through the server. After the called terminal answers, the server creates a calling session and a called session respectively, and the two-way call is officially established.
[0032] The timing sequence of a two-way call between the calling terminal and the called terminal is as follows: Figure 3 As shown.
[0033] The server starts the video call recording service; specifically: The video service on the server opens an audio / video recording file named "Caller ID_Called ID_Year / Month / Day_Hour / Minute / Second.mp4" based on the parameters of the created caller session and starts the recording service.
[0034] The calling terminal and the called terminal send their respective audio and video streams to the other terminal; specifically: The calling terminal sends audio and video media to the server. The server's calling session receives the calling audio and video data and forwards it directly to the called terminal through the called session. The called terminal sends audio and video media to the server. The server's called session receives the called audio and video data and forwards it directly to the calling terminal through the calling session.
[0035] After receiving the media stream from the terminal, if the recording service is enabled, the server will not decode and then encode the video; instead, it will send the received media stream to the other party unchanged. Terminals that support this encoding type can directly play the media stream, making the call process smoother.
[0036] The server records the audio and video files of both the calling and called terminals. Specifically: Write the original caller's audio data to the first audio track of the already opened recording file, and write the original caller's video data to the first video track of the already opened recording file. Write the original called audio data to the second audio track of the already opened recording file, and write the original called video data to the second video track of the already opened recording file. If either the caller or the recipient hangs up, the call recording service ends and the recording file is closed.
[0037] After the recording module obtains the original bitstream, it no longer merges and encodes the two original video streams. Instead, it directly saves the two original video streams into one file according to the dual-track video file format, saving another video encoding step and freeing up CPU time and reducing CPU load. This approach achieves the main business requirements at minimal cost without altering the logical structure or relying on other third-party resources, thereby reducing server resource overhead and service maintenance costs.
[0038] Example 2 This invention proposes a video call recording system corresponding to the method in Embodiment 1, comprising: The call creation module is used to establish a two-way call between the calling terminal and the called terminal; The recording service startup module is used to start the video call recording service; The media forwarding module is used to send the audio and video streams of the calling terminal to the called terminal, and to send the audio and video streams of the called terminal to the calling terminal. The recording module is used to record the audio and video files of both the calling terminal and the called terminal.
[0039] The implementation methods of each module and its function in the system are completely consistent with the steps of the method in Implementation Example 1, so they will not be repeated here.
[0040] Example 3 The present invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the optimized method for video call recording as described in Embodiment 1.
[0041] Example 4 The present invention proposes a computer-readable storage medium storing a computer program that causes a computer to execute an optimized method for video call recording as described in Embodiment 1.
[0042] In the embodiments disclosed in this application, a computer storage medium may be a tangible medium that may contain or store programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of computer storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0043] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0044] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. An optimized method for video call recording, characterized in that, Includes the following steps: Establish a two-way call between the calling terminal and the called terminal; The server starts the video call recording service; The calling terminal and the called terminal send their respective audio and video streams to the other terminal. The server records the audio and video files of both the calling terminal and the called terminal.
2. The optimized method for video call recording as described in claim 1, characterized in that, The establishment of a two-way call between the calling terminal and the called terminal specifically involves: The calling terminal calls the called terminal through the server. After the called terminal answers, the server creates a calling session and a called session respectively, and the two-way call is officially established.
3. The optimized method for video call recording as described in claim 1, characterized in that, The specific steps for the server to initiate the video call recording service are as follows: The video service on the server opens an audio / video recording file named "Caller ID_Called ID_Year / Month / Day_Hour / Minute / Second.mp4" based on the parameters of the created caller session and starts the recording service.
4. The optimized method for video call recording as described in claim 1, characterized in that, Specifically, the calling terminal and the called terminal send their respective audio and video streams to the other terminal as follows: The calling terminal sends audio and video media to the server. The server's calling session receives the calling audio and video data and forwards it directly to the called terminal through the called session. The called terminal sends audio and video media to the server. The server's called session receives the called audio and video data and forwards it directly to the calling terminal through the calling session.
5. The optimized method for video call recording as described in claim 1, characterized in that, The server records the audio and video files of the calling terminal and the called terminal specifically as follows: Write the original caller's audio data to the first audio track of the already opened recording file, and write the original caller's video data to the first video track of the already opened recording file. Write the original called audio data to the second audio track of the already opened recording file, and write the original called video data to the second video track of the already opened recording file. If either the caller or the recipient hangs up, the call recording service ends and the recording file is closed.
6. A video call recording system, characterized in that, include: The call creation module is used to establish a two-way call between the calling terminal and the called terminal; The recording service startup module is used to start the video call recording service; The media forwarding module is used to send the audio and video streams of the calling terminal to the called terminal, and to send the audio and video streams of the called terminal to the calling terminal. The recording module is used to record the audio and video files of both the calling terminal and the called terminal.
7. An electronic device, characterized in that, include: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the optimized method for video call recording as described in any one of claims 1-5.
8. A computer-readable storage medium storing a computer program, characterized in that, The computer program causes the computer to execute the optimized method for video call recording as described in any one of claims 1-5.