A video processing method, device and computer storage medium

By customizing video parameters to decode and synthesize video streams from camera devices, the automation problem of multi-channel video synthesis was solved, enabling the synthesis and storage of video in various formats, reducing manual intervention and equipment load.

CN116600065BActive Publication Date: 2026-05-08HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU HUACHENG SOFTWARE TECH CO LTD
Filing Date
2023-04-11
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, the synthesis of videos captured by multiple camera devices requires manual editing, which consumes manpower and puts a heavy burden on equipment performance. It also does not support the synthesis of multiple video formats or the simultaneous synthesis of multiple video streams.

Method used

The system uses video processing methods to obtain custom video parameters, decodes the video stream from the camera device, synthesizes video clips according to the parameters, and stores them in a preset format. It supports multi-channel video synthesis and uploading to a cloud storage server.

Benefits of technology

It achieves automated multi-channel video synthesis, reduces manual intervention, lowers equipment load, and supports the synthesis and storage of various video formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116600065B_ABST
    Figure CN116600065B_ABST
Patent Text Reader

Abstract

The application provides a video processing method, a video processing device and a computer storage medium. The method comprises the following steps: in response to a multi-channel video synthesis request, a video processing device acquires a custom video parameter; according to the multi-channel video synthesis request, a first video stream of a plurality of camera devices is acquired, the first video stream being obtained by decoding an original video stream through a video stream type of the camera device; and according to the custom video parameter, the first video stream of the plurality of camera devices is synthesized, and a synthesized video segment is stored in a preset video format. In this way, the video stream on the multi-channel camera device can be customized and the multi-channel stream on the camera device can be acquired in parallel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video synthesis technology, and in particular to a video processing method, apparatus, and computer storage medium. Background Technology

[0002] In scenarios where multiple cameras are used to monitor a predetermined location, it is often necessary to composite the videos captured by these cameras. Currently, this is typically done manually, which is labor-intensive. Composite video clips on camera equipment also puts a heavy strain on the equipment's performance and does not support the compositing of multiple video formats or simultaneous compositing of multiple video streams. Summary of the Invention

[0003] To address the aforementioned technical problems, this application proposes a video processing method, a video processing apparatus, and a computer storage medium.

[0004] To address the aforementioned technical problems, this application proposes a video processing method, comprising:

[0005] In response to a multi-channel video compositing request, retrieve custom video parameters;

[0006] According to the multi-channel video synthesis request, the first video streams of several camera devices are obtained, and the first video streams are obtained by decoding the original video streams through the video stream types of the camera devices;

[0007] According to the custom video parameters, the first video streams of the plurality of camera devices are synthesized, and the synthesized video segments are stored in a preset video format.

[0008] The custom video parameters include the video start time and / or the video end time;

[0009] The step of synthesizing the first video streams of the plurality of camera devices according to the custom video parameters includes:

[0010] Based on the video start time and / or the video end time, obtain all video streams from the plurality of camera devices within the time period;

[0011] All video streams from the aforementioned camera devices are combined.

[0012] Prior to obtaining all video streams from the plurality of camera devices within the time period based on the video start time and / or the video end time, the process includes:

[0013] Calculate the bitstream time on the camera device corresponding to the end of each video bitstream, and obtain the number of video segments that meet the preset synthesis duration.

[0014] The video processing method further includes, after storing the synthesized video segments according to a preset video format:

[0015] The synthesized video clips are converted into a user-defined video format;

[0016] The video clip is uploaded to the cloud storage server, and the video storage path is returned.

[0017] After returning the video storage path, the video processing method further includes:

[0018] In response to a video download request, the video is downloaded from the cloud storage server based on the video storage path in the video download request;

[0019] Alternatively, in response to a video playback request, the video can be played based on the video storage path in the video playback request.

[0020] The acquisition of the first video stream from several camera devices includes:

[0021] Obtain the streaming addresses of several camera devices;

[0022] Create a multi-channel streaming protocol client based on the stream streaming address;

[0023] The first video stream is obtained from the camera device using the streaming protocol client.

[0024] Before combining the first video streams of the plurality of camera devices according to the custom video parameters, the video processing method further includes:

[0025] Obtain a second video stream, wherein the second video stream is the video stream that the plurality of camera devices have retrieved in the cache queue;

