Data processing method and device, equipment, storage medium and computer program product
By splitting the video conference screen into portrait and document screens and compressing and storing the document screen recordings, the problem of large online conference recording files is solved, saving storage space and ensuring content integrity.
Patent Information
- Application Number
- CN202410920620.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-01
AI Technical Summary
Existing online conference recording files occupy a large storage space, mainly because the portraits and document images in the video conference screen are directly recorded and stored, resulting in huge file sizes.
Split the video conference screen into a portrait screen and a document screen and record them separately to obtain the first video of the portrait screen and the second video of the document screen, and compress and store the second video. By dividing the sub-videos, storing only the same picture or directly Store different pictures and construct a two-dimensional array to indicate the storage situation to support subsequent restoration.
It effectively reduces the storage volume of recorded files, solves the problem of online conference recording files occupying large storage space, and ensures the integrity of video conference content.
Smart Images

Figure CN118741022A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, equipment, storage medium and computer program product. Background Art
[0002] The online conference system provides a recording function to record the sound and picture of the entire conference (that is, to record the audio and video of the entire conference process). However, existing conference recordings are directly recorded and stored, resulting in relatively large recording files that take up more storage space.
[0003] As described above, the existing solutions for recording online conferences have problems such as the recording files occupying a large storage space. Summary of the invention
[0004] The purpose of the present application is to provide a data processing method, apparatus, device, storage medium and computer program product to solve the problem in the prior art that the recording files in the online conference recording solution will occupy a large storage space.
[0005] In order to solve the above technical problems, the present application provides a data processing method, including:
[0006] Recording a portrait screen and a document screen in a video conference screen respectively to obtain a first video corresponding to the portrait screen and a second video corresponding to the document screen;
[0007] The first video is stored, and the second video is compressed and stored.
[0008] Optionally, compressing and storing the second video includes:
[0009] The second video is compressed and stored according to a first rule; wherein the first rule includes:
[0010] Dividing the second video to obtain at least one sub-video;
[0011] When all pictures included in the sub-video are the same, only one picture among all the pictures is stored;
[0012] When the sub-video contains at least two different pictures, the sub-video is directly stored.
[0013] Optionally, the first rule also includes:
[0014] In the case that the same picture exists in the at least two stored adjacent pictures, any one of the at least two adjacent pictures is retained.
[0015] Optionally, also include:
[0016] Construct a two-dimensional array, where the two-dimensional array is used to indicate a storage condition for the sub-recording, where the storage condition includes one or more of the following:
[0017] Only one picture is stored for each sub-video;
[0018] directly storing the sub-video;
[0019] Only one picture is stored for at least two of the sub-videos.
[0020] Optionally, also include:
[0021] In the rendering stage, the second video is restored according to the two-dimensional array and the stored picture and / or the sub-video;
[0022] A video recording corresponding to the video conference screen is obtained according to the restored second video recording and the stored first video recording.
[0023] Optionally, dividing the second video to obtain at least one sub-video includes:
[0024] The second video is divided according to the frame rate and the interval value of the key frames to obtain at least one sub-video.
[0025] Optionally, restoring the second video according to the two-dimensional array and the stored pictures and / or sub-videos includes any one of the following:
[0026] The storage situation indicated by the two-dimensional array includes: when only one picture is stored for one sub-video, and / or when only one picture is stored for at least two sub-videos, the stored picture is expanded into the corresponding sub-video according to the frame rate and the interval value of the key frame; and the second video is obtained according to the expanded sub-video;
[0027] The storage situation indicated by the two-dimensional array includes: in the case of directly storing the sub-video, obtaining the second video according to the directly stored sub-video;
[0028] The storage conditions indicated by the two-dimensional array include: storing only one picture for one sub-video, and / or storing only one picture for at least two sub-videos, and, when the sub-videos are directly stored, expanding the stored pictures into corresponding sub-videos according to the frame rate and the interval value of the key frames; and merging the expanded sub-videos and the directly stored sub-videos to obtain the second video.
[0029] The present application also provides a data processing device, including:
[0030] A first processing module is used to record the portrait screen and the document screen in the video conference screen respectively, and obtain a first video corresponding to the portrait screen and a second video corresponding to the document screen;
[0031] The first storage module is used to store the first video and compress and store the second video.
[0032] Optionally, compressing and storing the second video includes:
[0033] The second video is compressed and stored according to a first rule; wherein the first rule includes:
[0034] Dividing the second video to obtain at least one sub-video;
[0035] When all pictures included in the sub-video are the same, only one picture among all the pictures is stored;
[0036] When the sub-video contains at least two different pictures, the sub-video is directly stored.
[0037] Optionally, the first rule also includes:
[0038] In the case that the same picture exists in the at least two stored adjacent pictures, any one of the at least two adjacent pictures is retained.
[0039] Optionally, also include:
[0040] The second processing module is used to construct a two-dimensional array, where the two-dimensional array is used to indicate the storage status of the sub-video, where the storage status includes one or more of the following:
[0041] Only one picture is stored for each sub-video;
[0042] directly storing the sub-video;
[0043] Only one picture is stored for at least two of the sub-videos.
[0044] Optionally, also include:
[0045] A third processing module is used to restore the second video according to the two-dimensional array and the stored pictures and / or sub-videos in a rendering stage;
[0046] The fourth processing module is used to obtain a video corresponding to the video conference screen according to the restored second video and the stored first video.
[0047] Optionally, dividing the second video to obtain at least one sub-video includes:
[0048] The second video is divided according to the frame rate and the interval value of the key frames to obtain at least one sub-video.
[0049] Optionally, restoring the second video according to the two-dimensional array and the stored pictures and / or sub-videos includes any one of the following:
[0050] The storage situation indicated by the two-dimensional array includes: when only one picture is stored for one sub-video, and / or when only one picture is stored for at least two sub-videos, the stored picture is expanded into the corresponding sub-video according to the frame rate and the interval value of the key frame; and the second video is obtained according to the expanded sub-video;
[0051] The storage situation indicated by the two-dimensional array includes: in the case of directly storing the sub-video, obtaining the second video according to the directly stored sub-video;
[0052] The storage conditions indicated by the two-dimensional array include: storing only one picture for one sub-video, and / or storing only one picture for at least two sub-videos, and, when the sub-videos are directly stored, expanding the stored pictures into corresponding sub-videos according to the frame rate and the interval value of the key frames; and merging the expanded sub-videos and the directly stored sub-videos to obtain the second video.
[0053] An embodiment of the present application also provides a data processing device, including a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, the above-mentioned data processing method is implemented.
[0054] An embodiment of the present application also provides a readable storage medium on which a program is stored, and when the program is executed by a processor, the steps in the above-mentioned data processing method are implemented.
[0055] An embodiment of the present application also provides a computer program product, including computer instructions, which implement the steps of the above-mentioned data processing method when executed by a processor.
[0056] The beneficial effects of the above technical solution of the present application are as follows:
[0057] In the above scheme, the data processing method records the portrait screen and the document screen in the video conference screen respectively to obtain a first video corresponding to the portrait screen and a second video corresponding to the document screen; the first video is stored and the second video is compressed and stored; it can support recording the portrait screen and the document screen respectively, and compressing and storing the second video corresponding to the document screen, thereby reducing the storage volume of the recorded file, and solving the problem in the prior art that the recorded files occupy a large storage space in the solutions for online conference recording. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A schematic diagram of a data processing method flow chart of an embodiment of the present application;
[0059] Figure 2 This is a schematic diagram of the layout template of the embodiment of the present application. Figure 1 ;
[0060] Figure 3 This is a schematic diagram of the layout template of the embodiment of the present application. Figure 2 ;
[0061] Figure 4 This is a schematic diagram of the layout template of the embodiment of the present application. Figure 3 ;
[0062] Figure 5 This is a schematic diagram of the layout template of the embodiment of the present application. Figure 4 ;
[0063] Figure 6 A schematic diagram of video conference recording according to an embodiment of the present application;
[0064] Figure 7 This is a schematic diagram of the first video storage of an embodiment of the present application;
[0065] Figure 8 A schematic diagram of a second video storage in an embodiment of the present application;
[0066] Fig. 9 A schematic diagram of a two-dimensional matrix according to an embodiment of the present application;
[0067] Fig.10 This is a schematic diagram of the rendering stage of an embodiment of the present application;
[0068] Fig.11 Schematic diagram of the structure of a data processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0070] This application aims to solve the problem that the recording files in the existing online conference recording solutions will occupy a large storage space, and provides a data processing method, such as Figure 1 As shown, including:
[0071] Step 11: Record the portrait image and the document image in the video conference image respectively to obtain a first video recording corresponding to the portrait image and a second video recording corresponding to the document image.
[0072] Specifically, considering that online conferences often use layout templates for meetings, step 11 may include: according to the layout template, splitting the video conference screen into a portrait screen and a document screen, and recording the portrait screen and the document screen respectively to obtain a first recording corresponding to the portrait screen and a second recording corresponding to the document screen. The layout template may refer to the distribution method of the video conference screen, such as Figures 2 to 5 The following modes are shown in sequence: top view, right view, picture-in-picture and presentation view, which are not limited here; wherein, the portrait occupies only a small part of the video conference screen, and most of the area is the static document screen put by the conference participants; based on this consideration: the recorded screen is usually a long-term static document screen and a changing portrait screen; if the long-term static document screen and the changing portrait screen can be recorded and stored separately, then the storage volume of the recorded file based on the layout template will be greatly reduced; therefore, the embodiment of the present application provides Figure 1 The scheme shown can be specifically implemented as a video compression storage method based on a layout template, which can be applicable to video recording, storage and playback, and is used to compress the file storage volume after recording based on the layout template.
[0073] Among them, the layout template can also be called a conference layout template, and / or the document screen can include a PPT screen, a Word screen, etc.; and / or the formats of the first video and the second video can include: mp4 format, AVI format, WMV format, MPEG format, etc., which are not limited here.
[0074] Step 12: Store the first video and compress and store the second video.
[0075] Among them, "storing the first video" may include: directly storing the first video; in this solution, regarding recording, it may include: Case 1, the audio is recorded separately during recording; Case 2, the first video carries the corresponding first audio, and the second video carries the corresponding second audio; for Case 2, in this solution, "compressing and storing the second video" may include: separating the audio track and the video track of the second video to obtain the first video in the second video; compressing and storing the first video; that is, separating the second audio, and then compressing and storing the second video after the audio is separated.
[0076] Specifically, the above situation 2 can also be understood as: the first video and the second video both include video and audio; in the embodiment of the present application, the audio in the second video can be deleted or retained; later, the two videos can be spliced up and down using vstack or left and right using hstack provided by ffmpeg, at which time ffmpeg can process the audio streams of the two videos at the same time and ensure that their time axes are aligned, but it is not limited to this. It can also be understood that the videos corresponding to the portrait screen and the document screen can each have audio track data (the data can be exactly the same), and later the video for the portrait screen can be directly saved (including video and audio), and the video for the document screen can be segmented into audio and video, the audio can be saved separately or not stored, and the video can be compressed and stored.
[0077] Corresponding to the above case 2, Figure 1 The scheme shown can be implemented as follows: during the video conference recording process, the video conference screen is split into a portrait screen and a document screen (such as word, ppt, etc.); the recorded audio and portrait screen are directly stored, and the document screen is stored according to preset rules.
[0078] The data processing method provided in the embodiment of the present application records the portrait screen and the document screen in the video conference screen respectively to obtain a first video recording corresponding to the portrait screen and a second video recording corresponding to the document screen; stores the first video recording and compresses and stores the second video recording; can support recording the portrait screen and the document screen respectively, and compresses and stores the second video recording corresponding to the document screen, thereby reducing the storage volume of the recorded file, and solving the problem in the prior art that the recorded file occupies a large storage space in the solution for online conference recording.
[0079] In an embodiment of the present application, the compressed storage of the second video includes: compressing and storing the second video according to a first rule; wherein the first rule includes: dividing the second video to obtain at least one sub-video; when all pictures contained in the sub-video are the same, only one picture among all pictures is stored; when the sub-video contains at least two different pictures, the sub-video is directly stored. This can support reducing the second video corresponding to the document screen as much as possible, and can retain the entire content of the document screen, thereby greatly reducing the storage space of the video conference and ensuring the integrity of the video conference content. The format of the sub-video can be the same as the format of the second video, for example: the format of the second video is mp4 format, and the sub-video is embodied as an mp4 file. Among them, the division of the second video can be carried out according to the frame rate and the interval value of the key frame. Correspondingly, the preset rules in the above-mentioned "storing the document screen according to the preset rules" (corresponding to the above-mentioned first rule) can specifically include: cutting the document screen into multiple smaller mp4 files according to the frame rate and gop value (i.e., the interval value of the key frame); if each picture in the mp4 file is the same, only one picture is stored, which can be stored in jpg format; if there are different pictures in the mp4 file, the mp4 file is stored and stored in mp4 format.
[0080] Furthermore, the first rule also includes: if the same picture exists in at least two adjacent pictures stored, retain any one of the at least two adjacent pictures. In this way, the second video corresponding to the document screen can be further compressed to better reduce the storage space of the video conference and ensure the integrity of the video conference content. Among them, any one of the pictures can be a picture with a target timestamp, and the target timestamp can include the earliest timestamp, the latest timestamp, or a timestamp in the middle, etc.; and / or, the timestamp can be the time information corresponding to the picture in the video to which it belongs, but is not limited thereto.
[0081] In an embodiment of the present application, the data processing method further includes: constructing a two-dimensional array, the two-dimensional array is used to indicate the storage status of the sub-videos, and the storage status includes one or more of the following: storing only one picture for one sub-video; directly storing the sub-video; storing only one picture for at least two sub-videos. This can support the later restoration of the second video based on the stored pictures and / or sub-videos. For example, the sub-videos are embodied as mp4 files; in this solution, a two-dimensional array a[m][n] (n is the gop value, and m is the number of mp4 files) can be constructed according to whether each picture in each mp4 file is the same or different.
[0082] Furthermore, the data processing method also includes: in the rendering stage, according to the two-dimensional array, and the stored pictures and / or sub-videos, the second video is restored; according to the restored second video and the stored first video, the video corresponding to the video conference screen is obtained. In this way, the video corresponding to the video conference screen can be accurately restored; specifically, in the rendering stage, the above files stored in jpg format can be re-expanded into mp4 files according to the two-dimensional array, and then all mp4 files can be merged into a document screen, and the document screen and the portrait screen can be merged into a video conference screen, and an audio stream is added for rendering. Based on this, the embodiment of the present application is aimed at recording based on a layout template, and the document screen that has been still for a long time and the changing portrait screen are stored separately according to the layout template, and the document screen that has been still for a long time and the changing portrait screen are merged during playback, and the effect of synchronous audio and video playback can still be achieved during playback.
[0083] In the embodiment of the present application, dividing the second video to obtain at least one sub-video includes: dividing the second video according to the frame rate and the interval value of the key frame to obtain at least one sub-video. In this way, the second video can be accurately divided.
[0084] The method of restoring the second video according to the two-dimensional array and the stored pictures and / or sub-videos includes any of the following: (1) when the storage situation indicated by the two-dimensional array includes: only one picture is stored for one sub-video, and / or only one picture is stored for at least two sub-videos, the stored picture is expanded into the corresponding sub-video according to the frame rate and the interval value of the key frame; and the second video is obtained according to the expanded sub-video; (2) when the storage situation indicated by the two-dimensional array includes: directly storing the sub-video, the second video is obtained according to the directly stored sub-video; (3) when the storage situation indicated by the two-dimensional array includes: only one picture is stored for one sub-video, and / or only one picture is stored for at least two sub-videos, and the sub-video is directly stored, the stored picture is expanded into the corresponding sub-video according to the frame rate and the interval value of the key frame; and the expanded sub-video and the directly stored sub-video are merged to obtain the second video. In this way, the restoration of the second video can be specifically realized. Among them, "obtaining the second video according to the sub-video obtained by expansion" includes: when the number of the sub-video obtained by expansion is one, the sub-video obtained by expansion can be used as the second video; when the number of the sub-video obtained by expansion is multiple, the sub-video obtained by expansion can be merged to obtain the second video; and / or, "obtaining the second video according to the sub-video directly stored" includes: when the number of the sub-video directly stored is one, the sub-video directly stored can be used as the second video; when the number of the sub-video directly stored is multiple, the sub-video directly stored can be merged to obtain the second video; but it is not limited to this.
[0085] The data processing method provided in the embodiment of the present application is illustrated below by way of example, wherein the document screen takes a PPT screen as an example, the video takes an mp4 format as an example, and correspondingly, the sub-video takes an mp4 file as an example.
[0086] During the recording phase, Figure 6As shown, assuming that the layout of the online conference system is a top view, the recording will be recorded in two parts, top-original.mp4 is a long-changing portrait picture, and bottom-original.mp4 is a long-still picture. Assuming original.mp4 is: an rtmp stream with a size of 1920×1080, a frame rate of 25, and a gop of 50, the size of top-original.mp4 is 1920×270, and the size of bottom-original.mp4 is 1920×810; then the recording of top-original.mp4 and bottom-original.mp4 can be recorded using the filter filter provided by ffmpeg, such as -filter:v"crop=iw:ih / 4:0:0", -filter:v"crop=iw:3×ih / 4:0:ih / 4". Among them, 270 / 1080=1 / 4, 810 / 1080=3 / 4, and the implementation principles of other original.mp4 sizes, frame rates or gop, top-original.mp4 sizes, and bottom-original.mp4 sizes are similar. This part can correspond to the above-mentioned recording of the portrait screen and the document screen in the video conference screen, respectively, to obtain the first video corresponding to the portrait screen and the second video corresponding to the document screen.
[0087] Among them, the above "the recording of top-original.mp4 and bottom-original.mp4 can be recorded using the filter provided by ffmpeg, such as -filter:v"crop=iw:ih / 4:0:0", -filter:v"crop=iw:3*ih / 4:0:ih / 4"", means: record top-original.mp4 and bottom-original.mp4 respectively according to the position and size that top-original.mp4 and bottom-original.mp4 occupy in top-original.mp4. Among them, crop=width:height:x:y, where width (width) and height (height) represent the cropped size, and x:y represent the coordinates of the upper left corner of the cropped area (such as the portrait screen or the document screen). For example, assuming that top-original.mp4 occupies the upper 1 / 4 of original.mp4, and bottom-original.mp4 occupies the lower 3 / 4 of original.mp4; original.mp4 is a video stream with a size of 1920×1080, then the size of top-original.mp4 is 1920×270, and the size of bottom-original.mp4 is 1920×810 (270 / 1080=1 / 4, 810 / 1080=3 / 4). Let iw represent the weight of original.mp4, and ih represent the height of original.mp4. When recording the upper 1 / 4 part, i.e. top-original.mp4, the filter parameters can be written as: -filter:v"crop=iw:ih / 4:0:0", (-filter:v"crop=1920:270:0:0"); when recording the lower 3 / 4 part, i.e. bottom-original.mp4, the filter parameters can be written as: -filter:v"crop=iw:3×ih / 4:0:ih / 4"(-filter:v"crop=1920:810:0:270"); but it is not limited to this.
[0088] In the storage phase, Figure 7 As shown, since top-original.mp4 is a portrait picture that changes over a long period of time, the recorded top-original.mp4 does not need to be modified in storage and is directly stored with a size of 1920×270, a frame rate of 25, and gop of 50, namely, top-video-play.mp4; corresponding to the above storage of the first video.
[0089] Since bottom-original.mp4 is a long-term static PPT screen, the recorded bottom-original.mp4 can be compressed for storage. Figure 8 As shown, first separate the audio track and video track of bottom-original.mp4, record them as bottom-audio.aac and bottom-video.mp4 (corresponding to the above separation of the audio track and video track of the second video to obtain the first video in the second video). Since the audio storage volume itself is small, bottom-audio.aac does not need to be modified and can be stored directly.
[0090] Cut bottom-video.mp4 into multiple small mp4 files according to the frame rate and gop value (corresponding to the above-mentioned division of the second video according to the frame rate and the interval value of the key frame to obtain at least one sub-video). Let m (m can be obtained according to the frame rate and gop value) be the number of mp4 files cut from bottom-video.mp4, and n be the gop value of bottom-video.mp4 (i.e. the interval value of the key frame) to construct a two-dimensional array a[m][n] to indicate whether each picture of each mp4 of bottom-video.mp4 is the same; the two-dimensional array can be constructed corresponding to the above, and the two-dimensional array is used to indicate the storage status of the sub-video. Specifically comprising the following steps:
[0091] Step 1: Compare and analyze whether the n pictures of the i+1th mp4 are the same, 0≤i<m;
[0092] (1) If the n pictures of the i+1th mp4 are exactly the same, it is determined that the mp4 belongs to the video screen when the PPT is still. At this time, a[i][0]=i, a[i][1]=-1, a[i][2]=-1, a[i][3]=-1, ... a[i][n-1]=-1 can be set; only the first picture of the i+1th mp4 can be stored, recorded as i.jpg, and the i+1th mp4 is not stored; corresponding to the above situation where all the pictures included in the sub-video are the same, only one picture of all the pictures is stored.
[0093] (2) If the n pictures of the i+1th mp4 are different (as long as there are different pictures, they are judged to be different), it is determined that the mp4 belongs to the video screen when the PPT is switched. At this time, a[i][0]=i, a[i][1]=i, a[i][2]=i, a[i][3]=i, ...a[i][n-1]=i can be set; only the i+1th mp4 (without storing pictures) can be stored, recorded as i.mp4; corresponding to the above, when the sub-video contains at least two different pictures, the sub-video is directly stored.
[0094] Step 2: Compare the images between mp4 files to see if they are the same;
[0095] (1) If a[i][1]=i, it means that the sequence number i stores mp4, that is, the i+1th mp4 stores mp4, and no operation is performed;
[0096] (2) If a[i][1] = -1, it means that the file stored in sequence number i is jpg, that is, the file stored in the i+1th mp4 is jpg; further:
[0097] If a[i-1][1]=i, it means that the sequence number i-1 stores mp4, and no operation is performed;
[0098] If a[i-1][1]=-1, it means that the sequence number i-1 also stores jpg, then compare i.jpg to see if it is exactly the same as i-1.jpg; if they are different, do nothing; if they are the same, set a[i][0]=a[i-1][0]; delete i.jpg and keep a[i-1][0].jpg (such as Fig. 9 In step 2, the first row and the second row are the same, indicating that they are the same picture, which can facilitate the later recovery of the video); corresponding to the above-mentioned situation where there is an identical picture in the at least two stored pictures, retaining any one of the at least two pictures, and the any one of the pictures can be a picture with a target timestamp; the storage situation for the sub-recording indicated by the two-dimensional array includes: only one picture is stored for at least two of the sub-recordings.
[0099] For the above steps 1 and 2, let's take an example and assume that: bottom-video.mp4.mp4 is a static PPT screen at 0-5 seconds, a PPT page turning screen at 5-7 seconds, a static PPT screen at 7-12 seconds, a PPT page turning screen at 12-14 seconds, and a static PPT screen at 14-16 seconds. The 16-second video can be cut into 8 small mp4 files according to the frame rate of 25 and the gop of 50. According to the above steps 1 and 2, the following can be formed: Fig. 9The two-dimensional matrix corresponding to step 1 and step 2 shown in the figure finally stores three pictures (i.e., 0.jpg, 4.jpg, 7.jpg) and three small mp4 files (i.e., 2.mp4, 3.mp4, 6.mp4).
[0100] In this way, since there are a large number of long static PPT images in the online conference recording video based on the layout template, bottom-video.mp4 only stores a few jpgs and several PPT page turning mp4s after steps 1 and 2, which greatly compresses the storage space.
[0101] Later, during the rendering phase, the i.jpg file can be re-expanded into an i.mp4 file, and then all the mp4 files can be merged into bottom-video-play.mp4; for example, first:
[0102] (1) If a[i][1] = -1, then a[i][0].jpg is expanded into an i.mp4 file with a frame rate of 25 and a gop of 50; (2) If a[i][1] = i, then no additional operation is required. This part may correspond to the above-mentioned restoration of the second video according to the two-dimensional array and the stored picture and / or the sub-video in the rendering stage.
[0103] Afterwards, you can Fig.10As shown, the mp4s with serial numbers 0, 1, ..., m-1 are connected into the video track bottom-video-merge.mp4 (corresponding to the above bottom-video.mp4) through the concat (connection) command provided by ffmpeg; the audio track bottom-audio.aac and the video track bottom-video-merge.mp4 are merged into bottom-video-play.mp4 (corresponding to the above bottom-original.mp4) through ffmpeg. Finally, the vstack video filter provided by ffmpeg is used to splice bottom-video-play.mp4 and top-video-play.mp4 up and down to form video-play.mp4 (corresponding to the above-mentioned second video obtained by restoration and the first video stored, to obtain the video corresponding to the video conference screen), and it is played on the client; the above finally merges the PPT screen that has been still for a long time and the moving portrait screen, where video-play.mp4 corresponds to the above original.mp4. When using vstack to stitch two videos together (bottom-video-play.mp4 and top-video-play.mp4 both have audio), ffmpeg can process the audio streams of both videos at the same time and ensure that their timelines are aligned. Specifically:
[0104] The bottom-original.mp4 and top-original.mp4 separated in the embodiment of the present application both have audio. When using vstack up and down or hstack left and right to splice the two videos bottom-video-play.mp4 and top-video-play.mp4, ffmpeg can process the audio streams of the two videos at the same time and ensure that their timelines are aligned. The final merged audio will not conflict, and ffmpeg will generate video-play.mp4 normally, and video-play.mp4 has only one audio track. This is because the audio of bottom-video-play.mp4 and top-video-play.mp4 are recorded simultaneously through the conference, and the timestamps of the two audios are consistent.
[0105] In addition, when merging the video of the portrait screen (including the video and audio) and the video of the document screen (including the video and audio) through vstack and / or hstack, you can also specify the source of the audio through map (for example, specify that the merged video uses the audio of the video of the portrait screen). In this case, ffmpeg will automatically discard the audio of the video of the document screen, but this is not limited to this.
[0106] It is explained here that in the embodiment of the present application, the video compression and storage method based on the layout template constructs a two-dimensional array to indicate whether each picture of each small mp4 after the PPT screen that has been stationary for a long time is cut according to the frame rate and gop value is the same. For the PPT screen that has been stationary for a long time, only small mp4 or single picture is stored, which can greatly compress the video storage volume based on the layout template. At the same time, when the video is played, the two-dimensional array can also help restore the stored small mp4 or single picture to the same stationary PPT screen as before compression and storage. It can also be understood that a two-dimensional array is constructed according to the same or different pictures in each mp4 file of the document screen, so as to restore the document screen according to the two-dimensional array in the rendering stage, and then restore the video conference screen in combination with the portrait screen; such a setting can restore the compressed document screen in the rendering stage, so as to better restore the document screen, and then restore the recording screen of the entire video conference.
[0107] In addition, in the embodiment of the present application, small mp4s and pictures are stored according to the frame rate and gop value. During playback, the pictures are expanded into small mp4s and all small mp4s are connected according to the frame rate and gop value, ensuring that the timestamps (display timestamp PTS) of the PPT pictures that are still for a long time and the moving portrait pictures can be aligned when they are merged; in this way, there is no need to modify the video codec to dynamically adjust parameters such as PTS, GOP, frame rate, etc., and there will be no frame loss or audio and video asynchrony.
[0108] Based on the above, the embodiment of the present application can reduce the document screen that occupies most of the space of the video screen as much as possible, and can retain the entire content of the video screen, thereby greatly reducing the storage space of the video conference and ensuring the integrity of the video conference content. Specifically, the document screen occupies most of the space of the video conference, and compressing the size of the document screen can greatly reduce the storage space of the entire recorded video screen; and the embodiment of the present application also constructs a two-dimensional array, and can restore the jpg format or mp4 format to the video conference screen according to the two-dimensional array during the rendering stage.
[0109] In addition, the "construction of a two-dimensional array to represent whether each picture in each small mp4 after the long-term static PPT screen is cut according to the frame rate and gop value is the same, storing the small mp4 and pictures according to the frame rate and gop value, and expanding the pictures into small mp4s and connecting all small mp4s according to the frame rate and gop value during playback" in the embodiments of the present application can also be used in the solution of restoring a variable frame rate to a fixed frame rate video, without limitation here.
[0110] The present application also provides a data processing device, such as Fig.11 As shown, including:
[0111] The first processing module 111 is used to record the portrait screen and the document screen in the video conference screen respectively, and obtain a first video corresponding to the portrait screen and a second video corresponding to the document screen;
[0112] The first storage module 112 is used to store the first video and compress and store the second video.
[0113] The data processing device provided in the embodiment of the present application records the portrait screen and the document screen in the video conference screen respectively to obtain a first video recording corresponding to the portrait screen and a second video recording corresponding to the document screen; stores the first video recording and compresses and stores the second video recording; can support recording the portrait screen and the document screen respectively, and compresses and stores the second video recording corresponding to the document screen, thereby reducing the storage volume of the recorded file, and solving the problem in the prior art that the recorded file occupies a large storage space in the solution for online conference recording.
[0114] The compressing and storing the second video includes: compressing and storing the second video according to a first rule; wherein the first rule includes: dividing the second video to obtain at least one sub-video; when all pictures included in the sub-video are the same, only one picture among all the pictures is stored; when the sub-video contains at least two different pictures, the sub-video is directly stored.
[0115] Furthermore, the first rule also includes: when there is an identical picture in at least two stored adjacent pictures, retaining any one of the at least two adjacent pictures.
[0116] In an embodiment of the present application, the data processing device further includes: a second processing module, used to construct a two-dimensional array, wherein the two-dimensional array is used to indicate the storage status of the sub-videos, and the storage status includes one or more of the following: storing only one picture for one sub-video; directly storing the sub-video; storing only one picture for at least two sub-videos.
[0117] Furthermore, the data processing device also includes: a third processing module, used to restore the second video in the rendering stage according to the two-dimensional array and the stored pictures and / or the sub-videos; a fourth processing module, used to obtain the video corresponding to the video conference screen according to the restored second video and the stored first video.
[0118] The dividing the second video to obtain at least one sub-video includes: dividing the second video to obtain at least one sub-video according to a frame rate and an interval value of key frames.
[0119] In the embodiment of the present application, the second video is restored according to the two-dimensional array and the stored pictures and / or the sub-videos, including any of the following items: (1) when the storage situation indicated by the two-dimensional array includes: when only one picture is stored for one sub-video and / or when only one picture is stored for at least two sub-videos, the stored picture is expanded into the corresponding sub-video according to the frame rate and the interval value of the key frame; and the second video is obtained according to the expanded sub-video; (2) when the storage situation indicated by the two-dimensional array includes: when the sub-video is directly stored, the second video is obtained according to the directly stored sub-video; (3) when the storage situation indicated by the two-dimensional array includes: when only one picture is stored for one sub-video and / or when only one picture is stored for at least two sub-videos and when the sub-video is directly stored, the stored picture is expanded into the corresponding sub-video according to the frame rate and the interval value of the key frame; and the expanded sub-video and the directly stored sub-video are merged to obtain the second video.
[0120] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0121] An embodiment of the present application also provides a data processing device, including a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, the above-mentioned data processing method is implemented.
[0122] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0123] An embodiment of the present application also provides a readable storage medium on which a program is stored, and when the program is executed by a processor, the steps in the above-mentioned data processing method are implemented.
[0124] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the readable storage medium and can achieve the same technical effects.
[0125] An embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the method embodiment of the above-mentioned data processing method are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0126] It should be noted that many functional components described in this specification are referred to as modules in order to more particularly emphasize the independence of their implementation methods.
[0127] In the embodiment of the present application, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.
[0128] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0129] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.
[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0131] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data processing method, characterized in that: include: Recording a portrait screen and a document screen in a video conference screen respectively to obtain a first video corresponding to the portrait screen and a second video corresponding to the document screen; The first video is stored, and the second video is compressed and stored.
2. The data processing method according to claim 1, characterized in that: The compressing and storing the second video includes: The second video is compressed and stored according to a first rule; wherein the first rule includes: Dividing the second video to obtain at least one sub-video; When all pictures included in the sub-video are the same, only one picture among all the pictures is stored; When the sub-video contains at least two different pictures, the sub-video is directly stored.
3. The data processing method according to claim 2, characterized in that: The first rule also includes: In the case that the same picture exists in the at least two stored adjacent pictures, any one of the at least two adjacent pictures is retained.
4. The data processing method according to claim 2 or 3, characterized in that: Also includes: Construct a two-dimensional array, where the two-dimensional array is used to indicate a storage condition for the sub-recording, where the storage condition includes one or more of the following: Only one picture is stored for each sub-video; directly storing the sub-video; Only one picture is stored for at least two of the sub-videos.
5. The data processing method according to claim 4, characterized in that: Also includes: In the rendering stage, the second video is restored according to the two-dimensional array and the stored picture and / or the sub-video; A video recording corresponding to the video conference screen is obtained according to the restored second video recording and the stored first video recording.
6. The data processing method according to claim 5, characterized in that: The dividing the second video to obtain at least one sub-video includes: The second video is divided according to the frame rate and the interval value of the key frames to obtain at least one sub-video.
7. A data processing device, characterized in that: include: A first processing module is used to record the portrait screen and the document screen in the video conference screen respectively, and obtain a first video corresponding to the portrait screen and a second video corresponding to the document screen; The first storage module is used to store the first video and compress and store the second video.
8. A data processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that: When the processor executes the program, the data processing method according to any one of claims 1 to 6 is implemented.
9. A readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the data processing method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 6.
