CN108377421B - Video playing method, display device and computer readable storage medium - Google Patents

Video playing method, display device and computer readable storage medium Download PDF

Info

Publication number
CN108377421B
CN108377421B CN201810391334.4A CN201810391334A CN108377421B CN 108377421 B CN108377421 B CN 108377421B CN 201810391334 A CN201810391334 A CN 201810391334A CN 108377421 B CN108377421 B CN 108377421B
Authority
CN
China
Prior art keywords
display area
image
image display
adjusted
ratio
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
CN201810391334.4A
Other languages
Chinese (zh)
Other versions
CN108377421A (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.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital 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 Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN201810391334.4A priority Critical patent/CN108377421B/en
Publication of CN108377421A publication Critical patent/CN108377421A/en
Application granted granted Critical
Publication of CN108377421B publication Critical patent/CN108377421B/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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • 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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a video playing method, which comprises the following steps: acquiring real-time performance parameters of the current display equipment, wherein the real-time performance parameters are CPU occupancy rate and/or memory occupancy rate; acquiring the image resolution and the image display area of a currently played video file on the display equipment, and obtaining image parameters according to the image resolution and the image display area; calculating to obtain a numerical ratio according to the ratio of the image parameter to the performance parameter; when the numerical ratio is smaller than or equal to the preset threshold, continuing to maintain the image resolution and the image display area to play the video file; and when the numerical ratio is larger than the preset threshold, reducing the image resolution and/or reducing the image display area. The invention also discloses a display device and a computer readable storage medium. The technical scheme provided by the invention can reduce the pause phenomenon during video playing.

Description

Video playing method, display device and computer readable storage medium
Technical Field
The present invention relates to the field of video playing technologies, and in particular, to a video playing method, a display device, and a computer-readable storage medium.
Background
With the development of the video technology with the high resolution such as 4K, a user can play the video with the high resolution such as 4K through the electronic device with the display screen in daily life, however, the playing of the video with the high resolution needs to occupy more memory and CPU. When the CPU performance or the memory performance cannot be used satisfactorily, video playing is jammed, and the operation of the electronic device is also jammed.
The current solution is to dynamically manage process exit according to the priority of the process, so as to ensure that the playing process can have enough idle CPU or idle memory, but this technique is usually limited by the priority of the system process, and cannot completely overcome the technical problem of playing card pause.
Therefore, it is necessary to provide a method for playing video to solve the above technical problems.
Disclosure of Invention
The invention mainly aims to provide a video playing method, a display device and a computer readable storage medium, and aims to solve the technical problem that playing is easy to be blocked when large-resolution video playing is carried out by the conventional display device.
In order to achieve the above object, the present invention provides a method for playing a video, comprising the following steps:
acquiring real-time performance parameters of the current display equipment, wherein the real-time performance parameters are CPU occupancy rate and/or memory occupancy rate;
acquiring the image resolution and the image display area of a currently played video file on the display equipment, and obtaining image parameters according to the image resolution and the image display area;
calculating to obtain a numerical ratio according to the ratio of the image parameters to the real-time performance parameters;
judging whether the numerical value ratio is larger than a preset threshold value or not;
when the numerical ratio is smaller than or equal to the preset threshold, continuing to maintain the image resolution and the image display area to play the video file;
and when the numerical ratio is larger than the preset threshold, reducing the image resolution and/or reducing the image display area so as to reduce the numerical ratio obtained after adjustment.
Preferably, the step of obtaining the image resolution and the image display area of the currently played video file on the display device and obtaining the image parameter according to the image resolution and the image display area specifically includes:
and acquiring the image resolution and the image display area of the current playing video file on the display equipment, and obtaining the image parameter according to the product of the image resolution and the image display area.
Preferably, the step of obtaining the image resolution and the image display area of the currently played video file on the display device and obtaining the image parameter according to the image resolution and the image display area specifically includes:
and acquiring the image resolution and the image display area of the current playing video file on the display equipment, and obtaining the image parameter according to the product of the image resolution, the image display area and a preset constant.
Preferably, when the numerical ratio is greater than the preset threshold, the step of reducing the image resolution and/or reducing the image display area to reduce the adjusted numerical ratio specifically includes:
when the numerical ratio is larger than the preset threshold, reducing the image resolution of the video file;
obtaining the adjusted real-time performance parameters, and calculating a first numerical ratio according to the ratio of the adjusted image parameters obtained according to the image display area and the adjusted image resolution to the adjusted real-time performance parameters;
judging whether the first numerical value ratio is larger than the preset threshold value or not;
when the first numerical value ratio is smaller than or equal to the preset threshold value, the video file is played according to the image display area and the adjusted image resolution;
when the first numerical ratio is larger than the preset threshold, reducing the image display area;
obtaining the adjusted current real-time performance parameter, and calculating a second numerical ratio according to the ratio of the adjusted image parameter obtained by the adjusted image resolution and the adjusted image display area to the current real-time performance parameter;
judging whether the second numerical value ratio is larger than the preset threshold value or not;
and when the second numerical ratio is smaller than or equal to the preset threshold, the video file is played in the adjusted image resolution and the adjusted image display area.
Preferably, when the numerical ratio is greater than the preset threshold, the step of reducing the image resolution of the video file specifically includes:
when the numerical value ratio is larger than the preset threshold value, obtaining a first constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a second constant according to a constant mapping table of the current image display area and the preset image display area;
and multiplying the image resolution by the ratio of the first constant to the second constant to obtain the adjusted image resolution, and reducing the image resolution of the video file to the adjusted image resolution.
Preferably, according to the step of reducing the image display area when the first numerical ratio is greater than the preset threshold, the method specifically includes:
when the first numerical value ratio is larger than the preset threshold, obtaining a third constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a fourth constant according to a constant mapping table of the current adjusted image resolution and the preset image resolution;
and multiplying the image display area by the ratio of the third constant to the fourth constant to obtain the adjusted image display area, and reducing the image display area of the video file to the adjusted image display area.
Preferably, the adjusted image resolution is greater than or equal to a preset minimum image resolution, and the adjusted image display area is greater than or equal to a preset minimum image display area.
Preferably, after the step of reducing the image resolution and/or reducing the image display area when the numerical ratio is greater than the preset threshold, the method further includes:
and when the adjusted image resolution is equal to the preset minimum image resolution, the adjusted image display area is equal to the preset minimum image display area, and the second numerical ratio is larger than the preset threshold, stopping playing the video file and popping up prompt information.
The invention provides a display device comprising a storage unit, a processing unit, a display unit and a computer program stored on the storage unit and executable on the processing unit, the processing unit implementing the steps of the playing method of a video as described above when executing the computer program.
The present invention provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processing unit, realizes the steps of the playing method of a video as aforementioned.
In the technical scheme provided by the invention, because the image resolution and the image display area are in direct proportion to the real-time performance parameters, the ratio of the image parameters to the real-time performance parameters, which is obtained according to the image resolution and the image display area, can reflect whether the video played by the current display equipment meets the setting. The numerical ratio is used as the measurement and is compared with a preset threshold value, so that the adjustment work of automatically reducing the image resolution and/or reducing the image display area can be further carried out; the real-time performance parameters are reduced by reducing the image resolution and/or reducing the image display area, so that the technical problems of video playing stagnation and frame dropping of the display equipment are solved.
Drawings
Fig. 1 is a schematic diagram of a hardware module structure of a display device according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a video playing method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a video playing method according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating a video playing method according to a third embodiment of the present invention;
fig. 5 is a partial flowchart of a fourth embodiment of a video playing method according to the present invention;
fig. 6 is a partial flowchart of a fifth embodiment of a video playing method according to the present invention;
fig. 7 is a partial flowchart illustrating a video playing method according to a sixth embodiment of the present invention;
fig. 8 is a flowchart illustrating a video playing method according to a seventh embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be described in detail with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all the directional indicators (such as up, down, left, right, front, and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indicator is changed accordingly.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "connected," "secured," and the like are to be construed broadly, and for example, "secured" may be a fixed connection, a removable connection, or an integral part; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides a video playing method, a display device and a computer readable storage medium.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware module structure of a display device in an embodiment of the present invention.
The display device 100 in the present embodiment includes components such as a storage unit 10, a processing unit 20, and a display unit 30. The processing unit 20 is connected to the storage unit 10 and the display unit 30, respectively, and the storage unit 10 stores thereon a computer program that can be executed by the processing unit 20.
It can be understood that the display device 100 may be a television, a PC, or a terminal device with a display function, such as a smart phone, a tablet computer, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, motion video Experts Group Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion video Experts Group Audio Layer 3) player, a portable computer, or the like. The display device 100 can establish a communication connection with a server in a wired or wireless manner to realize data interaction.
In the present embodiment, the storage unit 10 may be used to store a software program as well as various data. The storage unit 10 may mainly include a storage program area that may store an operating system, an application program required for at least one function, and the like, and a storage data area that may store data (such as a video file) and the like required when the display apparatus 100 is used. In addition, the memory unit 10 may include a high-speed random access memory unit, and may also include a non-volatile memory unit, such as at least one magnetic disk memory unit, a flash memory device, or other volatile solid-state memory unit device.
The processing unit 20, which is a control center of the display apparatus 100, connects various parts of the entire display apparatus 100 using various interfaces and lines, and performs various functions of the display apparatus 100 and processes data by running or executing software programs and/or modules stored in the storage unit 10 and calling data stored in the storage unit 10, thereby performing overall monitoring of the display apparatus 100. Processing unit 20 may include one or more processors or chips; optionally, the Processing Unit 20 includes a Central Processing Unit (CPU) and a Memory bank (Memory) to process an operating system, a user interface, an application program, and the like.
The display unit 30 and the processing unit 20 may retrieve a video file pre-stored in the storage unit 10, or retrieve a video file received through the communication unit 40, and play the video file through the display unit 30.
Those skilled in the art will appreciate that the display device 100 shown in fig. 1 may also include more or fewer components than shown, or combine certain components, or a different arrangement of components.
Based on the hardware structure, various embodiments of the video playing method in the present invention are provided.
Referring to fig. 2, a flow chart of a video playing method according to a first embodiment of the present invention is shown. The video playing method 201 includes the following steps:
step S1, acquiring real-time performance parameters of the current display equipment, wherein the real-time performance parameters are CPU occupancy rate and/or memory occupancy rate;
the CPU is an ultra-large scale integrated circuit and is an operation core and a control core of a computer. The CPU occupancy rate is a CPU resource occupied by a program running in the display device 100, and indicates a situation in which the display device 100 runs the program at a certain point in time. The higher the CPU occupancy rate, the more programs are run by the display device 100 at this time, and vice versa.
A Memory (Memory) is also called an internal Memory, and is a bridge for temporarily storing arithmetic data in a CPU and data exchanged with an external Memory such as a hard disk and communicating with the CPU. Memory usage refers to the memory consumed by a process. The program occupying a large amount of memory does not necessarily occupy a lot of CPU resources, and the program occupying a large amount of CPU does not necessarily consume a large amount of memory. Too high a CPU occupancy of a program may affect the operation of other programs. And the memory occupied by a certain program is too large, which affects the overall performance of the machine.
The real-time performance parameter may be only the CPU occupancy rate or the memory occupancy rate, or may be a numerical value obtained by integrating the CPU occupancy rate and the memory occupancy rate, and is used to reflect the operation condition of the current display device 100.
Step S2, obtaining the image resolution and the image display area of the current playing video file on the display equipment, and obtaining the image parameter according to the image resolution and the image display area;
the image resolution refers to the amount of information stored in the image, and is how many pixels are in each inch of the image. The image resolution is used for representing the definition of an image, the image resolution can be represented by various methods, the image resolution representation method is not limited in the invention, and the common image resolution is 640 × 480; 1024 x 768; 1600 x 1200; 2048 × 1536; 4096 × 2160, etc., and currently 4K video refers to video having a 4096 × 2160 image resolution.
The image display area is the area occupied by multiplying the length and the width of the video image, and adopts an area unit in a physical sense.
In fact, the higher the resolution of the image, the better the definition of the image is felt by the user, the better the reality is, the larger the image display area is, and the farther away the user can watch the image. When the video file is played, the image resolution and the image display area are in direct proportion to the real-time performance parameters, and the higher the image resolution is, the higher the real-time performance parameters are; the larger the image display area, the higher the real-time performance parameters.
Step S3, calculating to obtain a numerical ratio according to the ratio of the image parameters to the performance parameters;
step S4, judging whether the numerical value ratio is larger than a preset threshold value;
the preset threshold is a value pre-stored in the display device, and the value is set by a technician according to specific needs.
Step S5, when the numerical ratio is less than or equal to the preset threshold, continuing to maintain the image resolution and the image display area to play the video file;
step S6, when the numerical ratio is greater than the preset threshold, decreasing the image resolution and/or reducing the image display area to decrease the adjusted numerical ratio.
Because the image resolution and the image display area are both in direct proportion to the real-time performance parameters, the ratio of the image parameters to the real-time performance parameters, which is obtained according to the image resolution and the image display area, can reflect whether the playing performance of the current display equipment meets the requirements of playing video files. The numerical ratio is used as the measurement and is compared with a preset threshold value, so that the adjustment work of automatically reducing the image resolution and/or reducing the image display area can be further carried out; the real-time performance parameters are reduced by reducing the image resolution and/or reducing the image display area, so that the technical problems of video playing stagnation and frame dropping of the display equipment are solved.
Please refer to fig. 3, which is a flowchart illustrating a method 202 for playing a video according to a second embodiment of the present invention. In the second embodiment, step S1, step S3, step S4, step S5 and step S6 of the video playing method 202 are the same as those in the first embodiment, and are not repeated herein; the difference is that step S2 specifically includes:
step S201, obtaining an image resolution and an image display area of a currently played video file on the display device, and obtaining the image parameter according to a product of the image resolution and the image display area. Since both the image resolution and the image display area are proportional to the real-time performance parameter, the image parameter is the product of the image resolution and the image display area, and the numerical changes of the image resolution and the image display area can be reflected by the image parameter. For example: the image resolution is 1920 x 1080 and the image display area is 88cm x 50cm, then the image parameters may be 1920 x 1080 x 88cm x 50 cm.
Please refer to fig. 4, which is a flowchart illustrating a method 203 for playing a video according to a third embodiment of the present invention. In the third embodiment, step S1, step S3, step S4, step S5 and step S6 of the video playing method 203 are the same as those in the first embodiment, and are not described again; the difference is that step S2 specifically includes:
step S211, obtaining an image resolution and an image display area of a currently played video file on the display device, and obtaining the image parameter according to a product of the image resolution, the image display area, and a preset constant. The preset constant is a gain constant which is set by a person skilled in the art according to needs so as to adjust the obtained numerical ratio and facilitate comparison.
In this embodiment, the image resolution, the image display area, and the real-time performance parameters are substituted into the following formula:
Figure BDA0001642756760000081
the image resolution is y, the image display area is z, the real-time performance parameter is x, and B/A is a preset constant.
By setting the preset constant such that the obtained numerical ratio is distributed around the value 1, that is, the preset threshold value may be set to 1. f (x, y, z) is less than or equal to 1, and the video file is played continuously while the image resolution and the image display area are maintained; and when f (x, y, z) is larger than 1, reducing the image resolution and/or reducing the image display area so as to reduce the numerical ratio obtained after adjustment.
Please refer to fig. 5, which is a flowchart illustrating the method of step S6 in the method for playing a video according to the fourth embodiment of the present invention. In the fourth embodiment, steps S1, S2, S3, S4 and S5 of the video playing method are the same as those in the first embodiment, and are not repeated herein; the difference is that step S6 specifically includes:
step S61, when the numerical ratio is larger than the preset threshold, reducing the image resolution of the video file;
when the numerical value ratio is larger than the preset threshold value, the video file played at present is blocked, namely the working performance of a CPU or a memory cannot meet the current requirement, and the CPU occupancy rate or the memory occupancy rate is reduced by reducing the image resolution of the video file.
Step S62, obtaining the adjusted real-time performance parameters, and calculating a first numerical ratio according to the ratio of the adjusted image parameters obtained by the image display area and the adjusted image resolution to the adjusted real-time performance parameters;
step S63, determining whether the first numerical ratio is greater than the preset threshold;
step S64, when the first numerical ratio is smaller than or equal to the preset threshold, the video file is played with the image display area and the adjusted image resolution;
step S65, when the first numerical ratio is greater than the preset threshold, reducing the image display area;
when the first numerical value ratio is larger than the preset threshold value, it is stated that the currently played video file is still jammed, that is, the CPU occupancy rate or the memory occupancy rate is reduced by reducing the image resolution of the video file, and the working performance of the adjusted CPU or memory can never meet the current requirement, so that the CPU occupancy rate or the memory occupancy rate is further reduced by adjusting the image display area.
Step S66, obtaining the adjusted current real-time performance parameter, and calculating a second numerical ratio according to the ratio of the adjusted image parameter obtained by the adjusted image resolution and the adjusted image display area to the adjusted real-time performance parameter;
step S67, determining whether the second numerical ratio is greater than the preset threshold;
step S68, when the second numerical ratio is smaller than or equal to the preset threshold, the video file is played with the adjusted image resolution and the adjusted image display area.
When the video is watched, the definition is turned down to a certain extent, so that the user can continue to watch the video. Adjusting the image display area may result in the user needing to change the distance from the display device to see the played video clearly. Therefore, in the embodiment, by adjusting the image resolution first and then adjusting the image display area, the playing size of the video can be ensured first during adjustment, and the user can watch the video conveniently.
Please refer to fig. 6, which is a flowchart illustrating a method of step S61 in the method for playing a video according to a fifth embodiment of the present invention. In the fifth embodiment, step S62, step S63, step S64, step S65, step S66, step S67 and step S68 of the video playing method are the same as those in the fourth embodiment, and are not described again here; the difference is that step S61 specifically includes:
step S611, when the numerical ratio is larger than the preset threshold, obtaining a first constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a second constant according to a constant mapping table of the current image display area and the preset image display area;
the constant mapping table for presetting the performance parameters is a numerical table preset in the display equipment, and constants corresponding to different performance parameters are labeled; the constant mapping table for presetting the image display area is a numerical table preset in the display device, and is labeled with constants corresponding to different image display areas.
Step S612, multiplying the image resolution by a ratio of the first constant to the second constant to obtain the adjusted image resolution, and reducing the image resolution of the video file to the adjusted image resolution.
And converting the performance parameters and the image display area into corresponding numerical values to calculate and obtain the adjusted image resolution, so that multiple adjustments are avoided. In fact, the existing video is played with a resolution of a certain format, and if the first constant and the second constant are not set for adjustment, the resolution of the current image is sequentially decreased by using an arithmetic logic until f (x, y, z) is less than or equal to 1, and the obtained y value does not necessarily conform to the existing common resolution format. For example: the original image resolution is 4096 × 2160, and 2048 × 1790 is calculated to satisfy f (x, y, z) equal to 1, but 2048 × 1790 is not convenient for playback in order to meet the playback needs of most electronic devices. The playback may be in the conventional format 2048 x 1536, which is closest to 2048 x 1790. The first constant and the second constant set in the embodiment can be conveniently played.
Please refer to fig. 7, which is a flowchart illustrating the method of step S65 in the method for playing a video according to the sixth embodiment of the present invention. In the sixth embodiment, step S61, step S62, step S63, step S64, step S66, step S67 and step S68 of the video playing method 206 are the same as those in the fifth embodiment, and are not described again here; the difference is that step S65 specifically includes:
step S651, when the first numerical ratio is greater than the preset threshold, obtaining a third constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a fourth constant according to a constant mapping table of the current adjusted image resolution and the preset image resolution;
in step S652, the image display area is multiplied by a ratio of the third constant to the fourth constant to obtain the adjusted image display area, and the image display area of the video file is reduced to the adjusted image display area.
Similarly, the performance parameters and the image resolution are converted into corresponding numerical values to calculate the adjusted image display area, so that multiple adjustments are avoided. In fact, the existing video is played by adopting a certain format resolution ratio and a certain length-width ratio so as to accord with the human visual habit, if the third constant and the fourth constant are not set for adjustment, the image display area is sequentially decreased by adopting an arithmetic logic from the current time until f (x, y, z) is less than or equal to 1, and the obtained z value does not necessarily accord with the existing common display scale format.
In an embodiment, the adjusted image resolution is greater than or equal to a preset minimum image resolution, and the adjusted image display area is greater than or equal to a preset minimum image display area. The preset minimum image resolution and the preset minimum image display area are set by a person skilled in the art as required, so that the adjusted image resolution and the adjusted image display area meet the minimum requirement for watching a video file.
Please refer to fig. 8, which is a flowchart illustrating a method 204 for playing a video according to a seventh embodiment of the present invention. In the seventh embodiment, step S1, step S2, step S3, step S4, step S5 and step S6 of the video playing method 204 are the same as those in the first embodiment, and are not described again here; the difference is that after step S6, the method further includes:
step S7, when the adjusted image resolution is equal to the preset minimum image resolution, the adjusted image display area is equal to the preset minimum image display area, and the second numerical ratio is greater than the preset threshold, stopping playing the video file and popping up a prompt message.
Referring to fig. 1 again, the present invention further provides a display device, which includes a storage unit 10, a processing unit 20, a display unit 30, and a computer program stored on the storage unit 10 and operable on the processing unit 20, where the steps of the video playing method described above are implemented when the processing unit 20 executes the computer program, and the steps specifically include:
step S1, acquiring real-time performance parameters of the current display equipment, wherein the real-time performance parameters are CPU occupancy rate and/or memory occupancy rate;
step S2, obtaining the image resolution and the image display area of the current playing video file on the display equipment, and obtaining the image parameter according to the image resolution and the image display area;
step S3, calculating to obtain a numerical ratio according to the ratio of the image parameters to the real-time performance parameters;
step S4, judging whether the numerical value ratio is larger than a preset threshold value;
step S5, when the numerical ratio is less than or equal to the preset threshold, continuing to maintain the image resolution and the image display area to play the video file;
step S6, when the numerical ratio is greater than the preset threshold, decreasing the image resolution and/or reducing the image display area to decrease the adjusted numerical ratio.
Because the image resolution and the image display area are both in direct proportion to the real-time performance parameters, the ratio of the image parameters to the real-time performance parameters, which is obtained according to the image resolution and the image display area, can reflect whether the performance of the current display equipment meets the requirements of playing video files. The numerical ratio is used as the measurement and is compared with a preset threshold value, so that the adjustment work of automatically reducing the image resolution and/or reducing the image display area can be further carried out; the real-time performance parameters are reduced by reducing the image resolution and/or reducing the image display area, so that the technical problems of video playing stagnation and frame dropping of the display equipment are solved.
Optionally, the step S2 specifically includes:
step S201, obtaining an image resolution and an image display area of a currently played video file on the display device, and obtaining the image parameter according to a product of the image resolution and the image display area.
Optionally, the step S2 specifically includes:
step S211, obtaining an image resolution and an image display area of a currently played video file on the display device, and obtaining the image parameter according to a product of the image resolution, the image display area, and a preset constant.
Optionally, the step S6 specifically includes:
step S61, when the numerical ratio is larger than the preset threshold, reducing the image resolution of the video file;
step S62, obtaining the adjusted real-time performance parameters, and calculating a first numerical ratio according to the ratio of the adjusted image parameters obtained by the image display area and the adjusted image resolution to the adjusted real-time performance parameters;
step S63, determining whether the first numerical ratio is greater than the preset threshold;
step S64, when the first numerical ratio is smaller than or equal to the preset threshold, the video file is played with the image display area and the adjusted image resolution;
step S65, when the first numerical ratio is greater than the preset threshold, reducing the image display area;
step S66, obtaining the adjusted current real-time performance parameter, and calculating a second numerical ratio according to the ratio of the adjusted image parameter obtained by the adjusted image resolution and the adjusted image display area to the adjusted real-time performance parameter;
step S67, determining whether the second numerical ratio is greater than the preset threshold;
step S68, when the second numerical ratio is smaller than or equal to the preset threshold, the video file is played with the adjusted image resolution and the adjusted image display area.
Optionally, the step S61 specifically includes:
step S611, when the numerical ratio is larger than the preset threshold, obtaining a first constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a second constant according to a constant mapping table of the current image display area and the preset image display area;
step S612, multiplying the image resolution by a ratio of the first constant to the second constant to obtain the adjusted image resolution, and reducing the image resolution of the video file to the adjusted image resolution.
Optionally, step S65 specifically includes:
step S651, when the first numerical ratio is greater than the preset threshold, obtaining a third constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a fourth constant according to a constant mapping table of the current adjusted image resolution and the preset image resolution;
in step S652, the image display area is multiplied by a ratio of the third constant to the fourth constant to obtain the adjusted image display area, and the image display area of the video file is reduced to the adjusted image display area.
Optionally, the adjusted image resolution is greater than or equal to a preset minimum image resolution, and the adjusted image display area is greater than or equal to a preset minimum image display area.
Optionally, after step S6, the method further includes:
step S7, when the adjusted image resolution is equal to the preset minimum image resolution and the adjusted image display area is equal to the preset minimum image display area, the second numerical ratio is greater than the preset threshold, and the playing of the video file is stopped and a prompt message is popped up.
The present invention also provides a computer-readable storage medium, which is characterized in that the computer-readable storage medium stores thereon a computer program, which when executed by the processing unit 20, implements the steps of the video playing method as described above.
In the description herein, references to the description of the term "one embodiment," "another embodiment," or "first through xth embodiments," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, method steps, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be substantially or partially embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a display device (e.g. a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only an alternative implementation of the present invention, and not intended to limit the scope of the present invention, and all modifications and equivalents made by the content of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A video playing method is characterized by comprising the following steps:
acquiring real-time performance parameters of the current display equipment, wherein the real-time performance parameters are CPU occupancy rate and/or memory occupancy rate;
acquiring the image resolution and the image display area of a currently played video file on the display equipment, and obtaining image parameters according to the image resolution and the image display area;
calculating to obtain a numerical ratio according to the ratio of the image parameters to the real-time performance parameters;
judging whether the numerical value ratio is larger than a preset threshold value or not;
when the numerical ratio is smaller than or equal to the preset threshold, continuing to maintain the image resolution and the image display area to play the video file;
when the numerical value ratio is larger than the preset threshold value, reducing the image resolution so as to reduce the numerical value ratio obtained after adjustment;
acquiring the adjusted real-time performance parameters, obtaining the adjusted image parameters according to the image display area and the adjusted image resolution, and calculating the ratio of the adjusted image parameters to the adjusted real-time performance parameters to obtain a first numerical ratio;
and when the first numerical ratio is larger than the preset threshold, reducing the image display area.
2. The method for playing the video according to claim 1, wherein the step of obtaining the image resolution and the image display area of the currently played video file on the display device and obtaining the image parameter according to the image resolution and the image display area specifically comprises:
and acquiring the image resolution and the image display area of the current playing video file on the display equipment, and obtaining the image parameter according to the product of the image resolution and the image display area.
3. The method for playing the video according to claim 1, wherein the step of obtaining the image resolution and the image display area of the currently played video file on the display device and obtaining the image parameter according to the image resolution and the image display area specifically comprises:
and acquiring the image resolution and the image display area of the current playing video file on the display equipment, and obtaining the image parameter according to the product of the image resolution, the image display area and a preset constant.
4. The method for playing video according to claim 1, wherein the step of obtaining the adjusted real-time performance parameter, obtaining the adjusted image parameter according to the image display area and the adjusted image resolution, and calculating a first numerical ratio from a ratio of the adjusted image parameter to the adjusted real-time performance parameter comprises:
judging whether the first numerical value ratio is larger than the preset threshold value or not;
when the first numerical value ratio is smaller than or equal to the preset threshold value, the video file is played according to the image display area and the adjusted image resolution;
when the first numerical ratio is greater than the preset threshold, the step of reducing the image display area includes:
when the first numerical ratio is larger than the preset threshold, reducing the image display area;
obtaining the adjusted current real-time performance parameter, and calculating a second numerical ratio according to the adjusted image resolution and the adjusted image display area to obtain a ratio of the adjusted image parameter to the adjusted real-time performance parameter;
judging whether the second numerical value ratio is larger than the preset threshold value or not;
and when the second numerical ratio is smaller than or equal to the preset threshold, the video file is played in the adjusted image resolution and the adjusted image display area.
5. The method for playing the video according to claim 4, wherein the step of reducing the image resolution of the video file when the numerical ratio is greater than the preset threshold specifically comprises:
when the numerical value ratio is larger than the preset threshold value, obtaining a first constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a second constant according to a constant mapping table of the current image display area and the preset image display area;
and multiplying the image resolution by the ratio of the first constant to the second constant to obtain the adjusted image resolution, and reducing the image resolution of the video file to the adjusted image resolution.
6. The method for playing the video according to claim 4, wherein the step of reducing the image display area when the first numerical ratio is greater than the preset threshold specifically comprises:
when the first numerical value ratio is larger than the preset threshold, obtaining a third constant according to a constant mapping table of the current real-time performance parameter and the preset performance parameter, and obtaining a fourth constant according to a constant mapping table of the current adjusted image resolution and the preset image resolution;
and multiplying the image display area by the ratio of the third constant to the fourth constant to obtain the adjusted image display area, and reducing the image display area of the video file to the adjusted image display area.
7. The method for playing back a video according to any of claims 4 to 6, wherein the adjusted image resolution is greater than or equal to a preset minimum image resolution, and the adjusted image display area is greater than or equal to a preset minimum image display area.
8. The method for playing back a video according to claim 7, wherein after the step of decreasing the resolution of the image when the numerical ratio is greater than the preset threshold value so as to decrease the adjusted numerical ratio, the method further comprises:
and when the adjusted image resolution is equal to the preset minimum image resolution, the adjusted image display area is equal to the preset minimum image display area, and the second numerical ratio is larger than the preset threshold, stopping playing the video file and popping up prompt information.
9. A display device, characterized in that the display device comprises a storage unit, a processing unit, a display unit and a computer program stored on the storage unit and executable on the processing unit, the processing unit implementing the steps of the method of playing back a video according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processing unit, carries out the steps of the method of playing back a video according to any one of claims 1 to 8.
CN201810391334.4A 2018-04-26 2018-04-26 Video playing method, display device and computer readable storage medium Active CN108377421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810391334.4A CN108377421B (en) 2018-04-26 2018-04-26 Video playing method, display device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810391334.4A CN108377421B (en) 2018-04-26 2018-04-26 Video playing method, display device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108377421A CN108377421A (en) 2018-08-07
CN108377421B true CN108377421B (en) 2021-06-11

Family

ID=63032818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810391334.4A Active CN108377421B (en) 2018-04-26 2018-04-26 Video playing method, display device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108377421B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182352B (en) * 2018-11-09 2022-06-14 浙江宇视科技有限公司 Adaptive code stream control device and method for video playing
CN109379626A (en) * 2018-11-27 2019-02-22 Oppo广东移动通信有限公司 Method for processing video frequency, device, electronic equipment and storage medium
CN109640188B (en) * 2018-12-28 2020-02-07 北京微播视界科技有限公司 Video preview method and device, electronic equipment and computer readable storage medium
CN110189388A (en) * 2019-05-28 2019-08-30 上海哔哩哔哩科技有限公司 Animation detection method, readable storage medium storing program for executing and computer equipment
CN112449241A (en) * 2019-08-29 2021-03-05 中兴通讯股份有限公司 Power consumption adjusting method and device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220577A (en) * 2012-01-18 2013-07-24 腾讯科技(深圳)有限公司 Method, device and system for video displaying
US8503539B2 (en) * 2010-02-26 2013-08-06 Bao Tran High definition personal computer (PC) cam
CN104093072A (en) * 2014-06-30 2014-10-08 京东方科技集团股份有限公司 System and method for playing video information
CN104394387A (en) * 2014-12-09 2015-03-04 中国电子科技集团公司第五十四研究所 Multi-channel image display method supporting video superposition for ground control station of unmanned aerial vehicle
CN106792169A (en) * 2016-12-12 2017-05-31 深圳Tcl数字技术有限公司 Internet video play handling method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4377899B2 (en) * 2006-09-20 2009-12-02 株式会社東芝 Resource management apparatus and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8503539B2 (en) * 2010-02-26 2013-08-06 Bao Tran High definition personal computer (PC) cam
CN103220577A (en) * 2012-01-18 2013-07-24 腾讯科技(深圳)有限公司 Method, device and system for video displaying
CN104093072A (en) * 2014-06-30 2014-10-08 京东方科技集团股份有限公司 System and method for playing video information
CN104394387A (en) * 2014-12-09 2015-03-04 中国电子科技集团公司第五十四研究所 Multi-channel image display method supporting video superposition for ground control station of unmanned aerial vehicle
CN106792169A (en) * 2016-12-12 2017-05-31 深圳Tcl数字技术有限公司 Internet video play handling method and device

Also Published As

Publication number Publication date
CN108377421A (en) 2018-08-07

Similar Documents

Publication Publication Date Title
CN108377421B (en) Video playing method, display device and computer readable storage medium
CN110928396B (en) Screen refreshing method and related equipment
CN111984351B (en) Page adaptation method, electronic device and computer readable storage medium
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
CN110837617A (en) Webpage self-adaptive layout method, server and computer readable storage medium
US11842459B2 (en) Media content management for a fixed orientation display
WO2018082412A1 (en) Electronic equipment control method, device and electronic equipment
CN107818008B (en) Page loading method and device
WO2017101250A1 (en) Method for displaying loading progress and terminal
CN108509016B (en) Method and apparatus for controlling CPU power consumption and related media product
CN112114975B (en) Processor frequency adjusting method and device, storage medium and electronic equipment
CN109388317B (en) Picture loading method, terminal device and storage medium
CN115729336A (en) Systems and methods for intelligent adjustment of immersive multimedia workloads in portable computing devices
US20220139017A1 (en) Layer composition method, electronic device, and storage medium
CN104571990A (en) Method and system for adjusting operating state of display screen
CN112055244B (en) Image acquisition method and device, server and electronic equipment
CN111538678A (en) Data buffering method, device and computer readable storage medium
WO2023169160A1 (en) Picture adjusting method and apparatus, electronic device, and computer readable storage medium
CN114119432A (en) Image processing method, image processing device, electronic equipment and storage medium
KR102624100B1 (en) Method for controlling display and electronic device thereof
CN110825294A (en) Display method, electronic device, and computer-readable storage medium
CN111045576A (en) Display control method, display control device, terminal device and electronic device
CN103377015B (en) Electronic equipment and its information processing method
CN114815942B (en) Power supply current sharing method and device, electronic equipment and medium
CN115239609A (en) Image processing method, image processing device, computer equipment and storage medium

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