[0026] Obtain the frame rate of each of the second video streams;

[0027] The time interval between adjacent video frames of the second video stream is obtained according to the frame rate.

[0028] Modify the timestamp according to the time interval between adjacent video frames in the second video stream and the cumulative number of current video frames;

[0029] Modify the timestamp of each of the second video streams according to the frame rate.

[0030] The video processing method further includes:

[0031] Retrieve the latest consumed video frame from the cache queue;

[0032] Compare the timestamp of the latest consumed video frame with the timestamp corresponding to the end of the current synthesized video segment;

[0033] When the timestamp of the latest consumed video frame is greater than the timestamp corresponding to the end of the current synthesized video segment, the processing of the second video stream ends.

[0034] To address the aforementioned technical problems, this application proposes a video processing apparatus, including a processor and a memory connected to the processor. The memory stores program instructions, and the processor executes the program instructions to implement the aforementioned video processing method.

[0035] To address the aforementioned technical problems, this application proposes a computer-readable storage medium storing program instructions that, when executed by a processor, implement the video processing method described above.

[0036] Compared with existing technologies, the beneficial effects of this application are as follows: The video processing device responds to a multi-channel video compositing request by acquiring custom video parameters; according to the multi-channel video compositing request, it acquires first video streams from several camera devices, wherein the first video streams are decoded from the original video streams using the video stream types of the camera devices; according to the custom video parameters, the first video streams from the several camera devices are composited, and the composited video segments are stored according to a preset video format. Through the above method, it is possible to customize and compose video streams from multiple camera devices and acquire multiple streams from camera devices in parallel. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] in:

[0039] Figure 1 This is a schematic diagram of the system structure in the video processing method provided in this application;

[0040] Figure 2 This is a flowchart illustrating an embodiment of the video processing method provided in this application;

[0041] Figure 3 This is a flowchart illustrating the sub-steps of step S12 in the video processing method provided in this application;

[0042] Figure 4 This is a flowchart illustrating the video stream processing method proposed in this application;

[0043] Figure 5 This is a flowchart illustrating a sub-step of step S13 in the video processing method provided in this application;

[0044] Figure 6 This is a flowchart illustrating another embodiment of the video processing method provided in this application;

[0045] Figure 7 This is a schematic diagram of the composite video storage and processing flow provided in this application;

[0046] Figure 8 This is a flowchart illustrating yet another embodiment of the video processing method provided in this application;

[0047] Figure 9 This is a schematic diagram of the video frame processing flow of the video processing method provided in this application;

[0048] Figure 10 This is a schematic diagram of the structure of an embodiment of the video processing apparatus provided in this application;

[0049] Figure 11 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation

[0050] 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 a part of the embodiments of this application, and not all of the 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.

[0051] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0052] Please refer to the details. Figure 1 and Figure 2 , Figure 1 This is a schematic diagram of the system structure in the video processing method provided in this application; Figure 2 This is a flowchart illustrating an embodiment of the video processing method provided in this application.

[0053] The video processing method of this application is applied to a video processing apparatus, wherein the video processing apparatus can be a server, a local terminal, or a system in which the server and the local terminal cooperate with each other. Accordingly, the various parts of the video processing apparatus, such as various units, sub-units, modules, and sub-modules, can all be set in the server, all in the local terminal, or separately in the server and the local terminal.

[0054] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.

[0055] like Figure 1 As shown, the video processing device includes a user editing module, a bitstream acquisition module, a bitstream decoding module, a frame processing module, a frame synthesis module, a video frame conversion module, a video storage module, a video download module, and a video playback module.

[0056] The user editing module is used to receive user-defined multi-channel video synthesis parameter requests and persist these parameters to the database. In case of malfunction of the video synthesis device and storage system, the user-defined multi-channel video synthesis parameters can be quickly restored to continue synthesizing video segments.

[0057] The bitstream acquisition module acquires video streams from multiple camera devices based on custom multi-channel video compositing parameters. The bitstream decoding module decodes the acquired encrypted video streams according to their type, obtaining plaintext bitstreams. The frame processing module caches the acquired multi-channel video streams in a frame producer queue. The frame compositing module consumes video frames from the producer queue, composites the multi-channel video frames according to custom video compositing parameters, and saves the composited video clips in DAV format to the video compositing device and storage system. The video frame conversion module converts DAV video clips into user-defined video formats (mp4, avi, wmv, mpeg, rmvb, mov, etc.).

[0058] The video storage module stores the converted video clips in the video compositing device and storage system or uploads them to a cloud storage server, and returns the video storage path URL. The video download module requests the video from the video compositing device and storage system based on the video storage path URL, and downloads the video from that device or cloud storage server. The video playback module allows users to input the video storage path URL into the player to play the synthesized video clips.

[0059] Please see Figure 2 The specific steps are as follows:

[0060] Step S11: In response to the multi-channel video compositing request, obtain the custom video parameters.

[0061] Specifically, the video processing device responds to a multi-channel video compositing request by obtaining the user's custom parameters for video compositing.

[0062] Custom video parameters include, but are not limited to, any one of the following: device serial number (SN) and channel number (CID) of multiple camera devices, start time of video synthesis (begintime), end time of video synthesis (endtime), total duration of video synthesis segments, assembly order of video segments from the camera devices to be synthesized, video synthesis format (video formate: mp4, avi, wmv, mpeg, rmvb, mov, etc.), video storage time (savetime), and video storage medium (storage medium).

[0063] Step S12: According to the multi-channel video synthesis request, obtain the first video stream of several camera devices. The first video stream is obtained by decoding the original video stream through the video stream type of the camera device.

[0064] Specifically, the video processing device decrypts the bitstream according to the multi-channel video compositing request, and caches the received bitstream frames in the producer queue. The video compositing device and the storage system simultaneously receive multiple bitstreams. The video processing device decrypts the bitstream according to the bitstream encryption type to obtain the plaintext bitstream, and further judges the validity of the bitstream frames. When the plaintext bitstream is valid, the decrypted plaintext bitstreams are cached in the producer queue.

[0065] To obtain the first video stream, this application proposes steps S121 to S123 as sub-steps of step S12. See details below. Figure 3 and Figure 4 , Figure 3 This is a flowchart illustrating the sub-step of step S12 in the video processing method provided in this application. Figure 4 This is a flowchart illustrating the video stream processing method proposed in this application.

[0066] like Figure 3 As shown, the specific steps are as follows:

[0067] Step S121: Obtain the bitstream pull addresses of several camera devices.

[0068] Specifically, the video processing device obtains the bitstream pull address of each camera device within a user-defined time period through any communication method.

[0069] Step S122: Create a multi-channel streaming protocol client based on the stream pull address.

[0070] Specifically, the video processing device simultaneously creates multiple streaming protocol clients based on the streaming address to obtain the target bitstream from each camera device.

[0071] Step S123: Use the streaming protocol client to obtain the first video stream from the camera device.

[0072] Specifically, the recording and streaming addresses of each camera device within the video synthesis time period are obtained, and a multi-channel streaming protocol client is created based on the streaming addresses to receive the bitstreams from each camera device.

[0073] Using the above method, the video processing device can customize and synthesize video streams from multiple camera devices.

[0074] Step S13: According to the custom video parameters, synthesize the first video streams of several camera devices, and store the synthesized video segments according to the preset video format.

[0075] The preset format can be any common video format such as dav.

[0076] Using the above method, it is possible to customize and synthesize video streams from multiple camera devices, and acquire multiple streams from the camera devices in parallel.

[0077] In one embodiment of this application, the custom video parameters include the video start time and / or the video end time. See details below. Figure 5 , Figure 5 This is a flowchart illustrating the sub-step of step S13 in the video processing method provided in this application.

[0078] like Figure 5 As shown, the specific steps are as follows:

[0079] Step S131: Based on the video start time and / or the video end time, obtain all video streams from several camera devices within that time period.

[0080] Please continue reading Figure 4The video processing device acquires all videos from the start time to the end time of each camera device, queries all video streams from the start time to the end time of each camera device, and calculates the duration and type of the acquired video streams from each camera device. Based on the user's video synthesis parameters, it compares the duration and type of the video streams with the parameters to calculate the video stream time point on the camera device at the end of each video synthesis segment and the number of video segments that can be synthesized.

[0081] Step S132: Combine all video streams from several camera devices.

