A multimedia file playing method, device and electronic equipment

By pre-reading the display timestamp and actual offset position of each I-frame when playing multimedia files without stored audio and video index information, the problem of screen stuttering when playing multimedia files of a certain file format is solved, and fast-forwarding is achieved.

CN115866349BActive Publication Date: 2025-11-07HISENSE VISUAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211411085.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2025-11-07
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

When playing multimedia files of certain formats, especially TS format, electronic devices are prone to screen stuttering when the user fast-forwards.

Method used

When playing multimedia files that do not store audio and video index information, the display timestamp and actual offset position of each I-frame are determined by data pre-reading. When a fast-forward operation is received, the actual offset position corresponding to the display timestamp with a difference less than or equal to the target threshold is found and played.

Benefits of technology

This avoids screen stuttering caused by spending too much time searching for I-frames, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115866349B_ABST
    Figure CN115866349B_ABST
Patent Text Reader

Abstract

The present disclosure provides a multimedia file playing method and device and electronic equipment, relates to the technical field of display, and is used for solving the problem of how to ensure that the picture of the multimedia file in a specific file format played by the electronic equipment does not appear the phenomenon of lag. The method comprises the following steps: in the case that a selection operation on a multimedia file is received, playing the multimedia file; performing data pre-reading on the multimedia file, determining the display timestamp and actual offset position of each I frame contained in the multimedia file; in the case that a fast-forward operation on the playing progress of the multimedia file is received, determining the playing timestamp corresponding to the fast-forward operation; in the case that there is a display timestamp with a difference from the playing timestamp less than or equal to a target threshold, reading the multimedia data of the multimedia file at the actual offset position corresponding to the display timestamp with the difference from the playing timestamp less than or equal to the target threshold, and playing the multimedia data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of display, and particularly relates to a multimedia file playing method and device and electronic equipment. BACKGROUND

[0002] At present, in the technical field of display, in the process of playing a multimedia file, a user often instructs an electronic equipment to play the content of a specified time of the multimedia file through a fast-forward operation, for example, when the user needs to watch the content of the 15th minute of the multimedia file, the user can instruct the electronic equipment to play the content of the 15th minute of the multimedia file through a fast-forward operation.

[0003] However, for multimedia data in some specific file formats (such as Transport Stream (TS) format), when the difference between the specified time and the current time of the multimedia file currently played by the electronic equipment is large, the picture of the multimedia file played by the electronic equipment will appear to be stuck.

[0004] Therefore, how to ensure that the picture of the multimedia file played by the electronic equipment in a specific file format will not appear to be stuck has become a problem to be solved. SUMMARY

[0005] In order to solve the above technical problems, the present disclosure provides a multimedia file playing method, device and electronic equipment.

[0006] The technical solution of the present disclosure is as follows:

[0007] In a first aspect, the present disclosure provides a multimedia file playing method, comprising: playing a multimedia file in the case of receiving a selection operation on the multimedia file; wherein the multimedia file does not store audio and video index information; performing data pre-reading on the multimedia file to determine the display timestamp and actual offset position of each I frame contained in the multimedia file; determining the playing timestamp corresponding to a fast-forward operation on the playing progress of the multimedia file in the case of receiving the fast-forward operation; and in the case of determining that there is a display timestamp with a difference from the playing timestamp less than or equal to a target threshold, reading the multimedia data of the multimedia file at the actual offset position corresponding to the display timestamp with a difference from the playing timestamp less than or equal to the target threshold, and playing the multimedia data.

[0008] In some implementable examples, the method for playing the multimedia file further comprises: determining, in the absence of a display timestamp having a difference from the playing timestamp less than or equal to a target threshold, an estimated offset position according to the configuration information of the multimedia file and the playing timestamp; determining a display timestamp corresponding to the estimated offset position according to the estimated offset position; determining a display timestamp satisfying a preset condition based on the display timestamp corresponding to the estimated offset position and the playing timestamp; reading multimedia data of an actual offset position corresponding to the display timestamp satisfying the preset condition, and playing the multimedia data.

[0009] In some implementable examples, the determining of the display timestamp satisfying the preset condition based on the display timestamp corresponding to the estimated offset position and the playing timestamp comprises: in the case that the display timestamp corresponding to the estimated offset position is different from the playing timestamp, sequentially searching for a display timestamp less than or equal to the playing timestamp in steps of one group of pictures; and determining the display timestamp satisfying the preset condition as a display timestamp having a difference from the playing timestamp less than or equal to the target threshold among the display timestamps less than or equal to the playing timestamp according to the display timestamps less than or equal to the playing timestamp.

[0010] In some implementable examples, the data pre-reading of the multimedia file to determine the display timestamp and the actual offset position of each I frame contained in the multimedia file comprises: data pre-reading of the multimedia file to determine a starting position and at least two actual offset positions; and performing the following operations on segmented data between adjacent two actual offset positions or segmented data between the starting position and an actual offset position adjacent to the starting position: creating a thread to parse the segmented data to determine the display timestamp of each I frame contained in the segmented data; and determining the display timestamp and the actual offset position of each I frame contained in the multimedia file according to the display timestamp and the actual offset position of each I frame corresponding to each segmented data.

[0011] In some implementable examples, in the case that the fast-forward operation corresponding to the playing progress of the multimedia file is received, the determining of the playing timestamp corresponding to the fast-forward operation comprises: determining a fast-forward time point corresponding to the fast-forward operation in the case that the fast-forward operation corresponding to the playing progress of the multimedia file is received; and converting the fast-forward time point to determine the playing timestamp.

[0012] In some implementable examples, the method for playing the multimedia file further comprises: receiving an exit operation for exiting the playing of the multimedia file; and storing the display timestamp and the actual offset position of each I frame contained in the multimedia file to a target position.

[0013] In some implementable examples, the method for playing the multimedia file further includes: obtaining an exit time at which the last time the exit operation of exiting playing the multimedia file is received; and deleting the display timestamp and the actual offset position of each I-frame included in the multimedia file stored in the target position in a case where a difference between a current time and the exit time is greater than a time threshold.

