Display device and video thumbnail acquisition method
By only parsing the video stream file in the display device and obtaining key frames, and combining the filtering conditions to determine its effectiveness, the problem of long time-consuming and invalid frames for the FFmpeg program to obtain video thumbnails is solved, and fast and accurate video thumbnails are achieved. Obtain and improve user experience.
Patent Information
- Application Number
- CN202210305730.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-03-24
AI Technical Summary
In the existing technology, it takes a long time for display devices to obtain video thumbnails through the FFmpeg program, and the decoded video thumbnails may be invalid video frames such as black frames or white frames, making it impossible to provide users with effective video identification information.
By only parsing the video stream file when receiving the user's control instructions, the key frames are obtained, and based on the preset filtering conditions, it is judged whether the characteristic value in the key frame is within the threshold to determine whether it is a valid video frame, thus serving as a video abbreviation sketch.
It achieves fast and accurate acquisition of video thumbnails that can provide users with effective video identification information, improving user experience.
Smart Images

Figure CN114710707B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display devices, and in particular to a display device and a method for obtaining a video thumbnail. Background Art
[0002] A display device refers to a terminal device that can output a specific display screen. The display device can store the acquired video file and display a video thumbnail of the video file as a display icon of the video file on the display interface where the storage location is located, so that the user can quickly understand the content of the video file. The display device can also obtain a video thumbnail of the user-specified position in the video progress bar during video playback, so that the user can quickly understand the video content at the user-specified position.
[0003] In the related art, the display device usually obtains the video thumbnail by using the FFmpeg program. The display device usually obtains the video thumbnail by parsing and decoding the entire video file to determine the video thumbnail from the decoded video frame.
[0004] However, in the related art, it takes a long time for the display device to obtain the video thumbnail through the FFmpeg program, and when the display device determines the video thumbnail from the decoded video frame, the video thumbnail may be an invalid video frame such as a black frame or a white frame that cannot provide the user with valid video identification information. Summary of the invention
[0005] The present application provides a display device and a method for obtaining a video thumbnail, so as to solve the problem in the related art that it takes a long time for a display device to obtain a video thumbnail through an FFmpeg program, and when the display device determines a video thumbnail from a decoded video frame, the video thumbnail may be an invalid video frame such as a black frame or a white frame that cannot provide a user with effective video identification information. The application can quickly and accurately obtain a video thumbnail that can provide a user with effective video identification information, thereby improving the user experience.
[0006] In a first aspect, the present application provides a display device, comprising: a display; configured to display a video thumbnail; a controller, configured to: receive a first control instruction sent by a user for obtaining a video thumbnail in a video file; in response to the first control instruction, obtain a video stream file according to a first identifier, the video stream file being parsed from the video file; the video stream file includes at least one key frame; the first identifier is used to characterize that the video stream file is parseable; decode the key frame to obtain a decoded key frame; the key frame is a category of a video frame obtained by decoding the video stream file; determine whether the key frame meets a first filtering condition, the first filtering condition being used to determine whether a probability value of a feature value in the key frame is within a preset threshold; if the key frame meets the first filtering condition, determine the key frame as a video thumbnail.
[0007] In the second aspect, the present application also provides a method for obtaining a video thumbnail, including: obtaining a video stream file according to a first identifier, the video stream file is parsed from a video file; the video stream file includes at least one key frame; the first identifier is used to characterize that the video stream file can be parsed; decoding the key frame to obtain a decoded key frame; the key frame is a category of a video frame obtained by decoding the video stream file; judging whether the key frame meets a first filtering condition, the first filtering condition is used to determine whether the probability value of a feature value in the key frame is within a preset threshold; if the key frame meets the first filtering condition, determining the key frame as a video thumbnail.
[0008] It can be seen from the above technical solutions that the display device and video thumbnail acquisition method provided by the present application can only parse the video stream file when receiving the first control instruction sent by the user for obtaining the video thumbnail in the video file, thereby reducing the time consumption of the parsing process, and decode the key frames of the video stream file after parsing to obtain the key frames as video thumbnails, and at the same time judge whether the probability value of the feature value in the key frame is within the preset threshold according to the first screening condition to determine whether the key frame is an invalid video frame. Therefore, the technical solution shown in the present application can quickly and accurately obtain video thumbnails that can provide effective video identification information to users, thereby improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0010] Figure 1 A schematic diagram showing an operation scenario between a display device and a control apparatus according to some embodiments;
[0011] Figure 2 shows a block diagram of a configuration of a control device 100 according to some embodiments;
[0012] Figure 3 shows a hardware configuration block diagram of a display device 200 according to some embodiments;
[0013] Figure 4 shows a software configuration block diagram of a display device 200 according to some embodiments;
[0014] Figure 5 A schematic diagram showing an application icon control interface display of a display device 200 according to some embodiments is shown;
[0015] Figure 6A schematic diagram of a scene in which a display device displays video thumbnails according to some embodiments is shown;
[0016] Figure 7 A schematic diagram of a scene in which a display device displays video thumbnails according to some other embodiments is shown;
[0017] Figure 8 shows a flow chart of display device configuration according to some embodiments;
[0018] Fig. 9 A schematic diagram showing a scenario in which a display device displays an invalid video frame according to some embodiments;
[0019] Fig.10 shows a flow chart of display device configuration according to some embodiments;
[0020] Fig.11 A schematic diagram of a storage display interface of a display device according to some embodiments is shown;
[0021] Fig.12 A schematic diagram of a storage path of a display device according to some embodiments is shown;
[0022] Fig.13 A schematic diagram showing a decoding process of a video stream file of a display device according to some embodiments is shown;
[0023] Fig.14 A schematic diagram showing a decoding process of a video stream file of a display device according to some embodiments is shown;
[0024] Fig.15 A schematic diagram showing a decoding process of a video stream file of a display device according to some embodiments is shown;
[0025] Fig.16 A schematic diagram of a valid video frame of a display device according to some embodiments is shown;
[0026] Fig.17 A schematic diagram showing a location area where non-abnormal pixels of a display device are formed according to some embodiments;
[0027] Fig.18 A schematic diagram of a scene in which a display device plays a video file according to some embodiments is shown;
[0028] Fig.19 shows a flow chart of display device configuration according to some embodiments;
[0029] Fig. 20 A schematic diagram of a scene in which a display device obtains candidate key frames according to some embodiments is shown. DETAILED DESCRIPTION
[0030] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0031] Based on the exemplary embodiments described in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the claims attached to this application. In addition, although the disclosure in this application is introduced according to one or several exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation method separately. It should be noted that the brief description of the terms in this application is only for the convenience of understanding the implementation methods described below, and is not intended to limit the implementation methods of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0032] The following first explains the professional terms involved in this application.
[0033] FFmpeg is an open source computer program that can be used to record, convert digital audio and video, and convert them into streams. It provides a complete solution for recording, converting and streaming audio and video. FFmpeg can capture images from video capture cards or USB cameras, perform screen recording, convert video formats and video screenshots.
[0034] Figure 1 is a schematic diagram of an operation scenario between a display device and a control device according to one or more embodiments of the present application, such as Figure 1 As shown, the user can operate the display device 200 through the mobile terminal 300 and the control device 100. The control device 100 can be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods to control the display device 200. The user can input user instructions through buttons on the remote controller, voice input, control panel input, etc. to control the display device 200. In some embodiments, a mobile terminal, a tablet computer, a computer, a laptop computer, and other smart devices can also be used to control the display device 200.
[0035] In some embodiments, the mobile terminal 300 can install software applications with the display device 200, and realize connection communication through the network communication protocol to achieve the purpose of one-to-one control operation and data communication. The audio and video content displayed on the mobile terminal 300 can also be transmitted to the display device 200 to realize the synchronous display function. The display device 200 also communicates data with the server 400 through various communication methods. The display device 200 can be allowed to communicate and connect through a local area network (LAN), a wireless local area network (WLAN) and other networks. The server 400 can provide various content and interactions to the display device 200. The display device 200 can be a liquid crystal display, an OLED display, or a projection display device. In addition to providing a broadcast receiving television function, the display device 200 can also provide an intelligent network TV function that provides a computer support function.
[0036] Figure 2 Schematically shows a block diagram of a configuration of the control device 100 according to an exemplary embodiment. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive the user's input operation instructions, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, and play the role of an interactive intermediary between the user and the display device 200. The communication interface 130 is used to communicate with the outside, and includes at least one of a WIFI chip, a Bluetooth module, NFC or an alternative module. The user input / output interface 140 includes at least one of a microphone, a touchpad, a sensor, a button or an alternative module.
[0037] Figure 3 FIG. 2 shows a hardware configuration block diagram of a display device 200 according to an exemplary embodiment. Figure 3The display device 200 shown includes at least one of a tuner 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The controller includes a central processing unit, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output. The display 260 can be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and can also be a projection device and a projection screen. The tuner 210 receives broadcast television signals by wired or wireless reception, and demodulates audio and video signals from multiple wireless or wired broadcast television signals, such as and EPG data signals. The detector 230 is used to collect signals of the external environment or interact with the outside. The controller 250 and the tuner 210 can be located in different split devices, that is, the tuner 210 can also be in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0038] In some embodiments, the controller 250 controls the operation of the display device and responds to the user's operation through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. The user can input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user can input a user command by inputting a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
[0039] In some embodiments, "user interface" is a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. A common form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, or control displayed on a display screen of an electronic device, wherein a control may include at least one of icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and other visual interface elements.
[0040] Figure 4 FIG. 1 is a schematic diagram of software configuration in a display device 200 according to one or more embodiments of the present application. Figure 4As shown in FIG. 1 , the system is divided into four layers, from top to bottom, namely, the application layer (Applications layer), the application framework layer (Application Framework layer), the Android runtime and system library layer (System runtime library layer), and the kernel layer. The kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0041] Figure 5 FIG. 1 is a schematic diagram showing an icon control interface of an application in a display device 200 according to one or more embodiments of the present application. Figure 5 As shown in , the application layer includes at least one application that can display corresponding icon controls in the display, such as: live TV application icon control, video on demand application icon control, media center application icon control, application center icon control, game application icon control, etc. Live TV application can provide live TV through different signal sources. Video on demand application can provide videos from different storage sources. Unlike live TV application, video on demand provides video display from certain storage sources. Media center application can provide applications for playing various multimedia content. Application center can provide storage for various applications.
[0042] In the related art, the display device uses the FFmpeg program to capture a static image or a dynamic image of a selected video at a specified time as a video thumbnail. The display device can use the video thumbnail as a display icon of the video file during the storage of the video file, and can also obtain the video thumbnail of a specific position to determine the video content at that position during the playback of the video file.
[0043] Figure 6 The schematic diagram of a display device displaying a video thumbnail is shown as an example. Figure 6As shown, the display device can obtain video files from local storage, or it can serve as a receiving end (Sink) to receive video files sent from a sending end (Source). The sending end can be a server or an external device. In a specific implementation, the sending end and the receiving end can achieve communication connection through a specific interface to transfer data; or other connection methods can be used, including wired connection methods, such as DVI (Digital Visual Interface), VGA (Video Graphics Array), USB (Universal Serial Bus), etc., or wireless connection methods, such as wireless LAN, Bluetooth connection, infrared connection, etc. After the user obtains the video file from the server or local storage, the user stores the obtained video file to a specified location. For example, if the user wants to play a locally stored video file, the user can click the "Signal Source" control of the control device to enter the storage interface. It can be found that the storage interface displays a video thumbnail of the video file as a display icon of the video file, so that the user can quickly understand the content of the video file.
[0044] Figure 7 A schematic diagram of a scene in which a display device displays a video thumbnail in another embodiment is exemplarily shown. Figure 7 As shown, after the user obtains the video file from the server or local storage, the user double-clicks the video file through the control device, and the display device parses and decodes the video file to play the video. A hidden progress bar is usually set at the bottom of the video playback interface of the display device. During video playback, if the user does not perform any operation on the video playback interface, the display device does not display the hidden progress bar. When the user moves the corresponding cursor at the bottom of the video playback interface through the control device, the display device displays the progress bar, and the user can obtain a video thumbnail corresponding to the position of the cursor in the progress bar, so that the user can quickly understand the video content corresponding to the position of the cursor. It should be noted that, Figure 6 , Figure 7 In the scenario shown in which the display device displays the video thumbnail, the display device obtains the video thumbnail through the FFmpeg program. Figure 8 The schematic diagram of the process of obtaining a video thumbnail by a display device through the FFmpeg program is shown as an example. Figure 8 As shown, the user sends a control instruction to the server to request a video file. The server sends the encapsulated video file to the display device in response to the control instruction. After the display device receives the encapsulated video file, it parses the encapsulated video file as a whole to obtain multiple video frames, then sends the video frames to the decoder, and sends the decoded video frames to the player as video thumbnails.
[0045] In the related art, the process of a display device obtaining a video thumbnail through the FFmpeg program is time-consuming. At the same time, in the related art, the process of a display device obtaining a video thumbnail through the FFmpeg program is also unable to identify the content of the video frame, resulting in the video frame used as a video thumbnail may be an invalid video frame such as a black frame or a white frame.
[0046] Fig. 9 The schematic diagram exemplarily shows a scene in which a display device displays an invalid video frame, such as Fig. 9 As shown, the beginning of the video is usually provided with a title, the name of the leading actor, and other text or images to indicate the content of the video. The display device often captures video frames within a period of time at the beginning of the video as a video thumbnail. For example, the display device is set to capture any frame of image within 5 seconds to 10 seconds at the beginning of the video as a video thumbnail through the FFmpeg program. However, some videos are often set to start with a black screen or a white screen, and the process of obtaining the video thumbnail through the FFmpeg program of the existing display device cannot determine the specific content of the obtained video thumbnail, resulting in the video thumbnail captured by the display device being an invalid frame such as a black frame or a white frame. When the user clicks the "signal source" control of the control device and enters the storage interface, it can be found that the storage interface displays the video thumbnail of the video file as the display icon of the video file, but the display icon is a black frame, and it is impossible to determine whether the video is playable or the video content. Therefore, the method of obtaining the video thumbnail in the related art cannot provide the user with effective video identification information.
[0047] In order to solve the problem in the related art that it takes a long time for a display device to obtain a video thumbnail through the FFmpeg program, and when the display device determines the video thumbnail from the decoded video frame, the video thumbnail may be an invalid video frame such as a black frame or a white frame that cannot provide valid video identification information to the user, some embodiments of the present application show a display device that can quickly and accurately obtain a video thumbnail that can provide valid video identification information to the user, thereby improving the user experience.
[0048] Some embodiments of the present application provide a display device, including a display and a controller. The display device in the present application can be a tablet computer (portable android device, PAD), a personal digital assistant (personal digital assistant, PDA), a handheld device with wireless communication function, a computing device, a vehicle-mounted device or a wearable device, a virtual reality (virtual reality, VR) terminal device, an augmented reality (augmented reality, AR) terminal device, and other mobile terminals or fixed terminals with a touch screen. The form of the display device is not specifically limited in the embodiments of the present application.
[0049] The display may be configured to display video thumbnails, and the controller may be configured to display video thumbnails according to the following example: Fig.10 The flowchart shown is configured as follows: receiving a first control instruction sent by a user for obtaining a video thumbnail in a video file; in response to the first control instruction, obtaining a video stream file according to a first identifier, wherein the first identifier is used to identify that the video stream file is parseable, and the video stream file is parsed from the video file; and the video stream file includes at least one key frame.
[0050] When the user obtains a video file from the local storage through the control device, the user enters the display interface where the storage location of the video file is located through the storage path to view the video file. In the display interface, the video file can be displayed as follows Fig.11 The file name is displayed plus the video packaging format, such as "A Chinese Ghost Story.mp4", or it can be displayed as the file name plus a display icon. The display device usually uses the video thumbnail of the video file as the display icon of the video file. The user's action of entering the display interface to view the video file can be regarded as sending the first control instruction.
[0051] The user can control the display device to obtain video files from local storage, servers or external devices. The video packaging formats of the video files may include but are not limited to avi, flv, mov, wmv, mp4, asf, and rmvb formats. Taking the example of obtaining video files from local storage, the user can use the following method: Fig.12 The "D drive:\Download" storage path shown in the figure obtains the "Qian*Youhun.mp4" file. After the display device obtains the video file, it needs to parse the video file.
[0052] It should be noted that the video files in the display device are stored in the Multimedia Container Format (MCF), where MCF is to put the encoded and compressed video tracks and audio tracks into a video file in a certain format. A video file may include a video stream file and an audio stream file, or may include multiple video stream files and multiple audio stream files. The video stream file is encapsulated in the video file in the video encapsulation format, and the audio stream file is encapsulated in the video file in the audio encapsulation format. The display device usually parses the video stream file and the audio stream file at the same time to obtain the video.
[0053] In some embodiments, the display device parses the video stream file and the audio stream file separately. In a specific implementation, the display device marks a first identifier in the video stream file, and marks a second identifier in the audio stream file, wherein the first identifier is used to indicate that the video stream file can be parsed; the second identifier is used to indicate that the video stream file can skip parsing; the display device can only obtain the video stream file by parsing the video file according to the first identifier and the second identifier. For example, after obtaining the video stream file and the audio stream file, the display device can mark the first identifier in the file header of the video stream file; and mark the second identifier in the file header of the audio stream file. When the display device parses the video stream file and the audio stream file, when the non-ignore identifier is parsed from the file header of the video stream file, the video stream file continues to be parsed, and when the identifier is determined to be ignored from the file header of the audio stream file, the parsing is skipped, so that the display device only parses the video stream file.
[0054] Since existing display devices usually parse video stream files and audio stream files at the same time, the overall parsing process is time-consuming. By adopting the technical solution shown in the present application, it is possible to parse only the video stream files, reducing the parsing time by half and speeding up the parsing process.
[0055] After parsing the video stream file, the display device can obtain multiple video frames. Video frames include multiple categories, such as key frames (I frames), difference frames (P frames) and bidirectional difference frames (B frames). Among them, the key frame is a full-frame compression encoding frame, which can compress, encode and transmit the full-frame image information. During decoding, only the data of the key frame can be used to reconstruct the complete image; the difference frame represents the difference between the frame and the previous frame (key frame or difference frame). During decoding, only the previously cached picture is superimposed on the difference defined by this frame to generate the final image. The difference frame does not have complete picture data, only the difference with the previous frame. The difference data of the key frame must be summed with the prediction error in the key frame during decoding to reconstruct the complete key frame image; the two-way difference frame records the difference between the current frame and the previous and next frames. Decoding the two-way difference frame requires obtaining the previous cached picture and the picture after decoding. The final picture is obtained by superimposing the previous and next pictures with the current frame data. The two-way difference frame uses the previous key frame or difference frame and the subsequent difference frame as reference frames to obtain the prediction difference and motion vector transmission. According to the motion vector, the prediction value is calculated in the two reference frames and the difference is summed to obtain the complete two-way difference frame.
[0056] Different video stream files have different video frame categories. Some video stream files only contain key frames and difference frames. For example, for a video stream file containing only key frames and difference frames, the decoding process of the video stream file is as follows: Fig.13As shown, when the arrangement order of video frames in the video stream file is I frame, P frame, P frame..., its storage process is: storing in the order of I frame, P frame, P frame...; its decoding process is: decoding in the order of I frame, P frame, P frame...; its display process is: displaying in the order of I frame, P frame, P frame...
[0057] It should be noted that, for a video stream file containing only key frames and difference frames, the display device can send the frame of video to a decoding buffer through the decoder and obtain the decoded data each time it completes decoding of a frame.
[0058] Some video stream files contain key frames, difference frames, and bidirectional difference frames. For example, the video stream file format is H.264. The video stream file contains key frames, difference frames, and bidirectional difference frames. The decoding process of the video file in this format is as follows: Fig.14 As shown, when the arrangement order of video frames in the video stream file is: I frame, B frame, P frame..., its storage process is: store in the order of I frame, P frame, B frame...; its decoding process is: decode in the order of I frame, P frame, B frame...; its display process is: display in the order of I frame, B frame, P frame... The scheme shown in this embodiment is a decoding method of video stream files that includes key frames, difference frames and bidirectional difference frames in the related technology. In this method, when the display device completes the decoding of an I frame, it cannot directly send the frame video to the decoding buffer, but needs to wait for the B frame video decoding to be completed, and then send the I frame that the B frame depends on and the B frame to the decoding buffer. This decoding method causes the decoding process to take too long.
[0059] In some embodiments, after the display device obtains a video stream file, the display device needs to obtain a video frame category from the video stream file, where the video frame category includes at least one of a key frame, a difference frame, and a bidirectional difference frame. After obtaining the video frame category, the video frames are sorted according to a preset category sorting method, so that the video frames are decoded in sequence according to the category sorting method; wherein the preset category sorting method is: sorting the video frames in the order of key frames, difference frames, and bidirectional difference frames.
[0060] Specifically, take the video stream file format of H.264 as an example, Fig.15As shown, when the arrangement order of video frames in the video stream file is: I frame, B frame, P frame..., the storage process is: store in the order of I frame, B frame, P frame...; the decoding process is: decode in the order of I frame, P frame, B frame... Since the video thumbnail only displays a single frame of the picture, the display device only displays the I frame video as a video thumbnail; when the display device completes the decoding of a frame of I frame, it directly sends the frame of video to the decoding buffer without continuing to decode the P frame and B frame video. The technical solution shown in this embodiment can reduce the time consumption of the decoding process.
[0061] In some embodiments, the display device may obtain the key frame from the video stream file and decode the key frame to obtain the decoded key frame. It should be noted that after the display device obtains the key frame from the video stream file as a video thumbnail, it cannot directly display the video thumbnail, but needs to decode the key frame and display the key frame as a video thumbnail.
[0062] Since the key frames decoded by the display device may be invalid frames such as black frames or white frames, the display device needs to identify the content of the key frames to ensure that the key frames obtained by the user as video thumbnails can provide the user with valid video identification information.
[0063] In some embodiments, the display device determines whether the key frame meets the first filtering condition, and the first filtering condition is used to determine whether the probability value of the feature value in the key frame is within a preset threshold; if the key frame meets the first filtering condition, the key frame is determined as a video thumbnail.
[0064] A video frame is usually composed of multiple pixels, each of which can be described by multiple characteristic values, such as brightness value, chromaticity value, etc. The display device can determine the video identification information in the video frame based on the characteristic value of the pixel.
[0065] In some embodiments, after the display device obtains the decoded key frame, the decoded key frame exists in the form of YUV data. YUV is a color encoding method, in which "Y" represents the luminance value (Luminance), that is, the grayscale value; "U" and "V" represent the chrominance value (Chrominance), which can describe the color and saturation of the image and is used to specify the color of the pixel.
[0066] The display device needs to preset a characteristic value threshold to determine whether the brightness value and chromaticity value of the display device are within the preset characteristic value threshold range. Since the black frame or white frame of the video frame is an invalid video frame, the display device needs to set the highest brightness value range to distinguish the white frame, and set the lowest brightness value range to distinguish the black frame. For example, the highest brightness value range y_max can be set to be greater than 250, and the lowest brightness value range y_min can be set to be less than 10. At the same time, since the chromaticity value is expressed in color, pixels with a chromaticity of "black" can be screened from the video frame to distinguish the black frame, or pixels with a chromaticity of "white" can be screened to distinguish the white frame.
[0067] It should be noted that the display device does not filter the lowest brightness value range, the highest brightness value range and the chromaticity value at the same time. The display device selects one as the first filtering condition to filter out video frames that are only black frames or only white frames, avoiding filtering out video frames with both black pixels and white pixels in the video.
[0068] It should be noted that the characteristic value thresholds shown in the embodiments of the present application are only examples, and they need to be set according to specific circumstances in actual settings. For example, the chromaticity in the chromaticity value contains many levels, such as "black", "dark black", and "light black"; if the display device only filters out pixels with a chromaticity of "black" from the video frame to distinguish black frames, the display device may provide the video frame where the pixel with a chromaticity of "light black" is located to the user, resulting in the video thumbnail seen by the user still being a black frame. Since the human eye only distinguishes colors within a certain range, the chromaticity value needs to be set according to the actual discrimination ability of the human eye to ensure that the video thumbnail viewed by the user is not an invalid video frame such as a black frame or a white frame.
[0069] In some embodiments, the display device obtains the characteristic values of all pixels in the key frame; the characteristic values are used to describe the characteristics of the pixels, and for example, the characteristic values can be brightness values and chromaticity values. The display device can determine whether the pixel is an abnormal pixel by the characteristic value. If the characteristic value of any pixel is not within the characteristic value threshold range, the display device can determine that the pixel is an abnormal pixel; the display device can calculate the percentage of abnormal pixels in all pixels to obtain the probability value of the characteristic value in the key frame. For example, taking a key frame with 10,000 pixels as an example, if 9,000 pixels are screened out as abnormal pixels according to the characteristic value threshold, the percentage of abnormal pixels in all pixels is calculated, which is 90%. Therefore, the probability value of the characteristic value of the key frame in this embodiment is 90%.
[0070] In some embodiments, since the first filtering condition is used to determine whether the probability value of the feature value in the key frame is within a preset threshold, the preset threshold is set to be greater than 80%. If the probability value of the feature value in the key frame is 90%, the key frame does not meet the first filtering condition.
[0071] In some embodiments, when the display device determines whether a key frame meets the first filtering condition, if the key frame does not meet the first filtering condition, the next key frame is obtained for decoding and filtering to finally obtain a video thumbnail that meets the filtering condition.
[0072] It should be noted that the preset threshold of the display device can be set according to actual conditions. If the range of the preset threshold is set too large, some invalid video frames may not be filtered out. If the range of the preset threshold is set too small, some valid video frames may be filtered out.
[0073] However, in the process of filtering invalid video frames by a preset threshold, the display device may filter out invalid video frames such as Fig.16 The valid video frames shown have less video identification information. Therefore, the invalid video frames filtered out by the display device based on only the first filtering condition may actually be valid video frames. Screening out such valid video frames may cause the video thumbnail to be unable to display the video frame containing the video title as a video thumbnail.
[0074] In some embodiments, the display device further sets a second screening condition to determine whether there is valid identification information in the video frame. The second screening condition is used to confirm whether the position area formed by the non-abnormal pixel points in the key frame forms a position in the video frame. Fig.17 The axisymmetric shape or the centrally symmetrical shape shown. In a specific implementation, the display device obtains the position information of all non-abnormal pixels, obtains the position area formed by the coordinates corresponding to the minimum horizontal coordinate, the minimum vertical coordinate, the maximum horizontal coordinate and the maximum vertical coordinate of the non-abnormal pixels according to the position information of the non-abnormal pixels, and determines whether the shape of the position area is an axisymmetric shape or a centrally symmetrical shape. For example, taking a video frame with a frame size of 14000 pixels * 9000 pixels as an example, non-abnormal pixels form a position area at coordinates (5000, 5000), (5000, 6000), (7000, 5000), and (7000, 6000), and the area is a centrally symmetrical shape. Therefore, the area can be determined as a valid video frame containing video identification information such as a title, and the display device can determine the valid video frame selected by the second screening condition as a video thumbnail.
[0075] After obtaining the video thumbnail from the local storage, server, or external device, the display device can automatically select a valid video thumbnail from the video file as a display icon according to the technical solution shown in the above embodiment, so that the user can quickly understand the content of the video file.
[0076] It can be seen from the above technical solutions that a display device provided by the present application can only parse the video stream file when receiving the first control instruction sent by the user for obtaining the video thumbnail in the video file, thereby reducing the time consumption of the parsing process, and decode the key frames of the video stream file after parsing to obtain the key frames as video thumbnails, and at the same time judge whether the probability value of the feature value in the key frame is within the preset threshold according to the first screening condition to determine whether the key frame is an invalid video frame. Therefore, the technical solution shown in the embodiment of the present application can quickly and accurately obtain video thumbnails that can provide effective video identification information to users, thereby improving user experience.
[0077] After the user understands the content of the video file to play the video, the user can move the cursor corresponding to the control device on the progress bar to obtain a video thumbnail corresponding to the cursor position, so that the user can quickly understand the video content corresponding to the cursor position.
[0078] Fig.18 The schematic diagram of a scene in which a display device plays a video file is shown as an example. Fig.18 As shown, during the display device playing a video file, the play position 1 is the progress of the video currently being watched by the user, the cache position 2 is the progress of the video that the display device has cached, and the fast-forward position 3 is the progress of the video that the user expects to preview. During the display device playing a video, the user moves a cursor controlled by a control device to a specific position of the video file progress bar to preview the video thumbnail at that position for the purpose of adjusting the video progress, so that the user can quickly understand the video content at that specific position.
[0079] For example, if the video duration is 45 minutes, the playback position 1 is 5 minutes, the cache position 2 is 25 minutes, and the fast forward position 3 is 30 minutes, the user moves the cursor to the fast forward position 3 and expects to preview the video thumbnail at this position. Since this position has not been cached, the display device may not be able to display the key frame at this position as a video thumbnail or may display the cached key frame before this position as a video thumbnail.
[0080] Based on this, some embodiments of the present application further provide a display device, including a display and a controller. The display may be configured to display a video thumbnail, and the controller may be configured to display a video thumbnail according to the following example. Fig.19The flowchart shown is configured as follows: receiving a first control instruction sent by a user for obtaining a video thumbnail in a video file; in response to the first control instruction, obtaining a video stream file according to a first identifier, the first identifier being used to indicate that the video stream file is parseable, and the video stream file is parsed from the video file; the video stream file includes at least one key frame.
[0081] It should be noted that the method for obtaining the first control instruction and the method for obtaining the video stream file have been described in the above embodiments and will not be described in detail here.
[0082] In some embodiments, a display device receives a second control instruction sent by a user for obtaining a video thumbnail of a specific time point in a video stream file; in response to the second control instruction, obtains the file format of the video stream file; if the file format of the video stream is not a transport stream format, executes the step of obtaining the current key frame in the video stream file; if the file format of the video stream is a transport stream format, executes the step of obtaining the current video frame in the video stream file.
[0083] It should be noted that the file format of the video stream file shown in the embodiment of the present application is not limited to the division into transport stream format and non-transport stream format. For any file format that can directly obtain video frames, the operation method for this type of file format is the same as the operation method for the transport stream format file. For any video format that cannot directly obtain video frames and can only obtain key frames, the operation method for this type of file is the same as the operation method for file formats such as mp4, avi, etc. that cannot directly obtain video frames.
[0084] In some embodiments, a display device receives a second control instruction sent by a user for obtaining a video thumbnail of a specific time point in a video stream file; in response to the second control instruction, obtains the file format of the video stream file; when the file format of the video stream is not a transport stream format, obtains the current key frame in the video stream file; determines whether the current time point of the current key frame is a specific time point; if the current time point is a specific time point, executes the step of decoding the key frame; wherein the key frame is the current key frame.
[0085] The display device can be regarded as sending the second control instruction when it fast-forwards / fast-rewinds at the progress bar of the video file through the control device. For example, when the user fast-forwards to the fast-forward position 3, the display device requests to obtain the current key frame at the fast-forward position 3. Since the display device may not currently cache the fast-forward position 3, the display device may default to providing the key frame at the end of the cache to the user. For example, the fast-forward position 3 is 30 minutes, and the key frame at the end of the cache is 25 minutes. The display device provides the key frame at 25 minutes to the user as the current key frame at the fast-forward position 3, resulting in the key frame obtained not matching the actual key frame. Therefore, the display device needs to determine whether the current time point of the current key frame obtained by the display device is a specific time point. If the current time point is a specific time point, it is determined that the current key frame can be used as a video thumbnail.
[0086] Fig. 20 The schematic diagram of a display device obtaining a candidate key frame scene is shown as an example. Fig. 20 As shown, if the current time point is not a specific time point, the display device traverses the time period formed by the current time point to the specific time point to determine whether there is at least one candidate key frame; if there is not at least one candidate key frame, the current key frame is determined as a video thumbnail; if there is at least one candidate key frame, the candidate time points of at least one candidate key frame are obtained, the candidate key frame corresponding to the candidate time point closest to the specific time point is determined, and the candidate key frame corresponding to the candidate time point closest to the specific time point is determined as the video thumbnail.
[0087] In the specific implementation, the display device requests to obtain the key frame of the fast-forward position 3, the fast-forward position 3 is 30 minutes, and the current time point is 26 minutes. Since the position difference between the current key frame obtained and the key frame of the fast-forward position 3 is too large, the obtained key frame is very inaccurate. Therefore, the display device traverses the time period from 26 minutes to 30 minutes to determine whether there is a key frame in this time period. If there is no key frame, the current key frame is determined as the video thumbnail. If there is only one candidate key frame in this time period, the candidate key frame is determined as the video thumbnail. If there are two candidate key frames at 28 minutes and 29 minutes respectively, the candidate key frame closest to the specific time point (that is, the candidate key frame at 29 minutes) is determined as the video thumbnail.
[0088] It should be noted that for some video file formats, the display device is set by default so that the user can only fast forward / fast rewind to the key frame position. If the user moves the cursor to a non-key frame position, the cursor is moved to the key frame position closest to the non-key frame cursor by default. For example, the user moves the cursor to fast forward position 3, which is 30 minutes. If fast forward position 3 happens to be a key frame position, the cursor will stay at this position. If fast forward position 3 is a differential frame position, there is a key frame at 29 minutes and another key frame at 32 minutes, the cursor will stay at the key frame of 29 minutes by default, and the key frame will be displayed as a video thumbnail.
[0089] In some embodiments, a display device receives a second control instruction sent by a user for obtaining a video thumbnail of a specific time point in a video stream file; in response to the second control instruction, the file format of the video stream file is obtained, and if the file format of the video stream is a transport stream format, the current video frame in the video stream file is obtained; the video frame is obtained by decoding the video stream file; it is determined whether the current video frame is a key frame; if the current video frame is a key frame, the current video frame is determined as a video thumbnail; if the current video frame is not a key frame, the key frames on both sides of the current video frame are traversed with the current video frame as the center, and the key frame on both sides of the current video frame that is closest to the current video frame is determined as the video thumbnail.
[0090] It should be noted that for some video file formats, such as the Transport Stream (Ts) format, the display device can fast forward / fast rewind to any video frame position. When the display device fast forwards to a difference frame or a two-way difference frame, decoding failure or a distorted screen may occur. Therefore, the display device needs to determine the category of the current video frame. For example, the fast forward position 3 is 30 minutes. If the current video frame at this position happens to be a key frame, the current video frame at this position is determined as a video thumbnail; if the current video frame at this position is not a key frame, and the key frames are traversed from this position to both sides to the 29-minute position and the 32-minute position, the key frame at the 29-minute position is determined as the key frame closest to the current video frame as the video thumbnail.
[0091] In some embodiments, a user wants to obtain a video thumbnail of the 30th minute of a video file. Since the time point of the video file is calculated from 0, and the display timestamp (PTS) of the first frame of video may not be 0, in some embodiments, the display device calculates the actual time point for obtaining the video thumbnail from 0, resulting in an inaccurate video thumbnail. Therefore, the specific time point for actually obtaining the video thumbnail is determined as the display timestamp of the first frame plus the specific time point set by the user.
[0092] In the specific implementation, taking the specific time point of 30 minutes as an example, the user wants to obtain the video thumbnail of the specific key frame at the 30th minute. The actual time period from the first frame to the specific key frame should be 30 minutes. However, since the display timestamp of the first frame is 1 minute, the actual time period of the specific key frame obtained is 29 minutes, and the obtained thumbnail is not accurate. Therefore, when the user wants to obtain the video thumbnail of the specific key frame at the 30th minute, the display device defaults to obtaining the actual specific time point as the display timestamp of the first frame plus the specific time point set by the user.
[0093] In some embodiments, the key frame is decoded to obtain a decoded key frame. When the display device obtains the key frame as a video thumbnail according to the technical solution shown in the above embodiment, it cannot directly display the video thumbnail, but needs to decode the key frame before displaying it.
[0094] The content of the key frame decoded by the display device may not be valid content. Therefore, the display device needs to identify the content of the key frame to ensure that the video key frame obtained by the user is a valid frame.
[0095] In some embodiments, the display device determines whether the key frame meets the first filtering condition, and the first filtering condition is used to determine whether the probability value of the characteristic value in the key frame is within a preset threshold range; if the key frame meets the first filtering condition, the key frame is determined as a video thumbnail. In some embodiments, the display device obtains the characteristic values of all pixels in the key frame; the characteristic values include brightness values and chromaticity values; if the characteristic value of any pixel is not within the characteristic value threshold range, the pixel is determined to be an abnormal pixel; the percentage of abnormal pixels in all pixels is calculated to obtain the probability value of the characteristic value in the key frame. The method for the display device in this embodiment to determine whether the key frame meets the first filtering condition can refer to the specific implementation method in the aforementioned embodiment, which will not be described in detail here.
[0096] It should be noted that, since the user usually does not need to obtain the video thumbnail at the beginning of the video during the fast forward / fast rewind process, there is no need to set the second screening method in this embodiment to further screen the video thumbnails. In the process of the display device obtaining the video thumbnail, the user needs to obtain effective video identification content. Therefore, the display device can set the preset threshold to be greater than 90% to only filter out invalid video frames such as black frames or white frames.
[0097] It can be seen from the above technical solutions that a display device provided by the present application can only parse the video stream file when receiving the first control instruction sent by the user for obtaining the video thumbnail in the video file, thereby reducing the time consumption of the parsing process, and when receiving the second control instruction sent by the user for obtaining the video thumbnail at a specific time point in the video stream file, obtain the current key frame or the current video frame in the video stream file, and then distinguish the current key frame or the current video frame, and determine the key frame that is most suitable as the video thumbnail, so that the user can obtain the most accurate video thumbnail, and after determining the key frame that is most suitable as the video thumbnail, decode the key frame to obtain the key frame as a displayable video thumbnail, and at the same time judge whether the probability value of the feature value in the key frame is within the preset threshold according to the first screening condition, so as to determine whether the key frame is an invalid video frame. Therefore, the technical solution shown in the embodiment of the present application can quickly and accurately obtain video thumbnails that can provide effective video identification information to users, thereby improving user experience.
[0098] An embodiment of the present application also provides a thumbnail display method, which includes: obtaining a video stream file, the video stream file is parsed from a video file; the video stream file includes at least one key frame; decoding the key frame to obtain a decoded key frame; the key frame is a category of a video frame obtained by decoding the video stream file; determining whether the key frame meets a first filtering condition, the first filtering condition is used to determine a probability value of a feature value in the key frame; if the key frame meets the first filtering condition, determining the key frame as a video thumbnail.
[0099] The same and similar parts between the various embodiments in this specification can be referenced to each other and will not be described again here.
[0100] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present invention or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A display device, characterized in that: include: monitor; is configured to display video thumbnails; The controller is configured as: Receiving a first control instruction sent by a user for obtaining a video thumbnail in a video file; In response to the first control instruction, a video stream file is obtained according to a first identifier, wherein the video stream file is parsed from the video file; the video stream file includes at least one key frame; and the first identifier is used to indicate that the video stream file is parsable; Decoding the key frame; the key frame is a category of a video frame obtained by decoding the video stream file; Determine abnormal pixels in the key frame according to the characteristic values of all pixels in the key frame, wherein the characteristic values of the abnormal pixels are not within the characteristic value threshold range; Calculate the probability value of the feature value in the key frame, where the probability value is the proportion of the abnormal pixel point in all the pixel points; If the probability value is not greater than a preset threshold, it is determined that the key frame meets the first screening condition, and the key frame is determined as a video thumbnail; If the probability value is greater than the preset threshold, and the position area formed by the non-abnormal pixels in the key frame presents a symmetrical shape feature, it is determined that the key frame meets the second screening condition and the key frame is determined as a video thumbnail.
2. The display device according to claim 1, characterized in that The controller is further configured to: In the step of acquiring the video stream file according to the first identifier, a storage path of the video file is acquired, and the video file is acquired from a local storage or a server; Parsing the video file from the storage path of the video file to obtain an audio stream file and a video stream file of the video file; A first identifier is marked in the video stream file, and a second identifier is marked in the audio stream file, wherein the first identifier is used to indicate that the video stream file can be parsed; and the second identifier is used to indicate that the parsing of the audio stream file can be skipped; The video file is parsed according to the first identifier and the second identifier to obtain the video stream file.
3. The display device according to claim 1, characterized in that The controller is further configured to: Before the step of decoding the key frame, receiving a second control instruction sent by a user for obtaining a video thumbnail at a specific time point in the video stream file; In response to the second control instruction, obtaining a current key frame in the video stream file; Determine whether the current time point of the current key frame is the specific time point; If the current time point is the specific time point, a step of decoding the key frame is performed; wherein the key frame is the current key frame.
4. The display device according to claim 3, characterized in that The controller is further configured to: In the step of determining whether the current time point of the current key frame is the specific time point, if the current time point is not the specific time point, traversing the time period formed by the current time point to the specific time point to determine whether there is at least one candidate key frame; If the at least one candidate key frame does not exist, executing a step of decoding the key frame; wherein the key frame is the current key frame; If at least one candidate key frame exists, obtain the candidate time point of at least one candidate key frame, determine the candidate key frame corresponding to the candidate time point closest to the specific time point, and perform the step of decoding the key frame, wherein the key frame is the candidate key frame corresponding to the candidate time point closest to the specific time point.
5. The display device according to claim 1, characterized in that The controller is further configured to: Before the step of decoding the key frame, receiving a second control instruction sent by a user for obtaining a video thumbnail at a specific time point in the video stream file; In response to the second control instruction, obtaining a current video frame in the video stream file; the video frame is obtained by decoding the video stream file; Determine whether the current video frame is the key frame; If the current video frame is the key frame, executing a step of decoding the key frame; wherein the key frame is the current video frame; If the current video frame is not the key frame, the key frames on both sides of the current video frame are traversed with the current video frame as the center, and the step of decoding the key frame is performed, wherein the key frame is the key frame closest to the current video frame among the key frames on both sides of the current video frame.
6. The display device according to claim 1, characterized in that The controller is further configured to: Before the step of decoding the key frame, obtaining a video frame category from the video stream file, the video frame category including a key frame, a difference frame, and a bidirectional difference frame; The video frames are sorted according to a preset category sorting method so that the video frames are decoded in sequence according to the category sorting method; wherein the preset category sorting method is: sorting the video frames in the order of key frames, difference frames and bidirectional difference frames.
7. The display device according to any one of claims 3 to 5, characterized in that: The controller is further configured to: In the step of receiving a second control instruction sent by a user for obtaining a video thumbnail at a specific time point in a video stream file, obtaining a file format of the video stream file; If the file format of the video stream is a transport stream format, executing the step of obtaining a current video frame in the video stream file; If the file format of the video stream is not a transport stream format, the step of obtaining the current key frame in the video stream file is performed.
8. A method for obtaining a video thumbnail, characterized in that: include: Acquire a video stream file according to the first identifier, where the video stream file is parsed from the video file; The video stream file includes at least one key frame; The first identifier is used to indicate that the video stream file is parsable; Decoding the key frame; the key frame is a category of a video frame obtained by decoding the video stream file; Determine abnormal pixels in the key frame according to the characteristic values of all pixels in the key frame, wherein the characteristic values of the abnormal pixels are not within the characteristic value threshold range; Calculate the probability value of the feature value in the key frame, where the probability value is the proportion of the abnormal pixel point in all the pixel points; If the probability value is not greater than a preset threshold, it is determined that the key frame meets the first screening condition, and the key frame is determined as a video thumbnail; If the probability value is greater than the preset threshold, and the position area formed by the non-abnormal pixels in the key frame presents a symmetrical shape feature, it is determined that the key frame meets the second screening condition and the key frame is determined as a video thumbnail.
9. The video thumbnail acquisition method according to claim 8, characterized in that: include: In the step of acquiring the video stream file according to the first identifier, a storage path of the video file is acquired, and the video file is acquired from a local storage or a server; Parsing the video file from the storage path of the video file to obtain an audio stream file and a video stream file of the video file; A first identifier is marked in the video stream file, and a second identifier is marked in the audio stream file, wherein the first identifier is used to indicate that the video stream file can be parsed; and the second identifier is used to indicate that the parsing of the audio stream file can be skipped; The video file is parsed according to the first identifier and the second identifier to obtain the video stream file.
Citation Information
Patent Citations
Playblast method and system used for player
CN103325396A
Media preview generation method and generation apparatus
CN105100961A
Method and device for achieving video information preview, client and storage medium
CN107820115A
Data processing method and device
CN110392306A
Display device and video playing progress adjusting method
CN113630649A