[0082] Before synthesizing the first video streams of the plurality of camera devices according to the start time and / or end time of the video synthesis, the video processing device calculates the bitstream time on the camera device corresponding to the end of each video segment to be synthesized, and obtains the number of video segments that meet the preset synthesis duration.

[0083] After storing the synthesized video clips according to a preset video format, an embodiment is provided for downloading the synthesized video. For details, please refer to [link to embodiment]. Figure 6 and Figure 7 , Figure 6 This is a flowchart illustrating another embodiment of the video processing method provided in this application. Figure 7 This is a schematic diagram of the composite video storage and processing flow provided in this application.

[0084] like Figure 6 As shown, the specific steps are as follows:

[0085] Step S21: Convert the synthesized video clips into a user-defined video format.

[0086] Specifically, please see Figure 7 Based on the customized video storage medium, the synthesized video clips are stored on the video synthesis device and storage system or uploaded to a cloud storage server.

[0087] Among them, user-defined video formats include, but are not limited to, any of the following video formats: mp4, avi, wmv, mpeg, etc.

[0088] Step S22: Upload the video clip to the cloud storage server and return the video storage path.

[0089] Specifically, the video processing device stores the synthesized video clips on the video synthesis device and storage system or uploads the synthesized video clips to a cloud storage server according to the custom-configured video storage medium, and returns the URL of the video clip path.

[0090] Users can temporarily access the video synthesis device using this URL to obtain synthesized video clips.

[0091] The validity unit of temporary access credentials is seconds, and the maximum value is based on the currently set maximum session time. The current maximum value is 3600 seconds.

[0092] Step S23: In response to a video download request, download the video from the cloud storage server based on the video storage path in the video download request; or, in response to a video playback request, play the video based on the video storage path in the video playback request.

[0093] Specifically, in one embodiment of this application, the video processing device, in response to a user's video download request based on a obtained URL, downloads the synthesized video clip to the user's local device for the user to watch.

[0094] In other embodiments of this application, the video processing device and storage system support users to resume interrupted downloads and query download progress bars. Users play the synthesized video clip in a player based on the obtained path URL. When users obtain the path URL of the synthesized video clip, the video processing device puts the URL into a player such as VLC for real-time playback. Furthermore, closing the VLC player can terminate the playback of the synthesized video clip.

[0095] When the synthesized video clip reaches its storage time limit, the video processing device will delete the synthesized video clip stored on the video processing device or on the cloud storage server. When the synthesized video clip reaches the user-defined storage time limit, the video storage device will delete the video clip file stored on the video merging device or on the cloud storage server, clear the user-set video merging parameters, and invalidate the video path URL.

[0096] The above methods allow you to download videos, play videos in real time, and clean up expired video clips.

[0097] This application also provides an embodiment for modifying timestamps; please refer to the details below. Figure 8 and Figure 9 , Figure 8 This is a flowchart illustrating another embodiment of the video processing method provided in this application. Figure 9 This is a schematic diagram of the video frame processing flow of the video processing method provided in this application.

[0098] like Figure 9As shown, the video processing device obtains the corresponding frame rate (rate) based on each video stream frame. If frame rate acquisition fails, the default frame rate is 40. It consumes multiple video frames from the buffer queue, modifies the frame timestamp and UTC time according to the corresponding frame rate, and calculates the cumulative duration of the synthesized video segment. The video processing device saves the synthesized video segment in DAV format in the video merging device. If the UTC time of the previous stream frame is greater than or equal to the end time of the stream corresponding to the completion of the synthesis of a single video segment, the synthesis of that video segment ends, and the synthesis of the next video segment begins. Finally, the video processing device converts the completed synthesized video segment (DAV) into MP4, AVI, WMV, MPEG, or other video formats, stores the converted video in the video merging device, and deletes the merged DAV file.

[0099] like Figure 8 As shown, the specific steps are as follows:

[0100] Step S31: Obtain the second video stream.

[0101] The second video stream is the video stream that the plurality of camera devices have retrieved in the cache queue.

[0102] Step S32: Obtain the frame rate of each second video stream.

[0103] Specifically, the video processing device initializes each video I-frame and obtains the video frame rate (rate). If the frame rate acquisition fails, the default frame rate is 40.