[0014] In a second aspect, the present disclosure provides a device for playing a multimedia file, including: a processing unit configured to control a display unit to play a multimedia file in a case where a selection operation of the multimedia file is received by a receiving unit; wherein the multimedia file does not store audio and video index information; the processing unit is further configured to perform data pre-reading on the multimedia file received by the receiving unit, and determine a display timestamp and an actual offset position of each I-frame included in the multimedia file; the processing unit is further configured to determine a play timestamp corresponding to a fast-forward operation of the play progress of the multimedia file received by the receiving unit in a case where the fast-forward operation of the play progress of the multimedia file is received by the receiving unit; and the processing unit is further configured to read multimedia data at an actual offset position corresponding to a display timestamp that is less than or equal to a target threshold from the multimedia file in a case where there is a display timestamp that is less than or equal to the target threshold from the play timestamp, and control the display unit to play the multimedia data.

[0015] In some implementable examples, the processing unit is further configured to determine an estimated offset position according to configuration information of the multimedia file and the play timestamp in a case where there is no display timestamp that is less than or equal to the target threshold from the play timestamp; the processing unit is further configured to determine a display timestamp corresponding to the estimated offset position according to the estimated offset position; the processing unit is further configured to determine a display timestamp that satisfies a preset condition based on the display timestamp corresponding to the estimated offset position and the play timestamp; and the processing unit is further configured to read multimedia data at an actual offset position corresponding to the display timestamp that satisfies the preset condition, and control the display unit to play the multimedia data.

[0016] In some implementable examples, the processing unit is specifically configured to sequentially search for a display timestamp that is less than or equal to the play timestamp in steps of one group of pictures in a case where the display timestamp corresponding to the estimated offset position is different from the play timestamp; and the processing unit is specifically configured to determine the display timestamp that satisfies the preset condition as a display timestamp that is less than or equal to the play timestamp and that is less than or equal to the target threshold from the play timestamp according to the display timestamp that is less than or equal to the play timestamp.

[0017] In some embodiments, the processing unit is specifically configured to determine the start position and at least two actual offset positions for data pre-reading of the multimedia file; the processing unit is specifically configured to, for segmented data between any two adjacent actual offset positions or segmented data between the start position and an actual offset position adjacent to the start position, create a thread, parse the segmented data, and determine a display timestamp of each I-frame contained in the segmented data; and the processing unit is specifically configured to determine the display timestamp and the actual offset position of each I-frame contained in the multimedia file according to the display timestamp of each I-frame corresponding to each segmented data and the actual offset position.

[0018] In some embodiments, the processing unit is specifically configured to, in a case where the receiving unit receives a fast-forward operation on the playing progress of the multimedia file, determine a fast-forward time point corresponding to the fast-forward operation; and the processing unit is specifically configured to convert the fast-forward time point to determine the playing timestamp.

[0019] In some embodiments, the receiving unit is further configured to receive an exit operation for exiting playing of the multimedia file; and the processing unit is further configured to store the display timestamp and the actual offset position of each I-frame contained in the multimedia file to the target position.

[0020] In some embodiments, the playing device of the multimedia file further includes an obtaining unit configured to obtain an exit time of a last time when an exit operation for exiting playing of the multimedia file is received; and the processing unit is configured to, in a case where a difference between a current time and the exit time obtained by the obtaining unit is greater than a time threshold, delete the display timestamp and the actual offset position of each I-frame contained in the multimedia file stored in the target position.

[0021] In a third aspect, the present disclosure provides an electronic device, including a memory and a processor, the memory is configured to store a computer program; and the processor is configured to, when executing the computer program, enable the electronic device to implement any one of the multimedia file playing methods provided in the first aspect.

[0022] In a fourth aspect, the present disclosure provides a computer readable storage medium, including a computer program stored on the computer readable storage medium, when the computer program is executed by a computing device, enables the computing device to implement any one of the multimedia file playing methods provided in the first aspect.

[0023] In a fifth aspect, the present disclosure provides a computer program product, when the computer program product is run on a computer, enables the computer to execute the multimedia file playing method provided in any one of the first aspect.

[0024] It should be noted that the computer instructions described above can be stored in whole or in part on the first computer-readable storage medium. The first computer-readable storage medium can be packaged together with the processor of the multimedia file playing device or packaged separately from the processor of the multimedia file playing device, and the present disclosure does not limit this.

[0025] The second aspect, the third aspect, the fourth aspect, and the fifth aspect of the present disclosure can refer to the detailed description of the first aspect, and the beneficial effects of the description of the second aspect, the third aspect, the fourth aspect, and the fifth aspect can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.

[0026] In the present disclosure, the name of the multimedia file playing device does not constitute a limitation on the device or functional module itself, and in actual implementation, these devices or functional modules can appear in other names. As long as the functions of each device or functional module are similar to the present disclosure, it belongs to the scope of the claims of the present disclosure and equivalent technologies.

[0027] These aspects or other aspects of the present disclosure will be more apparent in the following description.

[0028] The technical solutions provided by the present disclosure have the following advantages compared with the prior art:

[0029] By pre-reading the multimedia file data while playing the multimedia file which does not store the audio and video index information, the display timestamp and the actual offset position of each I frame contained in the multimedia file are determined. In this way, the display timestamp corresponding to each I frame in the multimedia file and the actual offset position corresponding to each I frame can be obtained. Then, when a fast-forward operation on the playing progress of the multimedia file is received, the playing timestamp corresponding to the fast-forward operation is determined. Then, by searching for the display timestamp with a difference from the playing timestamp less than or equal to a target threshold value in the known display timestamp, the multimedia data at the actual offset position corresponding to the display timestamp with a difference from the playing timestamp less than or equal to the target threshold value is read, and the multimedia data is played.

[0030] In addition, when the multimedia file is a multimedia file of a specific file format, in the multimedia file playing method provided by the present disclosure, the display timestamp and the actual offset position of each I frame contained in the multimedia file have been obtained while the multimedia file is played. Therefore, when the user performs a fast-forward operation on the playing progress of the multimedia file, the corresponding I frame and the actual offset position corresponding to the I frame can be quickly found, so that the phenomenon of the multimedia file played by the player being stuck due to spending a lot of time searching for the I frame can be avoided, and the problem that the picture of the multimedia file played by the electronic device of the specific file format does not appear stuck is solved. Attached Figure Description

