CN-116600065-B - Video processing method and device and computer storage medium
Abstract
The application provides a video processing method, a video processing device and a computer storage medium, wherein the method comprises the steps of responding to a multi-path video synthesis request by the video processing device, obtaining first video code streams of a plurality of camera equipment according to the multi-path video synthesis request, decoding original video code streams by the first video code streams through video code stream types of the camera equipment, synthesizing the first video code streams of the camera equipment according to the self-defined video parameters, and storing synthesized video fragments according to a preset video format. By the method, the video code streams on the multi-path image pickup device can be customized and synthesized, and the multi-path code streams on the image pickup device can be obtained in parallel.
Inventors
- MA YANBAO
- CHENG YONGXUE
- ZHANG JINGLEI
- DING LINCHAO
Assignees
- 杭州华橙软件技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230411
Claims (8)
- 1. A video processing method, the video processing method comprising: responding to a multi-path video synthesis request, and acquiring user-defined video parameters; According to the multi-path video synthesis request, acquiring first video code streams of a plurality of camera equipment, wherein the first video code streams are obtained by decoding original video code streams through video code stream types of the camera equipment; Caching the first video code streams of the plurality of camera devices into a cache queue, and caching the video code streams of the plurality of camera devices into the cache queue as second video code streams; Acquiring the second video code stream; acquiring the frame rate of each second video code stream; acquiring adjacent video frame time intervals of a second video code stream according to the frame rate; modifying the time stamp according to the time interval of adjacent video frames and the accumulated number of current video frames in the second video code stream; modifying a time stamp of each of the second video streams according to the frame rate; Synthesizing the second video code stream with the modified time stamp according to the custom video parameters, and storing the synthesized video clip according to a preset video format; The custom video parameters comprise video start time and/or video end time; and synthesizing the second video code streams of the plurality of image capturing devices according to the custom video parameters, wherein the synthesizing comprises the following steps: acquiring all video code streams of the plurality of camera devices in the time period according to the video start time and/or the video end time; And synthesizing all video code streams of the plurality of camera devices.
- 2. The video processing method of claim 1, wherein, The method for acquiring all video code streams of the plurality of image capturing devices in the time period according to the video start time and/or the video end time comprises the following steps: And calculating the code stream time on the image pickup device corresponding to each video code stream when the video code stream is finished, and acquiring the number of video fragments meeting the preset synthesis duration.
- 3. The video processing method of claim 1, wherein, After the synthesized video clips are stored according to the preset video format, the video processing method further comprises the following steps: converting the synthesized video clips into a user-defined video format; And uploading the video clips to a cloud storage server and returning to a video storage path.
- 4. The video processing method of claim 3, wherein, After the video storage path is returned, the video processing method further comprises: Responding to a video downloading request, and downloading video from the cloud storage server based on a video storage path in the video downloading request; or in response to a video playing request, playing video based on a video storage path in the video playing request.
- 5. The video processing method of claim 1, wherein, The obtaining the first video code stream of the plurality of image capturing devices includes: acquiring code stream pulling addresses of a plurality of camera devices; creating a multi-path stream pulling protocol client based on the code stream pulling address; And acquiring the first video code stream from the image pickup equipment by using the streaming protocol client.
- 6. The video processing method of claim 1, wherein, The video processing method further includes: acquiring the latest consumed video frame in the cache queue; Comparing the time stamp of the latest consumed video frame with the corresponding time stamp when the current synthesized video clip is finished; And ending the processing of the second video code stream when the timestamp of the latest consumed video frame is larger than the corresponding timestamp when the current synthesized video clip is ended.
- 7. A video processing device comprising a processor and a memory coupled to the processor, the memory storing program instructions, the processor executing the program instructions to implement the video processing method of any of claims 1-6.
- 8. A computer readable storage medium storing program instructions which, when executed by a processor, implement the video processing method of any of claims 1-6.
Description
Video processing method and device and computer storage medium Technical Field The present application relates to the field of video synthesis technology, and in particular, to a video processing method, apparatus, and computer storage medium. Background In a scene in which a preset place is monitored and photographed by a plurality of image pickup devices, it is often necessary to synthesize videos photographed by the plurality of image pickup devices. At present, the videos shot by a plurality of shooting devices are generally assembled and synthesized manually, so that human resources are consumed. The video clips are synthesized on the camera equipment, the performance pressure of the equipment is high, and the synthesis of multiple video formats and the simultaneous synthesis of multiple paths of videos are not supported. Disclosure of Invention In order to solve the technical problems, the application provides a video processing method, a video processing device and a computer storage medium. In order to solve the above technical problems, the present application provides a video processing method, including: responding to a multi-path video synthesis request, and acquiring user-defined video parameters; According to the multi-path video synthesis request, acquiring first video code streams of a plurality of camera equipment, wherein the first video code streams are obtained by decoding original video code streams through video code stream types of the camera equipment; And synthesizing the first video code streams of the plurality of image pickup devices according to the custom video parameters, and storing synthesized video fragments according to a preset video format. Wherein the custom video parameters include video start time and/or video end time; The synthesizing the first video code streams of the plurality of image capturing devices according to the custom video parameters includes: acquiring all video code streams of the plurality of camera devices in the time period according to the video start time and/or the video end time; And synthesizing all video code streams of the plurality of camera devices. The method for acquiring all video code streams of the plurality of image capturing devices in the time period according to the video start time and/or the video end time comprises the following steps: And calculating the code stream time on the image pickup device corresponding to each video code stream when the video code stream is finished, and acquiring the number of video fragments meeting the preset synthesis duration. After the synthesized video clips are stored according to a preset video format, the video processing method further comprises the following steps: converting the synthesized video clips into a user-defined video format; And uploading the video clips to a cloud storage server and returning to a video storage path. Wherein after the video storage path is returned, the video processing method further comprises: Responding to a video downloading request, and downloading video from the cloud storage server based on a video storage path in the video downloading request; or in response to a video playing request, playing video based on a video storage path in the video playing request. The obtaining the first video code streams of the plurality of image capturing devices includes: acquiring code stream pulling addresses of a plurality of camera devices; creating a multi-path stream pulling protocol client based on the code stream pulling address; And acquiring the first video code stream from the image pickup equipment by using the streaming protocol client. Before the first video code streams of the plurality of image capturing devices are synthesized according to the custom video parameters, the video processing method further includes: Acquiring a second video code stream, wherein the second video code stream is a video code stream which is called back in a cache queue by the plurality of camera equipment; acquiring the frame rate of each second video code stream; acquiring adjacent video frame time intervals of a second video code stream according to the frame rate; modifying the time stamp according to the time interval of adjacent video frames and the accumulated number of current video frames in the second video code stream; and modifying the time stamp of each second video code stream according to the frame rate. The video processing method further comprises the following steps: obtaining the latest consumed video frame in a cache queue; Comparing the time stamp of the latest consumed video frame with the corresponding time stamp when the current synthesized video clip is finished; And ending the processing of the second video code stream when the timestamp of the latest consumed video frame is larger than the corresponding timestamp when the current synthesized video clip is ended. In order to solve the above technical problems, the present application provides a video p