[0104] Step S33: Obtain the time interval between adjacent video frames of the second video stream according to the frame rate.

[0105] Specifically, a) Initialize the first I-frame in the producer queue, obtain the video stream frame rate (rate), the video frame type includes I-frame and P-frame, and the time interval between adjacent videos is: frame interval (1000 / rate).

[0106] Step S34: Modify the timestamp according to the time interval between adjacent video frames in the second video stream and the cumulative number of current video frames.

[0107] Specifically, the multiple video frames cached in the consumer producer queue are modified according to the obtained frame rate to ensure that the synthesized video clips can be played smoothly.

[0108] b) Bitstream frames (video frame type: I-frame, P-frame, audio frame type: A-frame) cached in the consumer producer queue from each camera device.

[0109] c) Cache the latest consumed frame's UTC timestamp.

[0110] d) Modify the video frame timestamp and UTC time (year, month, day, hour, minute, second).

[0111] In this embodiment of the application, considering ease of use, the maximum duration of the synthesized video segment is 24 hours; therefore, the year, month, and day values ​​in UTC are all 0. The timestamp is equal to the time interval between adjacent video frames multiplied by the cumulative number of current video frames.

[0112] Step S35: Modify the timestamp of each second video stream according to the frame rate.

[0113] Specifically, following the steps above, the timestamp and UTC time are modified according to the corresponding frame rate, and the cumulative duration of the synthesized video is calculated.

[0114] The timestamp is equal to the time interval between adjacent video frames multiplied by the cumulative number of current video frames (timestamp = (frame interval) * cumulative number of current video frames including I-frames and P-frames).

[0115] Hour equals timestamp divided by 1000, then divided by 60 and taking the remainder (hour = (timestamp) / 1000%60).

[0116] A minute equals a timestamp divided by 60000, then divided by 60 and taking the remainder (minute = (timestamp) / 1000 / 60%60).

[0117] A second is equal to the timestamp divided by 3,600,000, then divided by 60 and taking the remainder (second = (timestamp) / 1000 / 3600%60).

[0118] d) Modify the audio frame timestamp and UTC time (year, month, day, hour, minute, second).

[0119] For ease of use, the maximum duration of the video composite clip is 24 hours, so the year, month, and day values ​​in UTC are all 0.

[0120] The timestamp equals the modified video frame timestamp plus (the difference between the original audio frame timestamp and the most recent video frame timestamp before modification).

[0121] An hour is equal to the timestamp divided by 1000, and the remainder after dividing by 60 (hour = timestamp / 1000 % 60).

[0122] A minute is equal to the timestamp divided by 60000, and the remainder after dividing by 60 is taken as (minute = timestamp / 1000 / 60%60).

[0123] A second is equal to the timestamp divided by 3,600,000, and the remainder after dividing by 60 (second = timestamp / 1000 / 3600%60).

[0124] Furthermore, the video processing device saves the modified video frame and audio frame bitstreams in DAV format to the video synthesis device. According to the video segment synthesis rules, the bitstreams belonging to the same video synthesis segment are accumulated and written to the same DAV and the video device DAV path (dav_url) is recorded.

[0125] The cache queue provided in this application includes a consumer queue, and this application also includes the following steps:

[0126] Step S36: Obtain the latest consumed video frame from the cache queue.

[0127] Specifically, if the latest frame UTC timestamp of the consumed frame is greater than or equal to the bitstream timestamp corresponding to the end of the video segment, then the synthesis of that video segment ends and the synthesis of the next new video segment begins.

[0128] Step S37: Compare the timestamp of the latest consumed video frame with the timestamp corresponding to the end of the current synthesized video segment.

[0129] Specifically, following the steps above, the timestamp and UTC time are modified according to the corresponding frame rate, and the cumulative duration of the synthesized video is calculated.

[0130] Step S38: When the timestamp of the latest consumed video frame is greater than the timestamp corresponding to the end of the current synthesized video segment, the processing of the second video stream ends.

[0131] If the bitstream UTC time point on the camera device corresponding to the end of the current video segment is greater than or equal to the current video segment's end time, then the synthesis of that video segment is complete, and the synthesis of the next new video segment continues.