[0031] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0032] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 One of the flowcharts illustrating a method for playing multimedia files provided in an embodiment of this application;

[0034] Figure 2 This is one of the structural schematic diagrams of the display device in the multimedia file playback method provided in the embodiments of this application;

[0035] Figure 3 A second schematic diagram of the structure of the display device in the multimedia file playback method provided in the embodiments of this application;

[0036] Figure 4 One of the flowcharts illustrating a method for playing multimedia files provided in an embodiment of this application;

[0037] Figure 5 A second schematic flowchart illustrating the method for playing multimedia files provided in this application embodiment;

[0038] Figure 6 The third flowchart illustrating the method for playing multimedia files provided in this application embodiment;

[0039] Figure 7 The fourth flowchart illustrating the method for playing multimedia files provided in this application embodiment;

[0040] Figure 8 Fifth flowchart illustrating the multimedia file playback method provided in this application embodiment;

[0041] Figure 9 A flowchart illustrating the method for playing multimedia files provided in this application embodiment is shown in Figure 6.

[0042] Figure 10 Seventh schematic flowchart of the multimedia file playback method provided in the embodiments of this application;

[0043] Figure 11 This is a schematic diagram of the server structure provided in an embodiment of this application;

[0044] Figure 12 A schematic diagram of a chip system is provided for the embodiments of the present application. DETAILED DESCRIPTION

[0045] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0046] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other manners different from those described herein; obviously, the embodiments described in the specification are only a part of the embodiments of the present disclosure, and not all the embodiments.

[0047] It should be noted that, in this document, relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a... " does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0048] The I frame in the embodiments of the present disclosure refers to an intra-coded frame (I frame), also known as an intra picture. The I frame is generally the first frame of each group of pictures (GOP), a video compression technology used by Moving Pictures Experts Group (MPEG). After moderate compression, the I frame can be used as a random access reference point and can be used as an image. The I frame can be regarded as a product of compression of an image.

[0049] The timestamp in the embodiments of the present disclosure is data generated using a digital signature technology. The objects of the signature include original file information, signature parameters, signature time and the like.

[0050] The picture group in the embodiments of the present disclosure refers to a group of pictures (GOP). A GOP is a group of continuous pictures, starting with an I frame. When decoding, a complete group of GOP pictures needs to be sent to the decoder.

[0051] Figure 1 As shown in FIG. 1, a 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 means to control the display device 200. The user can input user instructions through the buttons on the remote controller, voice input, control panel input, etc. to control the display device 200. In some embodiments, the mobile terminal, tablet computer, computer, notebook computer, and other smart devices can also be used to control the display device 200. Figure 1

[0052] In some embodiments, the mobile terminal 300 can install a software application with the display device 200, implement connection communication through a network communication protocol, and 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 achieve a synchronous display function. The display device 200 can also communicate with the display device 200 through various communication means. 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 display device 200 can provide various content and interaction 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 a smart network television function with computer support.

[0053] ​In some embodiments, the electronic device provided by the embodiments of the present application can be the display device 200 described above. The display device 200 is installed with an application for playing multimedia files, such as a player. When a user plays a multimedia file stored in a local memory by using the player, if the multimedia file does not store audio and video index information (for example, a multimedia file in TS format), when the player plays the multimedia file, if the time point corresponding to the fast forward operation of the user is far away from the current time point at which the player plays the multimedia file, the player needs to spend a long time to find an I frame, which will inevitably cause the player to temporarily play the multimedia file, and the user sees that the picture is stuck, resulting in poor user experience. Therefore, the method for playing a multimedia file provided by the embodiments of the present application determines the display timestamp and the actual offset position of each I frame contained in the multimedia file while playing the multimedia file which does not store audio and video index information. In this way, the display timestamp corresponding to each I frame in the multimedia file and the actual offset position corresponding to each I frame can be obtained. Then, when a fast forward operation on the playing progress of the multimedia file is received, the playing timestamp corresponding to the fast forward operation is first determined. Then, the display timestamp whose difference from the playing timestamp is less than or equal to a target threshold is found in the known display timestamps, the multimedia data at the actual offset position corresponding to the display timestamp whose difference from the playing timestamp is less than or equal to the target threshold is read, and the multimedia data is played. Since the display timestamp and the actual offset position of each I frame contained in the multimedia file are obtained while the multimedia file is played, when the user performs a fast forward operation on the playing progress of the multimedia file, the corresponding I frame and the actual offset position corresponding to the I frame can be quickly found, so that the phenomenon that the picture of the multimedia file played by the player is stuck due to spending a lot of time to find the I frame can be avoided.

[0054] Figure 2 A hardware configuration block diagram of the display device 200 according to an exemplary embodiment is shown. As shown in FIG. 2, the display device 200 includes a processor 210, a memory 220, a display 230, a communication interface 240, and a storage 250. Figure 2The display device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a storage, a power supply, and a user interface 280. The controller includes a central processing unit, a video processor, an audio processor, a graphic processor, a RAM, a ROM, and a first interface to an n-th interface for input / output. The display 260 can be a display with a touch function, such as a touch display. The tuner and demodulator 210 receives a broadcast television signal through a wired or wireless reception method, and demodulates audio and video signals, such as an EPG data signal, from a plurality of wireless or wired broadcast television signals. The detector 230 collects a signal of an external environment or interaction with the outside. The controller 250 and the tuner and demodulator 210 can be located in different split devices, that is, the tuner and demodulator 210 can also be in an external device of a main body device in which the controller 250 is located, such as an external set-top box, etc.

[0055] In some embodiments, the controller 250 controls the operation of the display device and responds to the user's operation by storing various software control programs in the storage. The controller 250 controls the overall operation of the display device 200.

[0056] In some examples, the display device 200 applying one or more embodiments is a television 1, and the operating system of the television 1 is an Android system, for example, as shown in FIG. 1. Figure 3 As shown, the television 1 can be logically divided into an applications layer (referred to as "application layer") 21, an application framework layer (referred to as "framework layer") 22, an Android runtime and system library layer (referred to as "system runtime library layer") 23, and a kernel layer 24.

