CN107249144B - Method for decoding multimedia file, multimedia player and playing equipment - Google Patents

Method for decoding multimedia file, multimedia player and playing equipment Download PDF

Info

Publication number
CN107249144B
CN107249144B CN201710335462.2A CN201710335462A CN107249144B CN 107249144 B CN107249144 B CN 107249144B CN 201710335462 A CN201710335462 A CN 201710335462A CN 107249144 B CN107249144 B CN 107249144B
Authority
CN
China
Prior art keywords
decoder
decoding
frame rate
multimedia
multimedia file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710335462.2A
Other languages
Chinese (zh)
Other versions
CN107249144A (en
Inventor
刘明根
崔新宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pico Technology Co Ltd
Original Assignee
Beijing Pico Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pico Technology Co Ltd filed Critical Beijing Pico Technology Co Ltd
Priority to CN201710335462.2A priority Critical patent/CN107249144B/en
Publication of CN107249144A publication Critical patent/CN107249144A/en
Application granted granted Critical
Publication of CN107249144B publication Critical patent/CN107249144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440236Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by media transcoding, e.g. video is transformed into a slideshow of still pictures, audio is converted into text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping

Abstract

The invention discloses a multimedia file decoding method, a multimedia player and playing equipment. The method of multimedia decoding comprises the steps of: acquiring a preset play frame rate of a multimedia file to be decoded; loading a first decoder to decode the multimedia file; monitoring a frame rate decoded by a first decoder; and if the frame rate decoded by the first decoder is less than the preset play frame rate, preloading a second decoder. According to the embodiment of the invention, the decoding efficiency of multimedia decoding can be improved.

Description

Method for decoding multimedia file, multimedia player and playing equipment
Technical Field
The present invention relates to the field of information technology, and more particularly, to a method for decoding a multimedia file, a multimedia player, and a multimedia playing device.
Background
With the development and construction of internet technology and the improvement of consumer demand, multimedia resources with very high resolution are increasingly required in daily application, and in addition, differences exist in operating environments such as a hardware system, an operating system and versions thereof, so that a single decoder cannot meet all decoding requirements.
Disclosure of Invention
The invention aims to provide a method for decoding a multimedia file so as to improve the decoding efficiency.
According to a first aspect of the present invention there is provided a method of decoding a multimedia file, comprising the steps of: acquiring a preset play frame rate of a multimedia file to be decoded; loading a first decoder to decode the multimedia file; monitoring a frame rate decoded by a first decoder; and if the frame rate decoded by the first decoder is less than the preset play frame rate, preloading the second decoder.
Optionally, the method further comprises the following steps: and timing the time that the frame rate decoded by the first decoder is less than the duration of the preset playing frame rate, and if the time is more than a set first time threshold, switching to a second decoder to decode the multimedia file.
Optionally, the method further comprises the following steps: and if the time consumed for decoding the pictures with the preset number of frames is greater than a set second time threshold value from the moment that the frame rate decoded by the first decoder is less than the preset playing frame rate, switching to a second decoder to decode the multimedia file.
Optionally, before the loading the first decoder to decode the multimedia file, the method further includes: selecting a decoder with the best decoding performance of the multimedia files of the same type of the multimedia files to be decoded from the decoders available for calling as a first decoder; the decoding performance comprises one or a combination of several of average decoding rate, lowest decoding rate and highest decoding rate; the same type refers to the same format and the same resolution and the same preset play frame rate.
Optionally, before the loading the first decoder to decode the multimedia file, the method further includes: a step of selecting a decoder having the best decoding performance for the same type of multimedia file as the multimedia file to be decoded from among the decoders available for calling as a first decoder; the step of selecting a first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, counting the times that the state duration time of the decoding frame rate of each decoder, which is less than the preset playing frame rate, is greater than a set first time threshold, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder; alternatively, the step of selecting the first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, and the times that the time consumed by decoding the pictures with the preset frame number is greater than a set second time threshold after the frame rate of the decoding is less than the preset playing frame rate, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder; the same type refers to the same format and the same resolution and the same preset play frame rate.
According to a second aspect of the present invention, there is provided a multimedia player comprising: the device comprises an acquisition unit, a decoding unit and a processing unit, wherein the acquisition unit is used for acquiring a preset play frame rate of a multimedia file to be decoded; a decoding unit including at least two decoders; a control unit configured to: a first decoder in a loading decoding unit decodes the multimedia file; monitoring a frame rate decoded by a first decoder; and preloading a second decoder if the frame rate decoded by the first decoder is less than the preset play frame rate.
Optionally, the control unit is configured to: timing the time that the frame rate decoded by the first decoder is less than the duration of the preset playing frame rate, and if the time is greater than a set first time threshold, switching to a second decoder to decode the multimedia file; or, from the time when the frame rate decoded by the first decoder is less than the preset playing frame rate, if the time consumed for decoding the pictures with the preset number of frames is greater than a set second time threshold, switching to the second decoder to decode the multimedia file.
Optionally, the control unit is configured to, before the first decoder in the load decoding unit decodes the multimedia file, further perform: selecting a decoder with the best decoding performance of the multimedia files of the same type of the multimedia files to be decoded from the decoders available for calling as a first decoder; the decoding performance comprises one or a combination of several of average decoding rate, lowest decoding rate and highest decoding rate; the same type refers to the same format and the same resolution and the same preset play frame rate.
Optionally, the control unit is configured to, before the first decoder in the load decoding unit decodes the multimedia file, further perform: a step of selecting a decoder having the best decoding performance for the same type of multimedia file as the multimedia file to be decoded from among the decoders available for calling as a first decoder; the step of selecting a first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, counting the times that the state duration time of the decoding frame rate of each decoder, which is less than the preset playing frame rate, is greater than a set first time threshold, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder; alternatively, the step of selecting the first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, and the times that the time consumed by decoding the pictures with the preset frame number is greater than a set second time threshold after the frame rate of the decoding is less than the preset playing frame rate, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder; the same type refers to the same format and the same resolution and the same preset play frame rate.
According to a third aspect of the present invention, there is provided a multimedia playing device comprising a memory and a processor, the memory being configured to store instructions for controlling the processor to operate so as to perform the aforementioned method of decoding a multimedia file.
The inventor of the present invention finds that, in the prior art, there is no technical solution for comparing the decoding frame rate with the preset play frame rate, and below the play frame rate, preloading another decoder for calling for later determining whether to switch the decoder. Therefore, the technical task to be achieved or the technical problems to be solved by the present invention are never thought or anticipated by those skilled in the art, and therefore the present invention is a new technical solution.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly described below. It is appreciated that the following drawings depict only certain embodiments of the invention and are therefore not to be considered limiting of its scope. For a person skilled in the art, it is possible to derive other relevant figures from these figures without inventive effort.
Fig. 1 is a flow chart illustrating a method for providing a multimedia solution according to an embodiment of the present invention.
Fig. 2 is a flow chart of a method for multimedia solution according to the second embodiment of the present invention.
Fig. 3 shows a flowchart of a method for multimedia solution provided by the third embodiment of the present invention.
Fig. 4 shows a block diagram of a multimedia player provided by an embodiment of the present invention.
Fig. 5 is a block diagram illustrating a hardware configuration of a multimedia playback device according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 shows a flowchart of a method for providing a multimedia solution according to an embodiment of the present invention, where the method includes the following steps.
Step 101, loading a first decoder to decode a multimedia file. The first decoder needs to support the format of the multimedia file.
Step 102, monitoring a frame rate of decoding by the first decoder.
And 103, preloading a second decoder if the decoding frame rate of the first decoder is less than the preset playing frame rate. The second decoder needs to support the format of the multimedia file.
Before step 103, a step 100 of obtaining a preset play frame rate of the multimedia file to be decoded is further included, and the order of step 100 to the order of step 101 and step 102 is not limited.
For example, the preset frame rate of playing the multimedia file to be played is 30 frames/second, and if the frame rate decoded by the first decoder is less than 30 frames/second, the second decoder is preloaded. The preset play frame rate may be used as a preliminary determination criterion whether the first decoder is switched to the second decoder, and the second decoder may be preloaded if the preset play frame rate is lower than the preset play frame rate.
Preloading the second decoder is advantageous in that a person skilled in the art may set further decision criteria to decide whether to switch the first decoder to the second decoder. If the further decision criterion is also fulfilled, switching to a second decoder. Because the second decoder is preloaded, the decoding of the multimedia file is not interrupted, and the decoding efficiency is improved. Optionally, the second decoder is un-preloaded if the further decision criterion is not met.
The second embodiment shown in fig. 2 and the third embodiment shown in fig. 3 provide two of the further decision criteria.
The method for decoding multimedia provided in the second embodiment is compared with the first embodiment in which step 104 is added after step 103: and timing the time that the frame rate decoded by the first decoder is less than the duration of the preset playing frame rate, and if the time is more than a set first time threshold, switching to a second decoder to decode the multimedia file. Optionally, the second decoder is un-preloaded if the above condition is not met.
For example, if the first time threshold is 30 seconds, following the example in embodiment one, if the frame rate decoded by the first decoder is less than 30 frames/second and the state lasts for more than 30 seconds, the second decoder is switched to decode, otherwise, the second decoder is not preloaded.
The method for decoding multimedia provided in the third embodiment is added with step 105 after step 103, compared to the first embodiment: if the time consumed for decoding the pictures with the preset number of frames is greater than a set second time threshold value from the moment that the frame rate decoded by the first decoder is less than the preset playing frame rate, switching to a second decoder to decode the multimedia file; otherwise, optionally, the second decoder is un-preloaded. The second time threshold may be set as a quotient obtained by dividing the predetermined frame number by the preset play frame rate, or may be set as a smaller value than the quotient, which is not limited herein.
For example, the predetermined number of frames is 600 frames, the second time threshold is 20 seconds, following the example in the first embodiment, from the frame rate decoded by the first decoder being less than 30 frames/second, if the time consumed for decoding 600 frames of pictures is greater than 20 seconds, the second decoder is switched to decode, otherwise, the second decoder is not preloaded.
The numbers listed in the foregoing examples are for illustrative purposes only and are not intended to limit embodiments of the invention. The skilled person can make different settings according to the actual situation.
The multimedia decoding method provided by the second embodiment and the third embodiment has the advantages that the decoder is dynamically switched to adapt to the current operating environment, and the decoding efficiency is improved.
Further, before step 101 in the foregoing embodiments, the preference of the first decoder may be set. For example, a decoder with the best decoding performance for the same type of multimedia file of the multimedia file to be decoded is selected from the available decoders as a first decoder; the decoding performance is one or a combination of several of average decoding rate, lowest decoding rate and highest decoding rate; the same type refers to the same format and the same resolution and the same preset play frame rate.
The skilled person can also define the performance of decoding the same type of multimedia file himself, and then select the best performing decoder as the first decoder.
In one specific example, the step of selecting the first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, and the times that the state duration time of the frame rate of decoding is less than the preset play frame rate is greater than a set first time threshold, calculating the ratio of the times to the times of decoding the same type of multimedia files, wherein the decoder with the lowest ratio is the decoder with the best performance, and selecting the decoder with the lowest ratio as the first decoder.
In one specific example, the step of selecting the first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, and the times that the time consumed by decoding the pictures with the preset frame number is greater than a set second time threshold after the frame rate of the decoding is less than the preset playing frame rate, and calculating the ratio of the times to the times of decoding the same type of multimedia files, wherein the decoder with the lowest ratio is the decoder with the best performance, and the decoder with the lowest ratio is selected as a first decoder; the same type refers to the same format and the same resolution and the same preset play frame rate.
For example, before the current decoding, corresponding to the same type of multimedia file, the first decoder is called 10 times, where 5 times of the situation that the duration of the state in which the decoding frame rate is less than the preset playback frame rate is greater than the set first time threshold occurs, and the second decoder is called 5 times, where 4 times of the situation that the duration of the state in which the decoding frame rate is less than the preset playback frame rate is greater than the set first time threshold occurs, then the first decoder is preferentially loaded in the first decoder and the second decoder.
For another example, before the current decoding, the first decoder is called 10 times corresponding to the same type of multimedia file, where 5 times of the calling are started when the frame rate of decoding is less than the preset playing frame rate, when the time consumed for decoding the pictures with the preset number of frames is greater than the set second time threshold, the second decoder is called 5 times, when 4 times of the calling are started when the frame rate of decoding is less than the preset playing frame rate, and when the time consumed for decoding the pictures with the preset number of frames is greater than the set second time threshold, the first decoder is preferentially loaded in the first decoder and the second decoder.
The foregoing preferred method for the first decoder has the benefit of dynamically monitoring the decoder decoding efficiency for different multimedia files and dynamically optimizing the loading sequencing of the decoder.
The above embodiments are described by taking two decoders as examples, and the actual decoders are not limited to two.
If all the decoders available for calling decode the same multimedia file, the switching is needed, optionally, the first decoder selected before is switched to decode the file, and the file is kept to be decoded by using the decoder, and then the times do not account for the calculation of the decoding performance no matter how many times the first decoder needs to be switched by other decoders. Various settings may be made by those skilled in the art. For example, in the above solution, after the first decoder is switched to the previously selected decoder for decoding, if the first decoder needs to be switched again, the first decoder is switched to the other decoders according to the previous priority order, and the switching takes into account the calculation of the decoding performance.
The present invention also provides a multimedia player, a block diagram of which is shown in fig. 4.
The multimedia player 200 includes a decoding unit 201, a control unit 202, and an acquisition unit 203. The decoding unit 201 includes at least two decoders, a first decoder 2011 and a second decoder 2012. The control unit 202 calls a decoder in the decoding unit 201 to decode the multimedia file, and controls the multimedia player 200 to play the decoded multimedia file. The obtaining unit 203 is configured to obtain a preset frame rate of the multimedia file to be decoded.
The control unit 202 calls the decoder in the decoding unit 201 to decode according to the method of multimedia decoding.
It is obvious to those skilled in the art that the foregoing multimedia decoding method can be implemented by hardware or a combination of hardware and software. Based on the same inventive concept, a multimedia playing device according to an embodiment of the present invention is described with reference to fig. 5 to perform the aforementioned method of multimedia decoding.
Fig. 5 is a block diagram showing an example of a hardware configuration of a multimedia playback apparatus that can be used to implement an embodiment of the present invention, and the multimedia playback apparatus 3000 includes a processor 3010, a memory 3020, an interface device 3030, a communication device 3040, a display device 3050, an input device 3060, a speaker 3070, a microphone 3080, and the like.
The memory 3020 is configured to store instructions for controlling the processor 3010 to operate to perform a method of multimedia decoding according to any of the preceding.
The processor 3010 may be, for example, a central processing unit CPU, a microprocessor MCU, or the like. The memory 3020 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface 3030 includes, for example, a USB interface. The communication device 3040 can perform wired or wireless communication, for example. The display device 3050 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 3060 may include, for example, a touch screen, a keyboard, and the like. A user can input/output voice information through the speaker 3070 and the microphone 3080.
The multimedia playback device shown in fig. 5 is merely illustrative and is in no way intended to limit the present invention, its applications, or uses. It will be appreciated by those skilled in the art that although a plurality of devices are shown in fig. 5, the present invention may relate to only some of the devices therein. Those skilled in the art can design instructions according to the disclosed aspects, and how the instructions control the operation of the processor is well known in the art, and therefore, will not be described in detail herein.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. It will be apparent to those skilled in the art that the above embodiments may be used alone or in combination with each other as desired. In addition, for the device embodiment, since it corresponds to the method embodiment, the description is relatively simple, and for relevant points, refer to the description of the corresponding parts of the method embodiment. The system embodiments described above are merely illustrative, in that modules illustrated as separate components may or may not be physically separate.
In addition, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation 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 may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustrative purposes only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope of the invention. The scope of the invention is defined by the appended claims.

Claims (10)

1. A method of decoding a multimedia file, comprising the steps of:
acquiring a preset play frame rate of a multimedia file to be decoded;
loading a first decoder to decode the multimedia file;
monitoring a frame rate decoded by a first decoder;
if the frame rate decoded by the first decoder is less than the preset play frame rate, preloading a second decoder;
and switching to a second decoder to decode the multimedia file under the condition that a preset condition is met.
2. The method for decoding a multimedia file according to claim 1, wherein said switching to a second decoder to decode the multimedia file if a preset condition is met comprises:
and timing the time that the frame rate decoded by the first decoder is less than the duration of the preset playing frame rate, and if the time is more than a set first time threshold, switching to a second decoder to decode the multimedia file.
3. The method for decoding a multimedia file according to claim 1, wherein said switching to a second decoder to decode the multimedia file if a preset condition is met comprises:
and if the time consumed for decoding the pictures with the preset number of frames is greater than a set second time threshold value from the moment that the frame rate decoded by the first decoder is less than the preset playing frame rate, switching to a second decoder to decode the multimedia file.
4. The method of decoding a multimedia file according to any of claims 1-3, further comprising, prior to said loading the first decoder to decode the multimedia file:
selecting a decoder with the best decoding performance of the multimedia files of the same type of the multimedia files to be decoded from the decoders available for calling as a first decoder;
the decoding performance comprises one or a combination of several of average decoding rate, lowest decoding rate and highest decoding rate;
the same type refers to the same format and the same resolution and the same preset play frame rate.
5. The method of decoding a multimedia file according to any of claims 1-3, further comprising, prior to said loading the first decoder to decode the multimedia file:
a step of selecting a decoder having the best decoding performance for the same type of multimedia file as the multimedia file to be decoded from among the decoders available for calling as a first decoder;
the step of selecting a first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, counting the times that the state duration time of the decoding frame rate of each decoder, which is less than the preset playing frame rate, is greater than a set first time threshold, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder;
alternatively, the step of selecting the first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, and the times that the time consumed by decoding the pictures with the preset number of frames after the frame rate of the decoding is less than the preset playing frame rate is more than a set second time threshold value, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder;
the same type refers to the same format and the same resolution and the same preset play frame rate.
6. A multimedia player, comprising:
the device comprises an acquisition unit, a decoding unit and a processing unit, wherein the acquisition unit is used for acquiring a preset play frame rate of a multimedia file to be decoded;
a decoding unit including at least two decoders;
a control unit configured to:
a first decoder in a loading decoding unit decodes the multimedia file;
monitoring a frame rate decoded by a first decoder;
if the frame rate decoded by the first decoder is less than the preset play frame rate, preloading a second decoder;
and switching to a second decoder to decode the multimedia file under the condition that a preset condition is met.
7. The multimedia player of claim 6,
the control unit is configured to:
timing the time that the frame rate decoded by the first decoder is less than the duration of the preset playing frame rate, and if the time is greater than a set first time threshold, switching to a second decoder to decode the multimedia file;
or, from the time when the frame rate decoded by the first decoder is less than the preset playing frame rate, if the time consumed for decoding the pictures with the preset number of frames is greater than the set second time threshold, switching to the second decoder to decode the multimedia file.
8. Multimedia player according to claim 6 or 7,
the control unit is configured to, before the first decoder in the load decoding unit decodes the multimedia file, further perform:
selecting a decoder with the best decoding performance of the multimedia files of the same type of the multimedia files to be decoded from the decoders available for calling as a first decoder;
the decoding performance comprises one or a combination of several of average decoding rate, lowest decoding rate and highest decoding rate;
the same type refers to the same format and the same resolution and the same preset play frame rate.
9. Multimedia player according to claim 6 or 7,
the control unit is configured to, before the first decoder in the load decoding unit decodes the multimedia file, further perform:
a step of selecting a decoder having the best decoding performance for the same type of multimedia file as the multimedia file to be decoded from among the decoders available for calling as a first decoder;
the step of selecting a first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, counting the times that the state duration time of the decoding frame rate of each decoder, which is less than the preset playing frame rate, is greater than a set first time threshold, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder;
alternatively, the step of selecting the first decoder comprises: counting the decoding times of the same type of multimedia files by each decoder, and the times that the time consumed by decoding the pictures with the preset frame number is greater than a set second time threshold after the frame rate of the decoding is less than the preset playing frame rate, calculating the ratio of the times to the times of decoding the same type of multimedia files, and selecting the decoder with the lowest ratio as a first decoder;
the same type refers to the same format and the same resolution and the same preset play frame rate.
10. A multimedia playback device comprising a memory and a processor, the memory storing instructions for controlling the processor to operate to perform a method of multimedia file decoding according to any of claims 1-5.
CN201710335462.2A 2017-05-12 2017-05-12 Method for decoding multimedia file, multimedia player and playing equipment Active CN107249144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710335462.2A CN107249144B (en) 2017-05-12 2017-05-12 Method for decoding multimedia file, multimedia player and playing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710335462.2A CN107249144B (en) 2017-05-12 2017-05-12 Method for decoding multimedia file, multimedia player and playing equipment

Publications (2)

Publication Number Publication Date
CN107249144A CN107249144A (en) 2017-10-13
CN107249144B true CN107249144B (en) 2020-05-15

Family

ID=60016632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710335462.2A Active CN107249144B (en) 2017-05-12 2017-05-12 Method for decoding multimedia file, multimedia player and playing equipment

Country Status (1)

Country Link
CN (1) CN107249144B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740383B (en) * 2018-07-20 2021-10-08 宏碁股份有限公司 Multimedia file management method, terminal device, service device and file management system
CN109218763A (en) * 2018-11-12 2019-01-15 青岛海信传媒网络技术有限公司 A kind of method and smart television of streaming media video switching
CN111479165B (en) 2019-01-23 2021-08-06 上海哔哩哔哩科技有限公司 Seamless switching method and device for software and hardware decoding resolution and storage medium
CN110147512B (en) * 2019-05-16 2022-12-20 腾讯科技(深圳)有限公司 Player preloading method, player running method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020096102A (en) * 2001-06-16 2002-12-31 엘지전자 주식회사 Stabilizing apparatus for output of composite video signal
CN103856812A (en) * 2014-03-25 2014-06-11 北京奇艺世纪科技有限公司 Video playing method and device
US8868999B1 (en) * 2011-01-06 2014-10-21 Marvell International Ltd. Systems and methods for erasure correction of iterative codes
CN104660978A (en) * 2013-11-18 2015-05-27 三星泰科威株式会社 Image processing apparatus and method for processing images
CN104737550A (en) * 2013-02-05 2015-06-24 华为技术有限公司 Multimedia redirection method, server and client
CN105052066A (en) * 2013-03-21 2015-11-11 马维尔国际贸易有限公司 Systems and methods for multi-stage soft input decoding

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8261170B2 (en) * 2007-06-19 2012-09-04 Mitsubishi Electric Research Laboratories, Inc. Multi-stage decoder for error-correcting codes
CN101803451B (en) * 2007-09-24 2013-01-23 朗讯科技公司 Method and system for implementing codec transition for voice service
US8284082B2 (en) * 2010-10-27 2012-10-09 Sling Media Pvt. Ltd. Dynamic encode setting adjustment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020096102A (en) * 2001-06-16 2002-12-31 엘지전자 주식회사 Stabilizing apparatus for output of composite video signal
US8868999B1 (en) * 2011-01-06 2014-10-21 Marvell International Ltd. Systems and methods for erasure correction of iterative codes
CN104737550A (en) * 2013-02-05 2015-06-24 华为技术有限公司 Multimedia redirection method, server and client
CN105052066A (en) * 2013-03-21 2015-11-11 马维尔国际贸易有限公司 Systems and methods for multi-stage soft input decoding
CN104660978A (en) * 2013-11-18 2015-05-27 三星泰科威株式会社 Image processing apparatus and method for processing images
CN103856812A (en) * 2014-03-25 2014-06-11 北京奇艺世纪科技有限公司 Video playing method and device

Also Published As

Publication number Publication date
CN107249144A (en) 2017-10-13

Similar Documents

Publication Publication Date Title
CN107249144B (en) Method for decoding multimedia file, multimedia player and playing equipment
KR101756044B1 (en) Method, device, terminal device, program and recording medium for video effect processing
US20110096077A1 (en) Controlling animation frame rate of applications
CN110166810B (en) Video rendering engine switching method, device and equipment and readable storage medium
US20170324998A1 (en) Method for playing video, client, and computer storage medium
CN111615682A (en) Method and apparatus for selecting a presentation mode based on a view angle
CN110858827A (en) Broadcast starting acceleration method and device and computer readable storage medium
CN108966315B (en) Wireless network acquisition method and device and electronic equipment
CN106610828B (en) Android system-based GIF animation playing method and device
CN113873316A (en) Live broadcast room video playing method and device
WO2016184171A1 (en) Object selection method and apparatus
US8648870B1 (en) Method and apparatus for performing frame buffer rendering of rich internet content on display devices
KR101953503B1 (en) DPI adaptation method and electronic device
US10165245B2 (en) Pre-fetching video content
CN115460458A (en) Video frame loss method and device
US9041864B2 (en) Method and apparatus for temporal stabilization of streaming frames
CN110662102B (en) Filter gradual change effect display method, storage medium, equipment and system
KR102146557B1 (en) Method and apparatus for rendering data of web application and recording medium thereof
CN105138380A (en) Method and device for starting Linux system
EP3264284A1 (en) Data processing method and device
CN106792149B (en) Picture playing method and device
WO2016032865A1 (en) Thumbnail generation
CN108803969B (en) Information list display method, application terminal and storage device
CN107133021B (en) Information processing method and electronic equipment
CN109905759B (en) List display method, device, equipment and medium applied to Android client

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant