Video preview method and device, equipment and storage medium
By obtaining the current reading time node of the video reading line and track information of the material segment, the sub-engine module in the engine layer reads and plays the sub-material segments in the composite segment, solving the playback lag caused by multiple materials in the video and improving the preview effect of the video.
Patent Information
- Application Number
- CN202311134306.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2025-03-04
AI Technical Summary
When the number of multiple materials included in the video is large, the time for reading the video includes each material through multiple reading modules is long, resulting in playback stuttering in the video, affecting the preview effect of the video.
Obtain the track information of the current reading time node of the video reading line and the multiple material segments included in the video. If the reading time node is within the display time interval of the composite segment, the various sub-material segments included in the composite segment are read and played through the display time sub-interval of the sub-recruitment module in the engine layer and the display time sub-interval of each sub-material segment.
By directly reading and playing each sub-material clip in the composite clip, the duration of reading multiple material clips is reduced, and the video is not played stuttering, thereby improving the video preview effect.
Smart Images

Figure CN119562117A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of data processing technology, and in particular to a video preview method, device, equipment and storage medium. Background Art
[0002] Currently, in order to improve the viewing experience of multimedia data such as videos, multimedia data such as videos can be edited. For example, emoticons, background sounds and other materials can be added to the video to improve the viewing experience of the video. In this case, since the video includes multiple types of materials, when previewing the video, it is necessary to read and play each material included in the video.
[0003] In the prior art, various materials in a video can be read through multiple reading modules. For example, the multiple reading modules include a video reading module and a sound reading module; the expression package in the video can be read through the video reading module, and the background sound in the video can be read through the sound reading module.
[0004] However, the inventors have discovered that the prior art has at least the following technical problems: when a video includes a large number of multiple materials, it takes a long time to read each material in the video through multiple reading modules, resulting in playback freezes and affecting the preview effect of the video. Summary of the invention
[0005] The embodiments of the present disclosure provide a video preview method, device, equipment and storage medium, which can improve the preview effect of the video.
[0006] In a first aspect, an embodiment of the present disclosure provides a video preview method, comprising:
[0007] Acquire the current read time node of the video read line; and acquire the track information of the multiple material clips included in the video, wherein the track information includes the display time interval of the material clips, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip;
[0008] If the read time node is within the presentation time interval of the compound segment, each sub-material segment included in the compound segment is read and played through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment.
[0009] In a second aspect, an embodiment of the present disclosure provides a video preview device, including:
[0010] an acquisition module, configured to acquire a current read time node of a video read line; and to acquire track information of a plurality of material clips included in the video, wherein the track information includes a display time interval of the material clips, wherein the plurality of material clips include at least one composite clip, the composite clip includes a plurality of sub-material clips, and the display time interval of the composite clip includes a plurality of display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip;
[0011] The reading module is used to read and play each sub-material segment included in the compound segment through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment if the reading time node is within the presentation time interval of the compound segment.
[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0013] A processor, and a memory communicatively connected to the processor;
[0014] The memory stores computer-executable instructions;
[0015] The processor executes the computer-executable instructions stored in the memory to implement the video preview method as described in the first aspect above.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the video preview method described in the first aspect above is implemented.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the video preview method described in the first aspect above.
[0018] The video preview method, device, equipment and storage medium provided in the present embodiment include: obtaining the current read time node of the video read line; and obtaining the track information of multiple material clips included in the video, wherein the track information includes the display time interval of the material clip, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip; if the read time node is within the display time interval of the composite clip, then through the sub-engine module in the engine layer and the display time sub-interval of each sub-material clip, read and play each sub-material clip included in the composite clip. Since each sub-material clip included in the composite clip can be directly read and played through the sub-engine module in the engine layer, the time length of reading multiple material clips is reduced, and the situation of video playback jamming is avoided, thereby improving the preview effect of the video. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 A schematic diagram of an application scenario of a video preview method provided by an embodiment of the present disclosure;
[0021] Figure 2 A flowchart of a video preview method provided by an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of multiple material clips included in a video provided by an embodiment of the present disclosure;
[0023] Figure 4 A schematic diagram showing a time interval provided in an embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of adjusting a first preset frame rate provided in an embodiment of the present disclosure;
[0025] Figure 6 A schematic diagram of a sub-engine module provided in an embodiment of the present disclosure;
[0026] Figure 7 A structural block diagram of a video preview device provided by an embodiment of the present disclosure;
[0027] Figure 8A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0029] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0030] Currently, in order to improve the viewing experience of multimedia data such as videos, multimedia data such as videos can be edited. For example, emoticons, background sounds and other materials can be added to the video to improve the viewing experience of the video. In this case, since the video includes multiple types of materials, when previewing the video, it is necessary to read and play each material included in the video.
[0031] In the prior art, multiple reading modules can be used to read various materials in a video. For example, the multiple reading modules include a video reading module and a sound reading module; the emoticon package in the video can be read by the video reading module, and the background sound in the video can be read by the sound reading module. However, when the number of multiple materials included in the video is large, it takes a long time to read each material included in the video through multiple reading modules, resulting in a playback freeze of the video, affecting the preview effect of the video.
[0032] Therefore, how to reduce the time of reading various materials in the video and improve the preview effect of the video is a problem that needs to be solved urgently.
[0033] In order to solve the above problems, the present embodiment proposes the following technical concepts: first, obtain the current reading time node of the video reading line; and obtain the track information of the multiple material clips included in the video, wherein the track information includes the display time interval of the material clip, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip; then, if the reading time node is within the display time interval of the composite clip, then through the sub-engine module in the engine layer and the display time sub-interval of each sub-material clip, read and play each sub-material clip included in the composite clip. Since each sub-material clip included in the composite clip can be directly read and played through the sub-engine module in the engine layer, the time length of reading multiple material clips is reduced, and the situation of video playback jamming is avoided, thereby improving the preview effect of the video.
[0034] The application scenarios of the embodiments of the present disclosure are explained below:
[0035] The video preview method provided by the embodiment of the present disclosure can be applied to various scenarios of previewing videos, for example, to the scenario of previewing videos to be released. Figure 1 Schematic diagram of an application scenario of a video preview method provided by an embodiment of the present disclosure. Figure 1 As shown, the engine layer includes a video reading module 101, an image reading module 102 and a sub-engine module 103; when previewing a video, multiple material segments in the video can be read through the engine layer. Optionally, the video segment is read through the video reading module 101, the image segment is read through the image reading module 102, and the composite segment is read through the sub-engine module 103. Among them, the video reading module 101 can be represented by VideoReaderUnit, the image reading module 102 can be represented by ImageReaderUnit, and the sub-engine module 103 can be represented by SequenceReaderUnit. The video preview method provided by the embodiment of the present disclosure is described in detail below using a detailed embodiment.
[0036] refer to Figure 2 , Figure 2 A flowchart of a video preview method provided in an embodiment of the present disclosure. This embodiment is described by taking the execution subject as a terminal as an example. The method includes:
[0037] S201. Obtain the current reading time node of the video reading line; and obtain the track information of the multiple material clips included in the video, wherein the track information includes the display time interval of the material clips, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip.
[0038] In the embodiment of the present disclosure, a video may include any type of material clips. Optionally, the video includes one or more of a text clip, an image clip, a video clip, and a composite clip. The track information of the material clip includes the display time interval (start time node and end time node) of the material clip. For example, the track information of the multiple material clips included in video 1 is as follows: Figure 3 As shown, the video includes multiple material clips, namely: Clip 1 corresponding to track 1, composite clip 2 and clip 3 corresponding to track 2, clip 4 corresponding to track 3, and clip 5 corresponding to track 4. Composite clip 2 includes multiple sub-material clips, namely: Clip 21 corresponding to track 21, composite clip 22 and clip 23 corresponding to track 22, clip 24 corresponding to track 23, and clip 25 corresponding to track 24.
[0039] Optionally, the presentation time interval of the composite clip may be a main timeline, and the presentation time sub-intervals corresponding to the multiple sub-materials may be sub-timelines; a main timeline includes sub-timelines corresponding to the multiple sub-materials. Figure 4 As shown, the sub-timelines corresponding to the composite clip include: sub-timeline 1 corresponding to sub-material 1 and sub-timeline 2 corresponding to sub-material 2. The main timeline can be represented by MainTimeline, sub-timeline 1 can be represented by SubTimeline1, and sub-timeline 2 can be represented by SubTimeline2.
[0040] In one embodiment of the present disclosure, the video read line can be moved according to the frame rate of the video. Accordingly, obtaining the current read time node of the video read line includes: in response to receiving a preview operation of the video, obtaining a first preset frame rate of the preview video; moving the read time node corresponding to the video read line according to the first preset frame rate, and obtaining the current read time node of the video read line.
[0041] In the embodiment of the present application, the value of the first preset frame rate is not specifically limited. For example, the preset frame rate may be 25, 30, 35, etc.
[0042] It should be noted that in order to ensure the smoothness of the playback of the first composite editing object, the present application can also adjust the first preset frame rate. Accordingly, the specific steps for adjusting the first preset frame rate are: determining the average response time for reading and playing each sub-material segment included in the composite segment; if the average response time is greater than or equal to the first preset time, reducing the first preset frame rate to the second preset frame rate; if the average response time is less than or equal to the second preset time, increasing the first preset frame rate to the third preset frame rate; wherein the first preset time is greater than the second preset time.
[0043] In the embodiment of the present application, the values of the first preset duration and the second preset duration are not specifically limited. Optionally, the first preset duration may be 5 milliseconds, etc. The second preset duration may be 1 millisecond. In the embodiment of the present application, the values of the second preset frame rate and the third preset frame rate are not specifically limited. For example, Figure 5 As shown, the first preset frame rate is 30, the second preset frame rate is 25, and the third preset frame rate is 35; when the average response time is greater than or equal to the first preset duration, the first preset frame rate 30 is reduced to the second preset frame rate 25; if the average response time is less than or equal to the second preset duration, the first preset frame rate 30 is increased to the third preset frame rate 35.
[0044] Here, since the preset frame rate can be adjusted by the average response time, and the preset frame rate is related to the smoothness of the display of the first composite editing object, the smoothness of the display of the first composite editing object can be improved while ensuring the video processing efficiency.
[0045] In an embodiment of the present disclosure, the steps for determining an average response time for reading and playing each sub-material segment included in a compound segment are as follows: obtaining a response time for each read time node in a preset number of read time nodes to read and play each sub-material segment included in the compound segment; determining a total response time for a preset number of read time nodes based on the response time for each read time node to read and play each sub-material segment included in the compound segment; and determining a ratio of the total response time to the preset number as the average response time.
[0046] In one embodiment of the present disclosure, multiple display time sub-intervals included in the display time interval can also be managed. Optionally, multiple display time sub-intervals can be managed by an LRU (Least Recently Used) strategy; accordingly, the method also includes: in response to the number of multiple sub-material segments included in the composite segment reaching a preset number, obtaining the historical reading time node when each sub-material segment was last read; respectively determining the duration between the reading time node and each historical reading time node, and deleting the display time sub-interval corresponding to the sub-material segment with the longest duration from the display time interval of the composite segment. In the embodiment of the present application, the value of the preset number is not specifically limited. Optionally, the preset number can be 15, 20, 25, etc.
[0047] S202: If the read time node is within the presentation time interval of the composite segment, each sub-material segment included in the composite segment is read and played through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment.
[0048] For example, Figure 6 As shown, the sub-engine module at least includes a sub-video reading module and a sub-image reading module; accordingly, through the sub-engine modules in the engine layer and the display time sub-intervals of each sub-material segment, each sub-material segment included in the composite segment is read and played, including: for each sub-material segment, if the reading time node is within the display time sub-interval of the sub-material segment, the type of the sub-material segment is obtained; if the type of the sub-material segment is an image type, the sub-material segment is read and played through the sub-image reading module; if the type of the sub-material segment is a video type, the sub-material segment is read and played through the sub-video reading module.
[0049] For example, see Figure 6 , the sub-engine module also includes a sub-sub-engine module, and the sub-sub-engine module includes a sub-sub-video reading module and a sub-sub-image reading module; accordingly, the method also includes: if the sub-material segment includes multiple sub-sub-material segments, it is determined that the sub-material segment is a compound segment class, then the type of each sub-sub-material segment is obtained, if the type of the sub-sub-material segment is an image class, the sub-sub-material segment is read and played through the sub-sub-video reading module; if the type of the sub-sub-material segment is a video class, the sub-sub-material segment is read and played through the sub-sub-video reading module.
[0050] It should be noted that the engine layer also includes a video reading module and an image reading module. Among them, the video reading module, the image reading module and the sub-engine module are three parallel modules. In this case, the method also includes: if the material segment is a video segment, if the reading time node is within the display time interval of the video segment, then the video segment is read and played through the video reading module; and / or, if the material segment is an image segment, if the reading time node is within the display time interval of the image segment, then the image segment is read and played through the image reading module.
[0051] It should be noted that the sub-engine module is an independent engine module that can implement audio and video related processing such as decoding, special effect processing, rendering, etc. In this way, the sub-engine module can read the composite editing object and output the corresponding audio or video frame.
[0052] Exemplarily, the sequence reading module may implement relevant protocols of the Reader interface, for example, getNextVideoFrame protocol, getSeekFrame protocol, and the like.
[0053] The disclosed embodiment provides a video preview method: obtaining the current read time node of the video read line; and obtaining the track information of multiple material clips included in the video, wherein the track information includes the display time interval of the material clip, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip; if the read time node is within the display time interval of the composite clip, then through the sub-engine module in the engine layer and the display time sub-interval of each sub-material clip, read and play each sub-material clip included in the composite clip. Since each sub-material clip included in the composite clip can be directly read and played through the sub-engine module in the engine layer, the time length of reading multiple material clips is reduced, and the situation of video playback jamming is avoided, thereby improving the preview effect of the video.
[0054] Figure 7 This is a structural block diagram of a video preview device provided by an embodiment of the present disclosure. Figure 7 The device includes: an acquisition module 701 and a reading module 702.
[0055] The acquisition module 701 is used to acquire the current read time node of the video read line; and acquire the track information of multiple material clips included in the video, wherein the track information includes the display time interval of the material clips, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip;
[0056] The reading module 702 is used to read and play each sub-material segment included in the compound segment through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment if the reading time node is within the presentation time interval of the compound segment.
[0057] According to one or more embodiments of the present disclosure, the sub-engine module at least includes a sub-video reading module and a sub-image reading module; accordingly, the reading module 702 reads and plays each sub-material segment included in the composite segment through the sub-engine modules in the engine layer and the display time sub-intervals of each sub-material segment, specifically including: for each sub-material segment, if the reading time node is within the display time sub-interval of the sub-material segment, the type of the sub-material segment is obtained; if the type of the sub-material segment is an image type, the sub-material segment is read and played through the sub-image reading module; if the type of the sub-material segment is a video type, the sub-material segment is read and played through the sub-video reading module.
[0058] According to one or more embodiments of the present disclosure, the sub-engine module also includes a sub-sub-engine module, and the sub-sub-engine module includes a sub-sub-video reading module and a sub-sub-image reading module; accordingly, the reading module 702 is also used for, if the sub-material segment includes multiple sub-sub-material segments and it is determined that the sub-material segment is a compound segment class, then obtaining the type of each of the sub-sub-material segments; if the type of the sub-sub-material segment is an image class, then reading and playing the sub-sub-material segment through the sub-sub-video reading module; if the type of the sub-sub-material segment is a video class, then reading and playing the sub-sub-material segment through the sub-sub-video reading module.
[0059] According to one or more embodiments of the present disclosure, the engine layer also includes a video reading module and an image reading module; the reading module 702 is also used for reading and playing the video clip through the video reading module if the material clip is a video clip and the reading time node is within the display time interval of the video clip; and / or, the material clip is an image clip and the image clip is read and played through the image reading module if the reading time node is within the display time interval of the image clip.
[0060] According to one or more embodiments of the present disclosure, the acquisition module 701 acquires the current read time node of the video read line, specifically including: in response to receiving a preview operation of the video, acquiring a first preset frame rate for previewing the video; moving the read time node corresponding to the video read line according to the first preset frame rate to acquire the current read time node of the video read line.
[0061] According to one or more embodiments of the present disclosure, the device also includes: an adjustment module; the adjustment module is used to determine the average response time of reading and playing each sub-material segment included in the composite segment; if the average response time is greater than or equal to a first preset time, the first preset frame rate is reduced to a second preset frame rate; if the average response time is less than or equal to the second preset time, the first preset frame rate is increased to a third preset frame rate; wherein the first preset time is greater than the second preset time.
[0062] According to one or more embodiments of the present disclosure, the adjustment module determines the average response time for reading and playing each sub-material segment included in the compound segment, specifically including: obtaining the response time for reading and playing each sub-material segment included in the compound segment at each reading time node in a preset number of reading time nodes; determining the total response time of the preset number of reading time nodes according to the response time for reading and playing each sub-material segment included in the compound segment at each reading time node; and determining the ratio of the total response time to the preset number as the average response time.
[0063] According to one or more embodiments of the present disclosure, the device also includes: a deletion module; the deletion module is used to obtain the historical reading time node when each sub-material segment was last read in response to the number of multiple sub-material segments included in the composite segment reaching a preset number; determine the duration between the reading time node and each historical reading time node respectively, and delete the display time sub-interval corresponding to the sub-material segment with the largest duration from the display time interval of the composite segment.
[0064] refer to Figure 8, which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure, and the electronic device 800 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0065] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0066] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0067] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0068] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0069] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0070] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0071] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0072] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0073] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0074] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0075] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0076] In a first aspect, according to one or more embodiments of the present disclosure, a video preview method is provided, comprising:
[0077] Acquire the current read time node of the video read line; and acquire the track information of the multiple material clips included in the video, wherein the track information includes the display time interval of the material clips, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip;
[0078] If the read time node is within the presentation time interval of the compound segment, each sub-material segment included in the compound segment is read and played through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment.
[0079] According to one or more embodiments of the present disclosure, the sub-engine module at least includes a sub-video reading module and a sub-image reading module; accordingly, the sub-engine modules in the engine layer and the display time sub-intervals of the sub-material segments are used to read and play the sub-material segments included in the composite segment, including: for each sub-material segment, if the reading time node is within the display time sub-interval of the sub-material segment, the type of the sub-material segment is obtained; if the type of the sub-material segment is an image type, the sub-material segment is read and played through the sub-image reading module; if the type of the sub-material segment is a video type, the sub-material segment is read and played through the sub-video reading module.
[0080] According to one or more embodiments of the present disclosure, the sub-engine module also includes a sub-sub-engine module, and the sub-sub-engine module includes a sub-sub-video reading module and a sub-sub-image reading module; accordingly, the method also includes: if the sub-material segment includes multiple sub-sub-material segments, it is determined that the sub-material segment is a compound segment class, then the type of each of the sub-sub-material segments is obtained, and if the type of the sub-sub-material segment is an image class, the sub-sub-material segment is read and played through the sub-sub-video reading module; if the type of the sub-sub-material segment is a video class, the sub-sub-material segment is read and played through the sub-sub-video reading module.
[0081] According to one or more embodiments of the present disclosure, the engine layer also includes a video reading module and an image reading module; the method also includes: if the material segment is a video segment, and the reading time node is within the display time interval of the video segment, the video segment is read and played by the video reading module; and / or, if the material segment is an image segment, and the reading time node is within the display time interval of the image segment, the image segment is read and played by the image reading module.
[0082] According to one or more embodiments of the present disclosure, obtaining the current read time node of the video read line includes: in response to receiving a preview operation of the video, obtaining a first preset frame rate for previewing the video; moving the read time node corresponding to the video read line according to the first preset frame rate to obtain the current read time node of the video read line.
[0083] According to one or more embodiments of the present disclosure, it also includes: determining the average response time of reading and playing each sub-material segment included in the composite segment; if the average response time is greater than or equal to a first preset time, reducing the first preset frame rate to a second preset frame rate; if the average response time is less than or equal to the second preset time, increasing the first preset frame rate to a third preset frame rate; wherein the first preset time is greater than the second preset time.
[0084] According to one or more embodiments of the present disclosure, determining the average response time for reading and playing each sub-material segment included in the compound segment includes: obtaining the response time for each reading time node in a preset number of reading time nodes to read and play each sub-material segment included in the compound segment; determining the total response time of the preset number of reading time nodes according to the response time for reading and playing each sub-material segment included in the compound segment at each reading time node; and determining the ratio of the total response time to the preset number as the average response time.
[0085] According to one or more embodiments of the present disclosure, it also includes: in response to the number of multiple sub-material segments included in the composite segment reaching a preset number, obtaining the historical reading time node when each sub-material segment was last read; respectively determining the duration between the reading time node and each historical reading time node, and deleting the display time sub-interval corresponding to the sub-material segment with the largest duration from the display time interval of the composite segment.
[0086] In a second aspect, according to one or more embodiments of the present disclosure, a video preview device is provided, comprising:
[0087] an acquisition module, configured to acquire a current read time node of a video read line; and to acquire track information of a plurality of material clips included in the video, wherein the track information includes a display time interval of the material clips, wherein the plurality of material clips include at least one composite clip, the composite clip includes a plurality of sub-material clips, and the display time interval of the composite clip includes a plurality of display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip;
[0088] The reading module is used to read and play each sub-material segment included in the compound segment through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment if the reading time node is within the presentation time interval of the compound segment.
[0089] According to one or more embodiments of the present disclosure, the sub-engine module at least includes a sub-video reading module and a sub-image reading module; accordingly, the reading module reads and plays each sub-material segment included in the composite segment through the sub-engine modules in the engine layer and the display time sub-intervals of each sub-material segment, specifically including: for each sub-material segment, if the reading time node is within the display time sub-interval of the sub-material segment, the type of the sub-material segment is obtained; if the type of the sub-material segment is an image type, the sub-material segment is read and played through the sub-image reading module; if the type of the sub-material segment is a video type, the sub-material segment is read and played through the sub-video reading module.
[0090] According to one or more embodiments of the present disclosure, the sub-engine module also includes a sub-sub-engine module, and the sub-sub-engine module includes a sub-sub-video reading module and a sub-sub-image reading module; accordingly, the reading module is also used to, if the sub-material segment includes multiple sub-sub-material segments and it is determined that the sub-material segment is a compound segment class, obtain the type of each of the sub-sub-material segments, and if the type of the sub-sub-material segment is an image class, read and play the sub-sub-material segment through the sub-sub-video reading module; if the type of the sub-sub-material segment is a video class, read and play the sub-sub-material segment through the sub-sub-video reading module.
[0091] According to one or more embodiments of the present disclosure, the engine layer also includes a video reading module and an image reading module; the reading module is also used for, when the material segment is a video segment, if the reading time node is within the display time interval of the video segment, then the video segment is read and played by the video reading module; and / or, when the material segment is an image segment, if the reading time node is within the display time interval of the image segment, then the image segment is read and played by the image reading module.
[0092] According to one or more embodiments of the present disclosure, the acquisition module acquires the current read time node of the video read line, specifically including: in response to receiving a preview operation of the video, acquiring a first preset frame rate for previewing the video; moving the read time node corresponding to the video read line according to the first preset frame rate to acquire the current read time node of the video read line.
[0093] According to one or more embodiments of the present disclosure, the device also includes: an adjustment module; the adjustment module is used to determine the average response time of reading and playing each sub-material segment included in the composite segment; if the average response time is greater than or equal to a first preset time, the first preset frame rate is reduced to a second preset frame rate; if the average response time is less than or equal to the second preset time, the first preset frame rate is increased to a third preset frame rate; wherein the first preset time is greater than the second preset time.
[0094] According to one or more embodiments of the present disclosure, the adjustment module determines the average response time for reading and playing each sub-material segment included in the compound segment, specifically including: obtaining the response time for reading and playing each sub-material segment included in the compound segment at each reading time node in a preset number of reading time nodes; determining the total response time of the preset number of reading time nodes according to the response time for reading and playing each sub-material segment included in the compound segment at each reading time node; and determining the ratio of the total response time to the preset number as the average response time.
[0095] According to one or more embodiments of the present disclosure, the device also includes: a deletion module; the deletion module is used to obtain the historical reading time node when each sub-material segment was last read in response to the number of multiple sub-material segments included in the composite segment reaching a preset number; determine the duration between the reading time node and each historical reading time node respectively, and delete the display time sub-interval corresponding to the sub-material segment with the largest duration from the display time interval of the composite segment.
[0096] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0097] The memory stores computer-executable instructions;
[0098] The processor executes the computer-executable instructions stored in the memory to implement the video preview method as described in the first aspect and various possible designs of the first aspect.
[0099] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the video preview method described in the first aspect and various possible designs of the first aspect is implemented.
[0100] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the video preview method as described in the first aspect and various possible designs of the first aspect.
[0101] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0102] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0103] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A video preview method, characterized in that: include: Acquire the current read time node of the video read line; and acquire the track information of the multiple material clips included in the video, wherein the track information includes the display time interval of the material clips, wherein the multiple material clips include at least one composite clip, the composite clip includes multiple sub-material clips, and the display time interval of the composite clip includes multiple display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip; If the read time node is within the presentation time interval of the compound segment, each sub-material segment included in the compound segment is read and played through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment.
2. The method according to claim 1, characterized in that The sub-engine module at least includes a sub-video reading module and a sub-image reading module; Accordingly, reading and playing each sub-material segment included in the composite segment through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment includes: For each sub-material segment, if the read time node is within the presentation time sub-interval of the sub-material segment, obtaining the type of the sub-material segment; If the type of the sub-material segment is an image, the sub-material segment is read and played by a sub-image reading module; if the type of the sub-material segment is a video, the sub-material segment is read and played by a sub-video reading module.
3. The method according to claim 2, characterized in that The sub-engine module further includes a sub-sub-engine module, and the sub-sub-engine module includes a sub-sub-video reading module and a sub-sub-image reading module; accordingly, the method further includes: If the sub-material segment includes multiple sub-sub-material segments, it is determined that the sub-material segment is a compound segment type, then the type of each of the sub-sub-material segments is obtained, and if the type of the sub-sub-material segment is an image type, the sub-sub-material segment is read and played through a sub-sub-video reading module; if the type of the sub-sub-material segment is a video type, the sub-sub-material segment is read and played through a sub-sub-video reading module.
4. The method according to claim 1, characterized in that The engine layer also includes a video reading module and an image reading module; the method also includes: The material segment is a video segment, and if the reading time node is within the display time interval of the video segment, the video segment is read and played by the video reading module; and / or, The material segment is an image segment. If the reading time node is within the display time interval of the image segment, the image segment is read and played through the image reading module.
5. The method according to claim 1, characterized in that The step of obtaining the current reading time node of the video reading line includes: In response to receiving a preview operation of a video, obtaining a first preset frame rate for previewing the video; The read time node corresponding to the video read line is moved according to the first preset frame rate to obtain the current read time node of the video read line.
6. The method according to claim 5, characterized in that Also includes: Determining an average response time for reading and playing each sub-material segment included in the composite segment; If the average response time is greater than or equal to the first preset duration, the first preset frame rate is reduced to a second preset frame rate; if the average response time is less than or equal to the second preset duration, the first preset frame rate is increased to a third preset frame rate; Among them, the first preset time length is greater than the second preset time length.
7. The method according to claim 6, characterized in that The step of determining an average response time for reading and playing each sub-material segment included in the composite segment includes: Obtaining a response time length of each reading time node among a preset number of reading time nodes for reading and playing each sub-material segment included in the composite segment; Determine the total response time of the preset number of reading time nodes according to the response time of reading and playing each sub-material segment included in the composite segment at each reading time node; The ratio of the total response time to the preset number is determined as the average response time.
8. The method according to any one of claims 1 to 7, characterized in that: Also includes: In response to the number of the plurality of sub-material segments included in the composite segment reaching a preset number, obtaining a historical reading time node at which each sub-material segment was last read; The durations between the read time node and each historical read time node are respectively determined, and the presentation time sub-interval corresponding to the sub-material segment with the largest duration is deleted from the presentation time interval of the composite segment.
9. A video preview device, characterized in that: include: an acquisition module, configured to acquire a current read time node of a video read line; and to acquire track information of a plurality of material clips included in the video, wherein the track information includes a display time interval of the material clips, wherein the plurality of material clips include at least one composite clip, the composite clip includes a plurality of sub-material clips, and the display time interval of the composite clip includes a plurality of display time sub-intervals, and one display time sub-interval corresponds to one sub-material clip; The reading module is used to read and play each sub-material segment included in the compound segment through the sub-engine module in the engine layer and the presentation time sub-interval of each sub-material segment if the reading time node is within the presentation time interval of the compound segment.
10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the video preview method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the video preview method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the video preview method according to any one of claims 1 to 8.