[0057] The application layer 21 includes one or more applications. The application can be a system application or a third-party application. For example, the application layer 21 includes a first application, and the first application can provide a multimedia file playing function. The framework layer 22 provides an application programming interface (API) and a programming framework for the application program of the application layer 21. The system runtime library layer 23 provides support for the upper layer, that is, the framework layer 22, and when the framework layer 22 is used, the Android operating system runs the C / C++ library contained in the system runtime library layer 23 to realize the function of the framework layer 22. The kernel layer 24 is a software middleware between the hardware layer and the application layer 21, and is used to manage and control hardware and software resources.

[0058] In some examples, after the television 1 is powered on, the first application is started. Then, the user can play the locally stored multimedia file through the first application. When the processing unit 201 of the first application determines that the receiving unit 202 receives a selection operation on the multimedia file, the video processor in the controller 205 is invoked to decode the multimedia file to obtain decoded multimedia data. Then, the processing unit 201 sends the decoded multimedia data to the display unit 203. The display unit 203 displays the decoded multimedia data by invoking the display 260 of the television 1, so that the television 1 plays the multimedia data. Then, the processing unit 201 pre-reads the multimedia file to determine the display timestamp and the actual offset position of each I-frame in the multimedia file. In this way, the display timestamp corresponding to each I-frame in the multimedia file and the actual offset position corresponding to each I-frame in the multimedia file are obtained. When the processing unit 201 determines that the receiving unit 202 receives a fast-forward operation on the play progress of the multimedia file, the play timestamp corresponding to the fast-forward operation is determined. Then, the processing unit 201 reads the multimedia data in the actual offset position corresponding to the display timestamp having a difference from the play timestamp less than or equal to a target threshold, by searching for the display timestamp having a difference from the play timestamp less than or equal to the target threshold from the known display timestamps. Then, the processing unit 201 invokes the video processor in the controller 205 to decode the read multimedia data to obtain decoded multimedia data. Then, the processing unit 201 sends the decoded multimedia data to the display unit 203. The display unit 203 displays the decoded multimedia data by invoking the display 260 of the television 1. In this way, the television 1 can continue to play the multimedia file at the play timestamp corresponding to the fast-forward operation of the user.

[0059] In addition, after obtaining the display timestamp corresponding to each I-frame in the multimedia file and the actual offset position corresponding to each I-frame in the multimedia file, in order to ensure the user experience, when the processing unit 201 receives an exit operation for exiting the play of the multimedia file, the processing unit 201 stores the display timestamp and the actual offset position of each I-frame in the multimedia file to a target position (for example, a memory cache list in the storage unit 205). In this way, the next time the user plays the multimedia file, because the display timestamp corresponding to each I-frame in the multimedia file and the actual offset position corresponding to each I-frame in the multimedia file have been stored in the memory cache list, when the user plays the multimedia file through the first application again, the first application does not need to pre-read the multimedia file while playing the multimedia file, so that the occupation of the computing resources of the television 1 can be reduced.

[0060] Specifically, the electronic device provided in this embodiment may be the display device 200 or the server 400 described above, and no limitation is made here.

[0061] Specifically, storage unit 404 of server 400 is used to store preset relationship tables and data such as the operating system of server 400.

[0062] Specifically, the storage unit 204 of the display device 200 is used to store locally downloaded multimedia files and data such as the computer program of the first application.

[0063] The multimedia files and multimedia data involved in this application may be data authorized by the user or fully authorized by all parties.

[0064] In the following embodiments, the execution subject of the multimedia file playback method provided in the embodiments of this disclosure is the above-mentioned display device 200, and the display device 200 is a television set 1, to illustrate the method of the embodiments of this application.

[0065] This application provides a method for playing multimedia files, such as... Figure 4 As shown, the method for playing the multimedia file may include S11-S14.

[0066] S11. Upon receiving a selection operation for a multimedia file, play the multimedia file. The multimedia file does not store audio or video index information.

[0067] In some examples, the user saves the multimedia file by downloading it to the memory of the television 1, so that the next time the user uses the television 1 to play the multimedia file (by using the player in the television 1 to play the multimedia file), the television 1 can read the multimedia file from the memory and play it. For some special multimedia files, the multimedia file itself does not store audio and video index information (for example, a multimedia file in TS format), so when the user uses the player in the television 1 to play the multimedia file stored in the memory of the television 1, if the time point corresponding to the fast forward operation of the user is far away from the current time point at which the player is currently playing the multimedia file, the player needs to spend a long time to find the I frame, which will inevitably cause the player to temporarily play the multimedia file, and the user will see that the picture is stuck, resulting in a poor user experience. To solve the above problem, the method for playing a multimedia file provided in the embodiments of the present disclosure can be used to play a multimedia file that does not store audio and video index information, while pre-reading data of the multimedia file to determine the display timestamp and the actual offset position of each I frame included in the multimedia file. In this way, when a fast forward operation on the playing progress of the multimedia file is received, a display timestamp that matches the playing timestamp corresponding to the fast forward operation is searched from the known display timestamps. Since each display timestamp corresponds to an actual offset position, after the display timestamp is determined, the multimedia data at the actual offset position corresponding to the display timestamp can be read and played, so that the problem of picture sticking can be avoided.

[0068] S12, pre-reading data of the multimedia file to determine the display timestamp and the actual offset position of each I frame included in the multimedia file.

[0069] In some examples, after the multimedia file is successfully played, assuming that the total length of the multimedia file is M, based on the size of the multimedia file, N threads (N can be configured based on the performance of the television 1, for example, N is equal to 5) are opened to read the multimedia data in each segment (for example, the segment data between 0 and M*1 / N, or the segment data between M*(N-2) / N and M*(N-1) / N) from the actual offset positions of 0, M*1 / N, M*2 / N,..., M*(N-1) / N, analyze the I frame information in the multimedia data, and store the presentation timestamp (PTS) and the actual offset position of the analyzed I frame in the memory cache list until the entire multimedia file is analyzed.

[0070] For example, when M is equal to 300MB and N is equal to 5, the correspondence between the threads and the segment data is shown in Table 1.

[0071] Table 1

[0072] Thread Segmented data Thread 1 (0,60] Thread 2 (60,120] Thread 3 (120,180] Thread 4 (180,240] Thread 5 (240,300]

