Video fast forward method and device based on frame screenshot, equipment and storage medium
Through video content similarity analysis and subtitle superposition technology, the problem of subtitles not matching the video is solved, and the subtitles and plot are displayed simultaneously when the video is fast forwarded, improving the user experience.
Patent Information
- Application Number
- CN202410821365.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-20
AI Technical Summary
In the existing video fast-forward technology, the subtitles and the video playback speed are not synchronized, resulting in a mismatch between the subtitles and the plot, which easily causes the user to miss the picture and plot.
By receiving the user's video fast-forward instruction, video frames within a preset time period are obtained, video content similarity analysis is performed, key frames are determined, and subtitles are obtained and superimposed when the similarity meets the threshold to ensure that subtitles and video frames are displayed synchronously.
It realizes the matching of subtitles and plot during fast playback, preventing users from missing important content and improving user experience.
Smart Images

Figure CN118678151A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video playback technology, and in particular to a video fast-forward method, device, equipment and storage medium based on frame screenshot. Background Art
[0002] When users watch a long video, they may want to skip some parts to save time. In addition, in some cases, users may just want to quickly preview the content of the video to determine whether it is worth spending more time watching the entire video.
[0003] However, in the existing technical solutions for fast-forwarding videos, the solution for displaying subtitles through synchronous fast-forwarding has the problem that the subtitle display speed is not synchronized with the video playback speed, and the solution for displaying subtitles statically has the problem that the subtitles are not synchronized with the video content.
[0004] Therefore, in the existing technical solutions for fast-forwarding videos, there is a problem of mismatch between subtitles and plots, which easily causes the phenomenon of missing the plot after the picture flashes. Summary of the invention
[0005] The present invention provides a video fast-forward method, device, equipment and storage medium based on frame screenshot.
[0006] According to a first aspect of the present disclosure, a video fast-forward method based on frame screenshot is provided, the method comprising:
[0007] Receive a video fast-forward instruction from the user;
[0008] Based on the video fast-forward instruction, obtain the video frames within the corresponding preset time period;
[0009] Performing video content similarity analysis on video frames within a preset time period, determining similarity between video frames corresponding to a first time period and video frames corresponding to a second time period within the preset time period, or determining similarity between multiple segments within the preset time period, and determining the corresponding current key frame;
[0010] When the similarity meets a preset threshold, the subtitles corresponding to the video frames within a preset time period are obtained;
[0011] The obtained subtitles are superimposed on the current key frame for display.
[0012] In some implementations of the first aspect, performing video content similarity analysis on video frames within a preset time period to determine similarity between video frames corresponding to a first time period and video frames corresponding to a second time period within the preset time period includes:
[0013] Based on the pixel intensity distribution of M adjacent frames in the video frames within the preset time period, or based on the motion vectors of the pixels of the image sequence of M adjacent frames in the video frames within the preset time period, or based on the square mean of the pixel difference values on the RGB three-color components of M adjacent frames in the video frames within the preset time period, the similarity between the video frames corresponding to the first time period and the video frames corresponding to the second time period within the preset time period is determined.
[0014] In some implementations of the first aspect, obtaining subtitles corresponding to video frames within a preset time period includes:
[0015] When there is no corresponding subtitle file for the video frames within the preset time period, performing text recognition on the video frames within the preset time period to obtain corresponding subtitles;
[0016] When the video frames within the preset time period have corresponding subtitle files, the corresponding subtitles are obtained from the subtitle files corresponding to the video frames within the preset time period.
[0017] In some implementations of the first aspect, superimposing the acquired subtitles on the current key frame for display includes:
[0018] When the number of characters corresponding to the acquired subtitles is less than or equal to the character threshold corresponding to the current key frame, the acquired subtitles are superimposed on the current key frame for display;
[0019] When the number of characters corresponding to the acquired subtitles is greater than the character threshold corresponding to the current key frame, the acquired subtitles are segmented, and the segmented subtitles are independently superimposed in the current key frame for display, so that the number of characters corresponding to the subtitles superimposed and displayed in the current key frame is less than or equal to the character threshold corresponding to the current key frame.
[0020] In some implementations of the first aspect, when the fast-forward speed corresponding to the user's video fast-forward instruction is in a first speed range, the character threshold is the first threshold;
[0021] When the fast-forward speed corresponding to the user's video fast-forward instruction is in the second speed range, the character threshold is the second threshold;
[0022] When the fast-forward speed corresponding to the user's video fast-forward instruction is in the third speed range, the character threshold is the third threshold.
[0023] In some implementations of the first aspect, when the fast-forward speed corresponding to the user's video fast-forward instruction is in a third speed range, the target verb in the subtitle and the noun corresponding to the video whose relevance meets preset conditions are dynamically highlighted.
[0024] In some implementations of the first aspect, when the similarity of the content of video frames within multiple consecutive preset time periods meets a preset threshold, and the similarity of the corresponding current key frames meets a preset key frame similarity condition, subsequent wonderful content frames are superimposed on the corresponding current key frames within multiple consecutive preset time periods.
[0025] In some implementations of the first aspect, the video fast-forward method based on frame screenshot further includes:
[0026] Determine the similarity of multiple segments within a preset time period and determine the corresponding current key frame;
[0027] When the similarity of the multiple segments meets a preset threshold, the subtitles corresponding to the video frames within a preset time period are obtained;
[0028] The obtained subtitles are superimposed on the current key frame for display.
[0029] According to a second aspect of the present disclosure, a video fast-forwarding device based on frame screenshot is provided, the device comprising:
[0030] A receiving module, used for receiving a video fast-forward instruction from a user;
[0031] An acquisition module, used to acquire video frames within a corresponding preset time period based on a video fast-forward instruction;
[0032] A processing module, configured to perform video content similarity analysis on video frames within a preset time period, determine the similarity between the content of a video frame corresponding to a first time period within the preset time period and the content of a video frame corresponding to a second time period within the preset time period, or determine the similarity of multiple segments within the preset time period, and determine a current key frame;
[0033] The acquisition module is further used to acquire the subtitles corresponding to the video frames within a preset time period when the similarity meets a preset threshold;
[0034] The display module is used to overlay the acquired subtitles on the current key frame for display.
[0035] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device comprising: a memory and a processor, wherein a computer program is stored in the memory, and the above method is implemented when the processor executes the program.
[0036] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0037] The present disclosure receives a video fast-forward instruction from a user; then based on the video fast-forward instruction, obtains video frames within a corresponding preset time period; then performs video content similarity analysis on the video frames within the preset time period, determines the similarity between the video frames corresponding to the first time period within the preset time period and the video frames corresponding to the second time period, or determines the similarity of multiple segments within the preset time period, and determines the corresponding current key frame; when the similarity meets a preset threshold, obtains the subtitles corresponding to the video frames within the preset time period; superimposes the obtained subtitles on the current key frame for display. The present disclosure analyzes the video frames, can statically display similar video frames, and superimposes complete subtitles, so that during fast playback, the subtitles match the plot and the user will not miss the scene or the plot.
[0038] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:
[0040] Figure 1 A schematic flow chart of a video fast-forward method based on frame screenshot according to an embodiment of the present disclosure is shown;
[0041] Figure 2 A structural block diagram of a video fast-forward device based on frame capture according to an embodiment of the present disclosure is shown;
[0042] Figure 3 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0043] 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.
[0044] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0045] In the present disclosure, in order to solve the above technical problems, a video fast-forward instruction from a user is received; then based on the video fast-forward instruction, video frames within a corresponding preset time period are obtained; then video content similarity analysis is performed on the video frames within the preset time period to determine the similarity between the video frames corresponding to the first time period within the preset time period and the video frames corresponding to the second time period, or the similarity between multiple segments within the preset time period is determined, and the corresponding current key frame is determined; when the similarity meets a preset threshold, subtitles corresponding to the video frames within the preset time period are obtained; and the obtained subtitles are superimposed on the current key frame for display. By analyzing the video frames, the present disclosure can statically display similar video frames and superimpose complete subtitles, so that during fast playback, the subtitles match the plot and the user will not miss the picture or the plot.
[0046] Figure 1 A schematic diagram of a process of a video fast-forward method based on frame screenshots provided according to an embodiment of the present disclosure is shown, such as Figure 1 As shown, the video fast-forward method 100 based on frame capture may include:
[0047] S101, receiving a video fast-forward instruction from a user.
[0048] The video fast-forward instruction may be, for example, a video fast-forward instruction triggered by a user's fast-forward operation on the screen, such as an instruction to fast-forward the video by 5 seconds, 10 seconds, or double the speed.
[0049] S102, based on the video fast-forward instruction, obtaining video frames corresponding to a preset time period.
[0050] S103, performing video content similarity analysis on the video frames within the preset time period, determining the similarity between the video frames corresponding to the first time period and the video frames corresponding to the second time period within the preset time period, or determining the similarity of multiple segments within the preset time period, and determining the corresponding current key frame.
[0051] In some embodiments, performing video content similarity analysis on video frames within a preset time period to determine the similarity between video frames corresponding to a first time period and video frames corresponding to a second time period within the preset time period may include:
[0052] Based on the pixel intensity distribution of M adjacent frames in the video frames within the preset time period, or based on the motion vectors of the pixels of the image sequence of M adjacent frames in the video frames within the preset time period, or based on the square mean of the pixel difference values on the RGB three-color components of M adjacent frames in the video frames within the preset time period, the similarity between the video frames corresponding to the first time period and the video frames corresponding to the second time period within the preset time period is determined.
[0053] In some embodiments, the video fast-forward method based on frame screenshot may further include:
[0054] Determine the similarity of multiple segments within a preset time period, and determine the corresponding current key frame; wherein the segment may be a segment selected according to a preset time interval within the preset time period;
[0055] When the similarity of the multiple segments meets a preset threshold, the subtitles corresponding to the video frames within a preset time period are obtained;
[0056] The obtained subtitles are superimposed on the current key frame for display.
[0057] The above process of determining similarity can also use convolutional neural networks to extract features, extract features from images through deep learning models, and then determine the similarity of video frames. Cosine similarity can also be used to measure the similarity by comparing the angle between the corresponding vectors of two video frames. The smaller the angle, the closer the cosine value is to 1, indicating that the similarity is higher.
[0058] That is to say, in the process of determining the similarity, the similarity of multiple segments within a preset time period can also be determined, so as to obtain the subtitles corresponding to the video frames within the preset time period based on the similarity of the multiple segments, and superimpose the obtained subtitles on the current key frame for accurate display.
[0059] S104: When the similarity meets a preset threshold, the subtitles corresponding to the video frames within a preset time period are obtained.
[0060] The preset threshold can be specifically determined by factors such as the source size, frame rate, definition, encoding format, and performance of the hardware device.
[0061] In some embodiments, obtaining subtitles corresponding to video frames within a preset time period includes:
[0062] When there is no corresponding subtitle file for the video frames within the preset time period, performing text recognition on the video frames within the preset time period to obtain corresponding subtitles, wherein the text recognition may be performed using optical character recognition (OCR), for example;
[0063] When the video frames within the preset time period have corresponding subtitle files, the corresponding subtitles are obtained from the subtitle files corresponding to the video frames within the preset time period.
[0064] In the above embodiment, the corresponding subtitles are obtained by recognizing text or obtaining the corresponding subtitles from a subtitle file, thereby accurately and comprehensively obtaining the subtitles.
[0065] S105: Overlay the acquired subtitles on the current key frame for display.
[0066] In some embodiments, considering that there may be too many characters corresponding to the subtitles to be fully displayed in the current key frame at one time, the above-mentioned superimposing the obtained subtitles in the current key frame for display may include:
[0067] When the number of characters corresponding to the acquired subtitles is less than or equal to the character threshold corresponding to the current key frame, the acquired subtitles are superimposed on the current key frame for display;
[0068] When the number of characters corresponding to the acquired subtitles is greater than the character threshold corresponding to the current key frame, the acquired subtitles are segmented, and the segmented subtitles are independently superimposed in the current key frame for display, so that the number of characters corresponding to the subtitles superimposed and displayed in the current key frame is less than or equal to the character threshold corresponding to the current key frame. In addition, the maximum number of lines of subtitles displayed in the display area can be limited to make the display more reasonable.
[0069] In the above embodiment, the number of characters corresponding to the subtitles is judged. When the number of characters is less than or equal to the character threshold corresponding to the current key frame, they are directly superimposed and displayed. When the number of characters is greater than the character threshold corresponding to the current key frame, the obtained subtitles are segmented and displayed in the current key frame in batches, so that the number of characters corresponding to the subtitles can be displayed completely and reasonably in the current key frame.
[0070] In some embodiments, considering that different fast-forward speeds result in different numbers of characters that a user can actually read in a current key frame, when the fast-forward speed corresponding to the user's video fast-forward instruction is in a first speed range, the character threshold may be the first threshold;
[0071] When the fast-forward speed corresponding to the user's video fast-forward instruction is in the second speed range, the character threshold may be the second threshold;
[0072] When the fast-forward speed corresponding to the user's video fast-forward instruction is in the third speed range, the character threshold may be the third threshold.
[0073] In the above embodiment, by dividing the character thresholds corresponding to different fast-forward speeds, the number of characters that the user can actually read in the current key frame can be reasonably set for different fast-forward speeds, making the user experience more friendly.
[0074] In some embodiments, the third speed interval may be considered as a faster speed interval because people have limited ability to recognize rapidly updated subtitles. Therefore, when the fast-forward speed corresponding to the user's video fast-forward instruction is in the third speed interval, the target verbs in the subtitles and the nouns corresponding to the video whose relevance meets preset conditions may be dynamically highlighted to increase the user's attention.
[0075] For example, a lyrical clip is being played, but the fast-forward speed is a bit fast. People have limited ability to recognize rapidly updated subtitles, which may cause users to miss some keywords. In this case, some verbs, place names, and character names corresponding to the clip can be dynamically highlighted to increase user attention and ensure that users do not miss the pictures and plots.
[0076] In the above embodiment, by determining that the fast-forward speed is in the third speed range, the display effect of some related words in the segment is increased, thereby increasing the user's attention when the fast-forward speed is too fast, ensuring that the user does not miss the picture and the plot.
[0077] In the process of S101-S105, by analyzing the video frames, similar video frames can be displayed statically and complete subtitles can be superimposed so that during fast playback, the subtitles match the plot and the user will not miss the pictures and the plot.
[0078] In some embodiments, considering that the similarity of the content of video frames within a plurality of consecutive preset time periods meets a preset threshold, the user experience may be reduced due to the long static time of the screen. For example, the screen is static for up to 6 seconds, and only the subtitles are updated. The user's attention will be diverted because the screen content has not changed, and the user experience will be reduced. Therefore, when the similarity of the content of video frames within a plurality of consecutive preset time periods meets the preset threshold, and the similarity of the corresponding current key frame meets the preset key frame similarity condition, the subsequent wonderful content frames can be superimposed on the corresponding current key frame within a plurality of consecutive preset time periods to improve the user experience.
[0079] In the above embodiment, when the similarity of the content of video frames within multiple consecutive preset time periods meets a preset threshold, subsequent wonderful content frames are superimposed on the current key frame, thereby preventing the picture from remaining unchanged for a long time, causing the user's attention to be diverted, thereby improving the user experience and preventing the user from missing the picture and the plot.
[0080] The above is an introduction to the method embodiment. The following is a further explanation of the disclosed solution through an apparatus embodiment.
[0081] Figure 2 A structural block diagram of a video fast-forward device based on frame capture according to an embodiment of the present disclosure is shown.
[0082] like Figure 2 As shown, the video fast-forward device 200 based on frame capture may include:
[0083] Receiving module 201, used for receiving a video fast-forward instruction from a user;
[0084] An acquisition module 202 is used to acquire video frames within a corresponding preset time period based on a video fast-forward instruction;
[0085] The processing module 203 is used to perform video content similarity analysis on the video frames within the preset time period, determine the similarity between the content of the video frame corresponding to the first time period within the preset time period and the content of the video frame corresponding to the second time period, or determine the similarity of multiple segments within the preset time period, and determine the current key frame;
[0086] The acquisition module 202 is further configured to acquire subtitles corresponding to video frames within a preset time period when the similarity meets a preset threshold;
[0087] The display module 204 is used to overlay the acquired subtitles on the current key frame for display.
[0088] In some embodiments, performing video content similarity analysis on video frames within a preset time period to determine the similarity between video frames corresponding to a first time period and video frames corresponding to a second time period within the preset time period includes:
[0089] Based on the pixel intensity distribution of M adjacent frames in the video frames within the preset time period, or based on the motion vectors of the pixels of the image sequence of M adjacent frames in the video frames within the preset time period, or based on the square mean of the pixel difference values on the RGB three-color components of M adjacent frames in the video frames within the preset time period, the similarity between the video frames corresponding to the first time period and the video frames corresponding to the second time period within the preset time period is determined.
[0090] In some embodiments, obtaining subtitles corresponding to video frames within a preset time period includes:
[0091] When there is no corresponding subtitle file for the video frames within the preset time period, performing text recognition on the video frames within the preset time period to obtain corresponding subtitles;
[0092] When the video frames within the preset time period have corresponding subtitle files, the corresponding subtitles are obtained from the subtitle files corresponding to the video frames within the preset time period.
[0093] In some embodiments, the acquired subtitles are superimposed on the current key frame for display, including:
[0094] When the number of characters corresponding to the acquired subtitles is less than or equal to the character threshold corresponding to the current key frame, the acquired subtitles are superimposed on the current key frame for display;
[0095] When the number of characters corresponding to the acquired subtitles is greater than the character threshold corresponding to the current key frame, the acquired subtitles are segmented, and the segmented subtitles are independently superimposed in the current key frame for display, so that the number of characters corresponding to the subtitles superimposed and displayed in the current key frame is less than or equal to the character threshold corresponding to the current key frame.
[0096] In some embodiments, when the fast-forward speed corresponding to the user's video fast-forward instruction is in the first speed range, the character threshold is the first threshold;
[0097] When the fast-forward speed corresponding to the user's video fast-forward instruction is in the second speed range, the character threshold is the second threshold;
[0098] When the fast-forward speed corresponding to the user's video fast-forward instruction is in the third speed range, the character threshold is the third threshold.
[0099] In some embodiments, when the fast-forward speed corresponding to the user's video fast-forward instruction is in the third speed range, the target verb in the subtitle and the noun corresponding to the video whose relevance meets the preset conditions are dynamically highlighted.
[0100] In some embodiments, when the similarity of the content of video frames within multiple consecutive preset time periods meets a preset threshold, and the similarity of the corresponding current key frames meets a preset key frame similarity condition, subsequent wonderful content frames are superimposed on the corresponding current key frames within multiple consecutive preset time periods.
[0101] In some embodiments, the processing module may also be used to determine the similarity of multiple segments within a preset time period and determine the corresponding current key frame;
[0102] The acquisition module can also be used to acquire subtitles corresponding to video frames within a preset time period when the similarity of multiple segments meets a preset threshold;
[0103] The display module can also be used to overlay the acquired subtitles on the current key frame for display.
[0104] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0106] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0107] Figure 3 A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0108] The device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0109] A number of components in the device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0110] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method 100 described above may be performed.
[0111] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0112] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0113] 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.
[0114] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0115] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0116] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0117] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of this disclosure can be achieved, and this document is not limited here.
[0118] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A video fast-forward method based on frame screenshot, characterized in that: The method comprises: Receive a video fast-forward instruction from the user; Based on the video fast-forward instruction, obtaining video frames within a corresponding preset time period; Performing video content similarity analysis on the video frames within the preset time period to determine the similarity between the video frames corresponding to the first time period and the video frames corresponding to the second time period within the preset time period, or determining the similarity of multiple segments within the preset time period and determining the corresponding current key frame; When the similarity meets a preset threshold, obtaining subtitles corresponding to the video frames within the preset time period; The acquired subtitles are superimposed on the current key frame for display.
2. The method according to claim 1, characterized in that The performing video content similarity analysis on the video frames within the preset time period to determine the similarity between the video frames corresponding to the first time period and the video frames corresponding to the second time period within the preset time period includes: Based on the pixel intensity distribution of M adjacent frames in the video frames within the preset time period, or based on the motion vectors of image sequence pixels of M adjacent frames in the video frames within the preset time period, or based on the square mean of pixel differences on RGB three-color components of M adjacent frames in the video frames within the preset time period, the similarity between the video frames corresponding to the first time period within the preset time period and the video frames corresponding to the second time period within the preset time period is determined.
3. The method according to claim 1, characterized in that The obtaining of subtitles corresponding to the video frames within the preset time period includes: When there is no corresponding subtitle file for the video frames within the preset time period, performing text recognition on the video frames within the preset time period to obtain corresponding subtitles; When the video frames within the preset time period have corresponding subtitle files, the corresponding subtitles are obtained from the subtitle files corresponding to the video frames within the preset time period.
4. The method according to claim 1, characterized in that The step of superimposing the acquired subtitles on the current key frame for display includes: When the number of characters corresponding to the acquired subtitles is less than or equal to the character threshold corresponding to the current key frame, the acquired subtitles are superimposed on the current key frame for display; When the number of characters corresponding to the acquired subtitles is greater than the character threshold corresponding to the current key frame, the acquired subtitles are segmented, and the segmented subtitles are independently superimposed on the current key frame for display, so that the number of characters corresponding to the subtitles superimposed and displayed in the current key frame is less than or equal to the character threshold corresponding to the current key frame.
5. The method according to claim 4, characterized in that When the fast-forward speed corresponding to the video fast-forward instruction of the user is in the first speed range, the character threshold is the first threshold; When the fast-forward speed corresponding to the video fast-forward instruction of the user is in the second speed range, the character threshold is the second threshold; When the fast-forward speed corresponding to the video fast-forward instruction of the user is in the third speed range, the character threshold is the third threshold.
6. The method according to claim 5, characterized in that When the fast-forward speed corresponding to the user's video fast-forward instruction is in the third speed range, the target verb in the subtitle and the noun corresponding to the video whose relevance meets the preset conditions are dynamically highlighted.
7. According to the method of claim 1, when the similarity of the content of video frames within multiple consecutive preset time periods meets a preset threshold, and the similarity of the corresponding current key frames meets a preset key frame similarity condition, subsequent wonderful content frames are superimposed on the corresponding current key frames within multiple consecutive preset time periods.
8. A video fast-forward device based on frame capture, characterized in that: The device comprises: A receiving module, used for receiving a video fast-forward instruction from a user; An acquisition module, used for acquiring video frames within a corresponding preset time period based on the video fast-forward instruction; A processing module, configured to perform video content similarity analysis on the video frames within the preset time period, determine the similarity between the content of the video frame corresponding to the first time period within the preset time period and the content of the video frame corresponding to the second time period within the preset time period, or determine the similarity of multiple segments within the preset time period, and determine the current key frame; The acquisition module is further configured to acquire subtitles corresponding to the video frames within the preset time period when the similarity meets a preset threshold; The display module is used to overlay the acquired subtitles on the current key frame for display.
9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; It is characterized in that the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
Citation Information
Cited By
Video subtitle segmentation method, device and equipment based on semantic segmentation
CN122372767A