[0132] Furthermore, in other embodiments of this application, the synthesized video DAV segments are converted into video formats such as MP4, AVI, WMV, and MPEG. The converted videos are stored in the video synthesis device and storage system. The newly synthesized DAV file is deleted, and the DAV video segments are converted into user-defined video formats (e.g., video1.mp4). The synthesized DAV file is then deleted according to the DAV_URL.

[0133] By modifying the timestamps, the synthesized video clips can support smooth playback.

[0134] To implement the above video processing method, this application also proposes a video processing apparatus, for details please refer to [link / reference needed]. Figure 10 , Figure 10 This is a schematic diagram of an embodiment of the video processing apparatus provided in this application.

[0135] The video processing apparatus 400 of this embodiment includes a processor 41, a memory 42, an input / output device 43, and a bus 44.

[0136] The processor 41, memory 42, and input / output device 43 are respectively connected to the bus 44. The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the video processing method described in the above embodiments.

[0137] In this embodiment, processor 41 can also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 41 can be any conventional processor.

[0138] This application also provides a computer storage medium; please refer to the following: Figure 11 , Figure 11 This is a schematic diagram of a computer storage medium 500 according to an embodiment of the present application. The computer storage medium 500 stores a computer program 51, which, when executed by a processor, is used to implement the video processing method of the above embodiment.

[0139] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0140] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A video processing method, characterized in that, The video processing method includes: In response to a multi-channel video compositing request, retrieve custom video parameters; According to the multi-channel video synthesis request, the first video streams of several camera devices are obtained, and the first video streams are obtained by decoding the original video streams through the video stream types of the camera devices; The first video stream of the plurality of camera devices is cached in a cache queue, and the video stream of the plurality of camera devices cached in the cache queue is used as the second video stream; Obtain the second video stream; Obtain the frame rate of each of the second video streams; The time interval between adjacent video frames of the second video stream is obtained according to the frame rate. Modify the timestamp according to the time interval between adjacent video frames in the second video stream and the cumulative number of current video frames; Modify the timestamp of each of the second video streams according to the frame rate; According to the custom video parameters, the second video stream with modified timestamps is synthesized, and the synthesized video segments are stored in a preset video format; The custom video parameters include the video start time and / or the video end time; The step of synthesizing the second video streams of the plurality of camera devices according to the custom video parameters includes: Based on the video start time and / or the video end time, obtain all video streams from the plurality of camera devices within the time period; All video streams from the aforementioned camera devices are combined.

2. The video processing method according to claim 1, characterized in that, Before obtaining all video streams from the plurality of camera devices within the time period based on the video start time and / or the video end time, the process includes: Calculate the bitstream time on the camera device corresponding to the end of each video bitstream, and obtain the number of video segments that meet the preset synthesis duration.

3. The video processing method according to claim 1, characterized in that, After storing the synthesized video segments according to a preset video format, the video processing method further includes: The synthesized video clips are converted into a user-defined video format; The video clip is uploaded to the cloud storage server, and the video storage path is returned.

4. The video processing method according to claim 3, characterized in that, After returning the video storage path, the video processing method further includes: In response to a video download request, the video is downloaded from the cloud storage server based on the video storage path in the video download request; Alternatively, in response to a video playback request, the video can be played based on the video storage path in the video playback request.

5. The video processing method according to claim 1, characterized in that, The acquisition of the first video stream from several camera devices includes: Obtain the streaming addresses of several camera devices; Create a multi-channel streaming protocol client based on the stream streaming address; The first video stream is obtained from the camera device using the streaming protocol client.

6. The video processing method according to claim 1, characterized in that, The video processing method further includes: Obtain the latest consumed video frame from the cache queue; Compare the timestamp of the latest consumed video frame with the timestamp corresponding to the end of the current synthesized video segment; When the timestamp of the latest consumed video frame is greater than the timestamp corresponding to the end of the current synthesized video segment, the processing of the second video stream ends.

7. A video processing apparatus, characterized in that, The device includes a processor and a memory connected to the processor, the memory storing program instructions, and the processor executing the program instructions to implement the video processing method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The device stores program instructions that, when executed by a processor, implement the video processing method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Video file processing method, video file processing device and monitoring system

    CN111314653A

  • Video processing, controlling and playing method and device, and medium

    CN114339265A

  • Video processing method and apparatus

    WO2021147702A1