[0073] In this way, different threads correspond to different segment data. For example, thread 1 processes data between the starting position 0 and the actual offset position 60MB, that is, thread 1 processes the data of the first 60MB in the multimedia file. Similarly, thread 2 processes data between the actual offset position 60MB and the actual offset position 120MB, that is, thread 2 processes data from 60MB to 120MB in the multimedia file. Similarly, thread 3 processes data between the actual offset position 120MB and the actual offset position 180MB, that is, thread 3 processes data from 120MB to 180MB in the multimedia file. Similarly, thread 4 processes data between the actual offset position 180MB and the actual offset position 240MB, that is, thread 4 processes data from 180MB to 240MB in the multimedia file. Similarly, thread 5 processes data between the actual offset position 240MB and the actual offset position 300MB, that is, thread 5 processes data after 240MB in the multimedia file. In this way, the data pre-reading of the multimedia file is completed.

[0074] As can be seen, while the player of the television 1 plays the multimedia file, the player of the television 1 can pre-read the data of the multimedia file through multiple threads, so that the display timestamp and the actual offset position of each I frame contained in the multimedia file can be quickly obtained.

[0075] S13, in the case where the fast forward operation on the playing progress of the multimedia file is received, determining the playing timestamp corresponding to the fast forward operation.

[0076] In some examples, when the content of the multimedia file currently played by the player of the television 1 is not the content of interest of the user, at this time, the user can perform the fast forward operation on the playing progress of the multimedia file. In the case where the fast forward operation on the playing progress of the multimedia file is received, the player of the television 1 needs to determine the playing timestamp corresponding to the fast forward operation, for example, the player of the television 1 first determines the fast forward time point according to the fast forward operation. Then, the fast forward time point is converted to obtain the playing timestamp, for example, the conversion formula of the fast forward time point and the playing timestamp is pre-stored in the television 1, and then the player of the television 1 can determine the playing timestamp according to the conversion formula and the fast forward time point. Or, the television 1 inputs the fast forward time point into the conversion model to determine the playing timestamp. The training process of the conversion model is as follows:

[0077] Obtain training sample data and labeled results of the training sample data; wherein the training sample data includes the fast forward time point corresponding to the fast forward operation on the multimedia file, and the labeled results include the playing timestamp corresponding to each fast forward time point.

[0078] The training sample data is input into the neural network model to obtain a prediction result of the neural network model on the training sample data.

[0079] In a case where the prediction result is different from the label result, the network parameters of the neural network model are adjusted, and the training sample data is re-input into the neural network model until the neural network model converges, and a conversion model is obtained.

[0080] S14, in a case where there is a display timestamp with a difference from the play timestamp less than or equal to a target threshold, reading multimedia data of the multimedia file at an actual offset position corresponding to the display timestamp with the difference from the play timestamp less than or equal to the target threshold, and playing the multimedia data.

[0081] In some examples, when the player of the television 1 plays the multimedia file, a plurality of threads are created to parse a plurality of segmented data. Due to the limited speed of parsing, when a fast-forward operation on the play progress of the multimedia file is received, a display timestamp with a difference from the play timestamp less than or equal to a target threshold needs to be found in the existing display timestamps. If there is a display timestamp with a difference from the play timestamp less than or equal to the target threshold, multimedia data of the multimedia file at an actual offset position corresponding to the display timestamp with the difference from the play timestamp less than or equal to the target threshold can be read and played. If there is no display timestamp with a difference from the play timestamp less than or equal to the target threshold, the player of the television 1 needs to determine an estimated offset position according to the configuration information of the multimedia file and the play timestamp, then determine a display timestamp corresponding to the estimated offset position according to the estimated offset position, determine a display timestamp satisfying a preset condition based on the display timestamp corresponding to the estimated offset position and the play timestamp, read multimedia data of the multimedia file at an actual offset position corresponding to the display timestamp satisfying the preset condition, and play the multimedia data. In this way, even if there is no display timestamp with a difference from the play timestamp less than or equal to the target threshold in the existing display timestamps, the corresponding multimedia data can be quickly found and played, and the user experience is guaranteed.

[0082] As can be seen from the above, the method for playing a multimedia file provided by the embodiment of the present disclosure can determine the display timestamp and the actual offset position of each I frame contained in the multimedia file by pre-reading data of the multimedia file while playing the multimedia file, which does not store audio and video index information. In this way, the display timestamp corresponding to each I frame in the multimedia file and the actual offset position corresponding to each I frame can be obtained. Then, when a fast-forward operation on the playing progress of the multimedia file is received, the playing timestamp corresponding to the fast-forward operation is determined. Then, the display timestamp with a difference from the playing timestamp less than or equal to a target threshold is searched from the known display timestamps, and the multimedia data of the multimedia file at the actual offset position corresponding to the display timestamp with a difference from the playing timestamp less than or equal to the target threshold is read and played. Since the display timestamp and the actual offset position of each I frame contained in the multimedia file have been obtained while the multimedia file is played, when the user performs the fast-forward operation on the playing progress of the multimedia file, the corresponding I frame and the actual offset position corresponding to the I frame can be quickly found, so that the phenomenon of frame freezing of the multimedia file played by the player due to a large amount of time spent on searching for the I frame can be avoided.

[0083] In some examples, the method for playing a multimedia file provided by the embodiment of the present disclosure further includes the following steps. Figure 4 As shown in the method for playing a multimedia file provided by the embodiment of the present disclosure, the method further includes the following steps. Figure 5 As shown in the method for playing a multimedia file provided by the embodiment of the present disclosure, the method further includes the following steps.

[0084] S15, when it is determined that there is no display timestamp with a difference from the playing timestamp less than or equal to the target threshold, determining an estimated offset position according to the configuration information of the multimedia file and the playing timestamp.

[0085] In some examples, the configuration information includes a file size, a total playing duration of the file and a file code rate, and the estimated offset position satisfies the following estimation formula:

[0086]

[0087] wherein P represents the estimated offset position, t represents the playing timestamp, T represents the total playing duration of the file, M represents the file size, and B represents the file code rate.

[0088] For example, a multimedia file has a file size of 300MB, a total playback duration of 7200s, a file bitrate of 1MB / s, and a playback timestamp of 3600s. Based on the estimation formula, the predicted offset position P is determined to be 149.75MB. In this case, the player on TV 1 needs to determine the display timestamp corresponding to the predicted offset position (149.75MB). For example, it can parse the multimedia data at 149.75MB to obtain the corresponding display timestamp. Alternatively, it can look up the corresponding display timestamp in a pre-stored mapping between predicted offset positions and display timestamps to obtain the display timestamp corresponding to the predicted offset position.

[0089] S16. Determine the display timestamp corresponding to the estimated offset position based on the estimated offset position.

[0090] S17. Based on the display timestamp and playback timestamp corresponding to the estimated offset position, determine the display timestamp that meets the preset conditions.

[0091] In some examples, when the display timestamp corresponding to the estimated offset position is greater than the playback timestamp, it is necessary to search for display timestamps less than or equal to the playback timestamp in the direction less than the playback timestamp, using the frame group as a step size (e.g., 2 seconds), where the difference between the display timestamp and the playback timestamp is less than or equal to the target threshold. If such a display timestamp exists, it is determined that it meets the preset conditions.

[0092] In other examples, when the display timestamp corresponding to the estimated offset position is less than the playback timestamp, it is necessary to use a frame group as a step size, such as 2 seconds, and search for display timestamps greater than the estimated offset position whose difference from the playback timestamp is less than or equal to the target threshold in the direction of the display timestamp corresponding to the estimated offset position. If a display timestamp exists, it is determined that the display timestamp meets the preset conditions.

[0093] In other examples, when the display timestamp corresponding to the estimated offset position is equal to the playback timestamp, the display timestamp corresponding to the estimated offset position is determined to be the display timestamp of the preset condition.

[0094] S18. Read the multimedia data corresponding to the actual offset position of the display timestamp that meets the preset conditions, and play the multimedia data.

[0095] In some feasible examples, combining Figure 5 ,like Figure 6 As shown, the above S17 can be implemented by the following S170 and S171.

[0096] S170, in the case that the display timestamp corresponding to the estimated offset position is different from the playing timestamp, sequentially searching, as a step, display timestamps less than or equal to the playing timestamp.

[0097] S171, determining, according to the display timestamps less than or equal to the playing timestamp, the display timestamp satisfying the preset condition as the display timestamp less than or equal to the playing timestamp and having a difference from the playing timestamp less than or equal to the target threshold.

[0098] In some implementable examples, the method is combined with Figure 4 As shown in Figure 7 S12 can be implemented by the following S120-S122.

[0099] S120, pre-reading data of the multimedia file to determine a starting position and at least two actual offset positions.

[0100] S121, for segmented data between two adjacent actual offset positions or segmented data between the starting position and an actual offset position adjacent to the starting position, performing the following operation: creating a thread, parsing the segmented data to determine a display timestamp of each I-frame contained in the segmented data.

[0101] S122, determining, according to the display timestamp of each I-frame corresponding to each segmented data and the actual offset position, the display timestamp of each I-frame contained in the multimedia file and the actual offset position.

[0102] In some implementable examples, the method is combined with Figure 4 As shown in Figure 8 S13 can be implemented by the following S130 and S131.

[0103] S130, in the case that a fast-forward operation on the playing progress of the multimedia file is received, determining a fast-forward time point corresponding to the fast-forward operation.

[0104] S131, converting the fast-forward time point to determine a playing timestamp.

[0105] In some implementable examples, the method is combined with Figure 4 As shown in Figure 9 The method for playing the multimedia file provided by the embodiments of the present disclosure further includes S19 and S20.

[0106] S19, receiving an exit operation for exiting the playing of the multimedia file.

[0107] In some examples, when the user is not in need of watching the multimedia file, the user can perform an exit operation to exit playing the multimedia file, and the player of the television 1 exits playing the multimedia file after receiving the exit operation. In order to ensure that the user can quickly respond to the fast-forward operation of the user when playing the multimedia file next time, the method for playing the multimedia file provided by the embodiment of the present disclosure stores the display timestamp and the actual offset position of each I frame contained in the multimedia file obtained this time to a target position, such as storing to the memory cache list of the memory of the television 1. In this way, when the user plays the multimedia file next time, the player of the television 1 plays the multimedia file after receiving the selection operation of the multimedia file, and queries whether the display timestamp and the actual offset position of the I frame contained in the multimedia file are stored to the target position in the memory cache list. If yes, the data pre-reading of the multimedia file is not needed. If no, the data pre-reading of the multimedia file is continued.

[0108] In other examples, when the user watches the multimedia file for a short time, at this time, the player of the television 1 does not complete the data pre-reading of the multimedia file, that is, only the display timestamp and the actual offset position of part of the I frame in the multimedia file are obtained. At this time, the player of the television 1 exits playing the multimedia file after receiving the exit operation, and stores the display timestamp and the actual offset position of part of the I frame in the multimedia file to the target position. Then, when the user selects to play the multimedia file again, the player of the television 1 plays the multimedia file after receiving the selection operation of the multimedia file, and continues to perform the data pre-reading of the multimedia file again until the display timestamp and the actual offset position of each I frame contained in the multimedia file are obtained.

[0109] Or,

[0110] When the user watches the multimedia file for a short time, the player of the television 1 has not completed the data prediction of the multimedia file, that is, only the display timestamps and actual offset positions of part of the I frames in the multimedia file are obtained. At this time, the player of the television 1 exits the playing of the multimedia file after receiving the exit operation, and stores the display timestamps and actual offset positions of part of the I frames in the multimedia file and the current processing progress to the target position. After that, when the user selects to play the multimedia file again, the player of the television 1 receives the selection operation of the multimedia file, plays the multimedia file, and queries whether the display timestamps and actual offset positions of the I frames contained in the multimedia file are stored to the target position in the memory cache list. If yes, and the processing progress is contained, the player of the television 1 continues to perform the data prediction on the multimedia file from the processing progress as a starting point until the display timestamps and actual offset positions of each I frame contained in the multimedia file are obtained.

[0111] S20, store the display timestamps and actual offset positions of each I frame contained in the multimedia file to the target position.

[0112] In some implementable examples, the method further includes: Figure 9 As shown in the method for playing a multimedia file provided by the embodiments of the present disclosure, the method further includes S21 and S22. Figure 10 As shown in the method for playing a multimedia file provided by the embodiments of the present disclosure, the method further includes S21 and S22.

[0113] S21, obtain an exit time of the last time an exit operation of exiting the playing of the multimedia file is received.

[0114] S22, in a case where a difference between a current time and the exit time is greater than a time threshold, delete the display timestamps and actual offset positions of each I frame contained in the multimedia file stored in the target position.

[0115] In some examples, in order to prevent the display time stamp corresponding to each I frame in the multimedia file stored in the memory cache list and the actual offset position corresponding to each I frame being too many, resulting in a large amount of storage resources being occupied by the display time stamp corresponding to each I frame in the multimedia file and the actual offset position corresponding to each I frame. The method for playing a multimedia file provided by the embodiment of the present disclosure determines whether to clean up the display time stamp and the actual offset position of each I frame contained in the multimedia file stored in the target position by judging the size relationship between the difference between the current time and the exit time and the time threshold (such as 72 hours). If the difference between the current time and the exit time is greater than the time threshold, it indicates that the user has not watched the multimedia file for a long time, that is, the probability of the user accessing the multimedia file is low, and therefore the display time stamp and the actual offset position of each I frame contained in the multimedia file stored in the target position can be deleted, thereby realizing cleaning up of the storage space occupied by the target position and ensuring the space utilization rate of the storage space occupied by the target position. If the difference between the current time and the exit time is greater than the time threshold, it indicates that the user may watch the multimedia file, and therefore it is necessary to continue to save the display time stamp and the actual offset position of each I frame contained in the multimedia file.

[0116] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in the present text, the present application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical scheme. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0117] The embodiment of the present application can divide the function modules of the multimedia file playing device according to the above method examples, for example, each function module can be divided corresponding to each function, or two or more functions can be integrated in one processing unit. The integrated module can be realized in the form of hardware or in the form of software function module. It should be noted that the division of modules in the embodiment of the present application is illustrative, and is only a logical function division. When actually implemented, there can be another division method.

[0118] As shown in Figure 11 The embodiment of the present application provides a structural schematic diagram of a display device 200. It includes a processor 101, a communicator 102 and a display 103.

[0119] The processor 101 is configured to control the display 103 to play the multimedia file in a case where the communicator 102 receives a selection operation on the multimedia file; wherein the multimedia file does not store audio and video index information; the processor 101 is further configured to perform data pre-reading on the multimedia file received by the communicator 102, and determine a display timestamp and an actual offset position of each I frame contained in the multimedia file; the processor 101 is further configured to determine a play timestamp corresponding to the fast-forward operation received by the communicator 102 in a case where the communicator 102 receives a fast-forward operation on the play progress of the multimedia file; and the processor 101 is further configured to read multimedia data at an actual offset position corresponding to a display timestamp that has a difference from the play timestamp less than or equal to a target threshold, and control the display 103 to play the multimedia data in a case where the display timestamp that has the difference from the play timestamp less than or equal to the target threshold exists.

[0120] In some implementable examples, the processor 101 is further configured to determine an estimated offset position according to configuration information of the multimedia file and the play timestamp in a case where the display timestamp that has the difference from the play timestamp less than or equal to the target threshold does not exist; the processor 101 is further configured to determine a display timestamp corresponding to the estimated offset position; the processor 101 is further configured to determine the display timestamp that satisfies the preset condition based on the display timestamp corresponding to the estimated offset position and the play timestamp; and the processor 101 is further configured to read multimedia data at an actual offset position corresponding to the display timestamp that satisfies the preset condition, and control the display 103 to play the multimedia data.

[0121] In some implementable examples, the processor 101 is specifically configured to sequentially search for display timestamps less than or equal to the play timestamp in a case where the display timestamp corresponding to the estimated offset position is different from the play timestamp, with one group of pictures as a step; and the processor 101 is specifically configured to determine the display timestamp that satisfies the preset condition as a display timestamp that has a difference from the play timestamp less than or equal to the target threshold among the display timestamps less than or equal to the play timestamp.

[0122] In some implementable examples, the processor 101 is specifically configured to determine the start position and at least two actual offset positions for data pre-reading of the multimedia file; the processor 101 is specifically configured to perform the following operations on the segmented data between any two adjacent actual offset positions or the segmented data between the start position and the actual offset position adjacent to the start position: create a thread, parse the segmented data, and determine the display timestamp of each I-frame contained in the segmented data; and the processor 101 is specifically configured to determine the display timestamp and the actual offset position of each I-frame contained in the multimedia file according to the display timestamp of each I-frame corresponding to each segmented data and the actual offset position.

[0123] In some implementable examples, the processor 101 is specifically configured to determine a fast-forward time point corresponding to a fast-forward operation on the playing progress of the multimedia file in a case where the fast-forward operation is received by the communicator 102; and the processor 101 is specifically configured to convert the fast-forward time point to determine the playing timestamp.

[0124] In some implementable examples, the communicator 102 is further configured to receive an exit operation of exiting the playing of the multimedia file; and the processor 101 is further configured to store the display timestamp and the actual offset position of each I-frame contained in the multimedia file to a target position.

[0125] In some implementable examples, the communicator 102 is configured to acquire an exit time of the last time the exit operation of exiting the playing of the multimedia file is received; and the processor 101 is configured to delete the display timestamp and the actual offset position of each I-frame contained in the multimedia file stored in the target position in a case where a difference between a current time and the exit time acquired by the communicator 102 is greater than a time threshold.

[0126] All the related contents of the steps involved in the above method embodiments can be cited to the function description of the corresponding function modules, and the functions are not described here again.

[0127] Of course, the display device 200 provided by the embodiments of the present application includes but is not limited to the above-mentioned modules. For example, the display device 200 can further include a memory 104. The memory 104 can be used to store the program code of the display device 200, and can also be used to store the data generated in the running process of the display device 200, such as the data in the write request.

[0128] As an example, in combination with Figure 3 , the functions of the receiving unit 202 and the acquisition unit 204 in the display device 200 are the same as the functions of the communicator 102, the function of the processing unit 201 is the same as the function of the processor 101, the function of the display unit 103 is the same as the function of the display 103, and the function of the storage unit 205 is the same as the function of the memory 104.

[0129] As Figure 12 shown in the above embodiments, the chip system can be applied to the display device 200 in the above embodiments. The chip system includes at least one processor 1501 and at least one interface circuit 1502. The processor 1501 can be the processor in the display device 200. The processor 1501 and the interface circuit 1502 can be interconnected by a wire. The processor 1501 can receive and execute computer instructions from the memory of the display device 200 through the interface circuit 1502. When the computer instructions are executed by the processor 1501, the display device 200 can perform the steps performed by the display device 200 in the above embodiments. Of course, the chip system can also include other discrete devices, and the embodiments of the present application do not make specific limitations thereto.

[0130] The embodiments of the present application further provide a computer readable storage medium for storing the computer instructions executed by the display device 200.

[0131] The embodiments of the present application further provide a computer program product including the computer instructions executed by the display device 200.

[0132] The above description is merely one specific implementation of the present disclosure, which enables those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of playing a multimedia file, characterized by, The method comprises the following steps: In the case of receiving a selection operation on a multimedia file, playing the multimedia file; wherein no audio and video index information is stored in the multimedia file; Data pre-reading is performed on the multimedia file to determine the display timestamp and actual offset position of each I frame contained in the multimedia file; In the case of receiving a fast-forward operation on the playing progress of the multimedia file, determining the playing timestamp corresponding to the fast-forward operation; In the case of determining that there is a display timestamp with a difference from the playing timestamp less than or equal to a target threshold, reading multimedia data at an actual offset position corresponding to the display timestamp with a difference from the playing timestamp less than or equal to the target threshold of the multimedia file, and playing the multimedia data; The data pre-reading on the multimedia file to determine the display timestamp and actual offset position of each I frame contained in the multimedia file comprises: Data pre-reading is performed on the multimedia file to determine the starting position and at least two actual offset positions; For the segmented data between any two adjacent actual offset positions, or the segmented data between the starting position and the actual offset position adjacent to the starting position, the following operations are performed: creating a thread, parsing the segmented data to determine the display timestamp of each I frame contained in the segmented data; According to the display timestamp and actual offset position of each I frame corresponding to each segmented data, the display timestamp and actual offset position of each I frame contained in the multimedia file are determined.

2. The method of claim 1, wherein, The method further comprises: In the case of determining that there is no display timestamp with a difference from the playing timestamp less than or equal to a target threshold, determining an estimated offset position according to the configuration information of the multimedia file and the playing timestamp; According to the display timestamp corresponding to the estimated offset position, the display timestamp corresponding to the estimated offset position is determined; Based on the display timestamp corresponding to the estimated offset position and the playing timestamp, a display timestamp satisfying a preset condition is determined; Reading multimedia data at an actual offset position corresponding to the display timestamp satisfying the preset condition, and playing the multimedia data.

3. The method of claim 2, wherein, The determination of the display timestamp satisfying the preset condition based on the display timestamp corresponding to the estimated offset position and the playing timestamp comprises: In the case that the display timestamp corresponding to the estimated offset position is different from the playing timestamp, a group of pictures is taken as a step to sequentially find a display timestamp less than or equal to the playing timestamp; According to the display timestamp less than or equal to the playing timestamp, the display timestamp satisfying the preset condition is determined as the display timestamp less than or equal to the playing timestamp with a difference from the playing timestamp less than or equal to a target threshold.

4. The method of Claim 1, wherein, The determination of the playing timestamp corresponding to the fast-forward operation in the case of receiving a fast-forward operation on the playing progress of the multimedia file comprises: In the case of receiving a fast-forward operation on the playing progress of the multimedia file, determining a fast-forward time point corresponding to the fast-forward operation; Converting the fast-forward time point to determine a playing timestamp.

5. The method of Claim 1, wherein, The method further comprises: receiving an exit operation of exiting playing the multimedia file; storing the display timestamp and the actual offset position of each I-frame contained in the multimedia file to a target position.

6. The method of claim 5, wherein, The method further comprises: acquiring an exit time of last time receiving the exit operation of exiting playing the multimedia file; in a case that a difference between a current time and the exit time is greater than a time threshold, deleting the display timestamp and the actual offset position of each I-frame contained in the multimedia file stored in the target position.

7. An apparatus for playing a multimedia file, characterized by comprising: Comprise: a processing unit, configured to control a display unit to play a multimedia file in a case that a receiving unit receives a selection operation of the multimedia file; wherein the multimedia file does not store audio and video index information; the processing unit is further configured to perform data pre-reading on the multimedia file received by the receiving unit, and determine the display timestamp and the actual offset position of each I-frame contained in the multimedia file; the processing unit is further configured to determine a play timestamp corresponding to the fast-forward operation received by the receiving unit in a case that the receiving unit receives a fast-forward operation of a play progress of the multimedia file; the processing unit is further configured to determine a case that there is a display timestamp whose difference with the play timestamp is less than or equal to a target threshold, read multimedia data of the multimedia file at an actual offset position corresponding to the display timestamp whose difference with the play timestamp is less than or equal to the target threshold, and control the display unit to play the multimedia data; the processing unit is further configured to perform data pre-reading on the multimedia file, determine a start position and at least two actual offset positions, and perform the following operations on segmented data between two adjacent actual offset positions or segmented data between the start position and an actual offset position adjacent to the start position: create a thread, parse the segmented data, and determine the display timestamp of each I-frame contained in the segmented data; and determine the display timestamp and the actual offset position of each I-frame contained in the multimedia file according to the display timestamp and the actual offset position of each I-frame corresponding to each segmented data.

8. An electronic device, comprising: Comprise: a memory and a processor, the memory is configured to store a computer program; the processor is configured to make the electronic device realize the multimedia file playing method in any one of claims 1-6 when executing the computer program.

9. A computer-readable storage medium, characterized in that, Comprise: the computer readable storage medium stores a computer program, when the computer program is executed by a computing device, the computing device realizes the multimedia file playing method in any one of claims 1-6.

Citation Information

Patent Citations

  • A method of realizing multimedia file network playing by virtue of auxiliary files

    CN102625193A

  • Media playing method and apparatus, and storage medium

    CN108737908A