CN112019918B - Video playing method and device - Google Patents

Video playing method and device Download PDF

Info

Publication number
CN112019918B
CN112019918B CN201910453595.9A CN201910453595A CN112019918B CN 112019918 B CN112019918 B CN 112019918B CN 201910453595 A CN201910453595 A CN 201910453595A CN 112019918 B CN112019918 B CN 112019918B
Authority
CN
China
Prior art keywords
image processing
image
configuration parameters
processing configuration
video
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
CN201910453595.9A
Other languages
Chinese (zh)
Other versions
CN112019918A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910453595.9A priority Critical patent/CN112019918B/en
Publication of CN112019918A publication Critical patent/CN112019918A/en
Application granted granted Critical
Publication of CN112019918B publication Critical patent/CN112019918B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44227Monitoring of local network, e.g. connection or bandwidth variations; Detecting new devices in the local network
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities

Abstract

The application provides a video playing method and device, wherein the video playing device can count the data quantity N of a video image received in a current image processing period; determining target image processing configuration parameters for playing video images received in a current image processing period according to the N and the set image processing configuration parameters for video playing locally stored by the video playing equipment; and playing the video image received in the current image processing period by utilizing the target image processing configuration parameters. Therefore, the video playing device can optimize based on the local playing state when playing the video image, so that the video playing effect is more controllable locally, and the video playing effect is optimized when the network shakes.

Description

Video playing method and device
Technical Field
The present disclosure relates to the field of video playing technologies, and in particular, to a video playing method and apparatus.
Background
The weak network environment generally refers to an environment in which network transmission is unstable, and various problems such as video jamming, jitter, etc. occur in playing video in the weak network environment, which seriously affect the viewing effect.
The related video playing scheme is mainly improved from a video source, for example, the video playing device sends a notice to the video source device when the network shakes so as to request the video source device to reduce the image resolution and the code rate of the video source, thereby achieving the purposes of reducing the burden of the network and smoothing the network shake by reducing the bandwidth occupied by the video source.
However, in the case where the time of network jitter is short, it may happen that the video playback device just notifies the video source device, but the network state of the video playback device has been restored to normal, and it is unnecessary for the video source device to reduce the image resolution and code rate of the video source at this time. Therefore, the video playing problem of the video playing device during network jitter cannot be solved in practice by means of the adjustment mode of the video source, and unnecessary switching is caused.
Disclosure of Invention
In view of this, the present application provides a video playing method and apparatus, which can solve the problem that network jitter affects video playing effect.
Specifically, the application is realized by the following technical scheme:
according to a first aspect of embodiments of the present application, there is provided a video playing method, which is applied to a video playing device, the method including:
Counting the data quantity N of the video image received in the current image processing period;
determining target image processing configuration parameters for playing video images received in a current image processing period according to the N and the set image processing configuration parameters for video playing locally stored by the video playing equipment;
and playing the video image received in the current image processing period by utilizing the target image processing configuration parameters.
As an embodiment, the locally stored set image processing configuration parameters for video playing include at least one of an image buffer space, an image processing duration, an image display duration, an image decoding priority, and an image resolution.
As one embodiment, the determining, according to N and the set image processing configuration parameters for video playing stored locally by the video playing device, the target image processing configuration parameters for playing the video image received in the current image processing period includes:
comparing the data quantity N with a preset data quantity interval range;
if the data quantity N is in the data quantity interval range, determining a set image processing configuration parameter for video playing, which is locally stored by the video playing equipment, as the target image processing configuration parameter;
And if the data quantity N is not in the data quantity interval range, determining the target image processing configuration parameters according to the set image processing configuration parameters for video playing, which are locally stored by the video playing equipment.
As one embodiment, determining the target image processing configuration parameter according to a set image processing configuration parameter for video playing stored locally by the video playing device includes:
when the set image processing configuration parameters comprise an image cache space, modifying the image cache space so that the modified image cache space is larger than the image cache space before modification, and determining the modified image cache space as a target image cache space.
As one embodiment, determining the target image processing configuration parameter according to a set image processing configuration parameter for video playing stored locally by the video playing device includes:
when the set image processing configuration parameters comprise image processing duration, if the data quantity N is smaller than the data quantity interval range, modifying the image processing duration so that the modified image processing duration is longer than the image processing duration before modification, and determining the modified image processing duration as a target image processing duration; and if the data quantity N is larger than the data quantity interval range, modifying the image processing time length so that the modified image processing time length is smaller than the image processing time length before modification, and determining the modified image processing time length as a target image processing time length.
As one embodiment, determining the target image processing configuration parameter according to a set image processing configuration parameter for video playing stored locally by the video playing device includes:
when the set image processing configuration parameters comprise image display time length, if the data quantity N is smaller than the data quantity interval range, modifying the image display time length so that the modified image display time length is longer than the image display time length before modification, and determining the modified image display time length as a target image display time length; and if the data quantity N is larger than the data quantity interval range, modifying the image display duration so that the modified image display duration is smaller than the image display duration before modification, and determining the modified image display duration as the target image display duration.
As one embodiment, determining the target image processing configuration parameter according to a set image processing configuration parameter for video playing stored locally by the video playing device includes:
when the set image processing configuration parameters comprise image decoding priorities, if the data quantity N is smaller than the data quantity interval range, modifying the image decoding priorities so that the modified image decoding priorities are lower than the image decoding priorities before modification, and determining the modified image decoding priorities as target image decoding priorities; and if the data quantity N is larger than the data quantity interval range, modifying the image decoding priority so that the modified image decoding priority is higher than the image decoding priority before modification, and determining the modified image decoding priority as the target image decoding priority.
As one embodiment, determining the target image processing configuration parameter according to a set image processing configuration parameter for video playing stored locally by the video playing device includes:
when the set image processing configuration parameters comprise image resolution, if the data quantity N is smaller than the data quantity interval range, modifying the image resolution so that the modified image resolution is lower than the image resolution before modification, and determining the modified image resolution as target image resolution; and if the data amount N is larger than the data amount interval range, modifying the image resolution so that the modified image resolution is higher than the image resolution before modification, and determining the modified image resolution as the target image resolution.
As one embodiment, when the locally stored set image processing configuration parameters for video playing include an image buffer space, an image processing time period, an image display time period, an image decoding priority, and an image resolution, determining the target image processing configuration parameters according to the locally stored set image processing configuration parameters for video playing by the video playing device includes:
If the data amount N of the video image is smaller than the first data amount K1 and larger than the second data amount K2, and K1 is larger than K2, at least modifying an image cache space in the set image processing configuration parameters, and determining the modified image processing configuration parameters as the target image processing configuration parameters;
if the data volume of the video image is smaller than the second data volume K2 and larger than the third data volume K3, and K2 is larger than K3, at least 2 parameters in the set image processing configuration parameters are modified, the 2 parameters at least comprise an image cache space, and the modified image processing configuration parameters are determined to be the target image processing configuration parameters;
and if the data volume of the video image is smaller than the third data volume K3, at least 3 parameters in the set image processing configuration parameters are modified, the 3 parameters at least comprise an image cache space, and the modified image processing configuration parameters are determined to be the target image processing configuration parameters.
As one embodiment, when the locally stored set image processing configuration parameters for video playing include an image buffer space, an image processing time period, an image display time period, an image decoding priority, and an image resolution, determining the target image processing configuration parameters according to the locally stored set image processing configuration parameters for video playing of the video playing device, further includes:
If the data volume of the video image is larger than the first data volume K1 and smaller than the second data volume K2, and K1 is smaller than K2, at least modifying an image cache space in the set image processing configuration parameters, and determining the modified image processing configuration parameters as the target image processing configuration parameters;
if the data volume of the video image is larger than the second data volume K2 and smaller than the third data volume K3, and K2 is smaller than K3, at least modifying 2 parameters in the set image processing configuration parameters, wherein the 2 parameters at least comprise an image cache space, and determining the modified image processing configuration parameters as the target image processing configuration parameters;
and if the data volume of the video image is larger than the third data volume K3, at least 3 parameters in the set image processing configuration parameters are modified, the 3 parameters at least comprise an image cache space, and the modified image processing configuration parameters are determined to be the target image processing configuration parameters.
As one embodiment, the setting image processing configuration parameters includes a history image processing configuration parameter stored according to a video image played by the video playing device and an image processing configuration parameter preset for the video image.
According to a second aspect of embodiments of the present application, there is provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the video playback methods.
According to a third aspect of embodiments of the present application, there is provided a video playback device including at least a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute a computer program stored in the memory, where the processor implements any one of the video playing methods when executing the computer program.
As can be seen from the foregoing embodiments, the present application may enable a video playback device to count the data amount N of a video image received in a current image processing period; determining target image processing configuration parameters for playing video images received in a current image processing period according to the N and the set image processing configuration parameters for video playing locally stored by the video playing equipment; and playing the video image received in the current image processing period by utilizing the target image processing configuration parameters. Compared with the prior art, the video processing method and device based on the local statistics in the weak network environment are not dependent on processing from a video source to adjust the effect of local video playing, and target image processing configuration parameters of a current image processing period are determined according to the data quantity of the video image counted locally and the stored set image processing configuration parameters, so that video jitter brought by a network can be smoothed. Therefore, the video playing device optimizes the video playing effect through the local network state and the playing state, so that the video playing effect is more controllable locally.
Drawings
Fig. 1 is a flowchart of an embodiment of a video playing method of the present application;
FIG. 2 is a flowchart illustrating a specific process of a video playing method according to an exemplary embodiment of the present application;
fig. 3 is a block diagram of an embodiment of a video playback device according to the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
As follows, the following embodiments are shown to illustrate the video playing method provided in the present application.
Referring to fig. 1, a flowchart of an embodiment of a video playing method of the present application is shown, and the method may be applied to a video playing device, where the video playing device may include a PC device, a mobile device, an embedded device, and the like, and the method includes the following steps: step 101, counting the data quantity N of the video image received in the current image processing period;
in the present embodiment, when the video playback device is playing video images transmitted from a video source, the video playback device may receive and play video images in a predetermined image processing period. The video playback operation procedure of the video playback device for any one of the image processing periods (e.g., the image decoding period and/or the image rendering period) is the same, and a description will be given below taking the current image processing period as an example.
The video playback device may count the amount of data N of the video image received during the current image processing period. Because the video playing device has larger difference in the data amount of the video image received by the network under different network states, the video playing device can monitor the network state in the current image processing period by counting the data amount N of the video image received in the current image processing period.
Step 102, determining a target image processing configuration parameter for playing the video image received in the current image processing period according to the N and the set image processing configuration parameter for video playing locally stored in the video playing device;
in this embodiment, the video playing device may determine the target image processing configuration parameter for playing the video image received in the current image processing period according to the data amount N of the video image received in the current image processing period and the set image processing configuration parameter for video playing stored locally by the video playing device. The set image processing configuration parameters comprise historical image processing configuration parameters stored according to video images played by the video playing equipment and image processing configuration parameters preset for the video images.
The image processing configuration parameters the locally stored set image processing configuration parameters for video playing at least comprise one of image cache space, image processing time length, image display time length, image decoding priority and image resolution.
As an embodiment, the video playing device may compare the N with a preset data amount interval range, and determine whether the network state of the current image processing period is stable by comparing the data amount N with the preset data amount interval range, where the preset data amount interval range corresponds to the data amount range in the network stable state. If the N is in the range of the data volume interval, the network state of the current image processing period is relatively stable, so that the set image processing configuration parameters for video playing locally stored by the video playing equipment can be determined as the target image processing configuration parameters; if the data amount N is not within the data amount interval range, it indicates that there is jitter in the network state of the current image processing period, so that the target image processing configuration parameter may be determined according to a set image processing configuration parameter for video playing, which is locally stored in the video playing device, and the set image processing configuration parameter may be considered as an image processing configuration parameter used in a network steady state.
As an embodiment, when the video playing device determines the target image processing configuration parameter according to the set image processing configuration parameter for video playing stored locally in the video playing device, a specific determining method may include the following multiple cases:
when the set image processing configuration parameters comprise an image cache space, modifying the image cache space so that the modified image cache space is larger than the image cache space before modification, and determining the modified image cache space as a target image cache space. Therefore, whether the current received data volume is too large or too small, the data volume of the received video image can be increased by a method for increasing the image buffer space, so that the data volume of the local video playing is relatively stable when the network shakes.
When the set image processing configuration parameters comprise image processing duration, if the data quantity N is smaller than the data quantity interval range, modifying the image processing duration so that the modified image processing duration is longer than the image processing duration before modification, and determining the modified image processing duration as a target image processing duration; and if the data quantity N is larger than the data quantity interval range, modifying the image processing time length so that the modified image processing time length is smaller than the image processing time length before modification, and determining the modified image processing time length as a target image processing time length. Therefore, the method of adjusting the image processing time length can shorten the image processing time length to improve the playing efficiency when the data quantity N is too large, and increase the image processing time length to reduce the playing efficiency when the data quantity N is too small, so that the data quantity of the local video playing is relatively stable when the network is dithered.
When the set image processing configuration parameters comprise image display time length, if the data quantity N is smaller than the data quantity interval range, modifying the image display time length so that the modified image display time length is longer than the image display time length before modification, and determining the modified image display time length as a target image display time length; and if the data quantity N is larger than the data quantity interval range, modifying the image display duration so that the modified image display duration is smaller than the image display duration before modification, and determining the modified image display duration as the target image display duration. Therefore, the method of adjusting the image display time length can shorten the image display time length to improve the playing efficiency when the data quantity N is too large, and increase the image display time length to reduce the playing efficiency when the data quantity N is too small, so that the data quantity of the local video playing is relatively stable when the network shakes.
When the set image processing configuration parameters comprise image decoding priorities, if the data quantity N is smaller than the data quantity interval range, modifying the image decoding priorities so that the modified image decoding priorities are lower than the image decoding priorities before modification, and determining the modified image decoding priorities as target image decoding priorities; and if the data quantity N is larger than the data quantity interval range, modifying the image decoding priority so that the modified image decoding priority is higher than the image decoding priority before modification, and determining the modified image decoding priority as the target image decoding priority. Therefore, the method of adjusting the image decoding priority can improve the playing efficiency by improving the image decoding priority when the data quantity N is too large, and can reduce the playing efficiency by reducing the image decoding priority when the data quantity N is too small, thereby ensuring the relatively stable data quantity of the local video playing when the network shakes.
When the set image processing configuration parameters comprise image resolution, if the data quantity N is smaller than the data quantity interval range, modifying the image resolution so that the modified image resolution is lower than the image resolution before modification, and determining the modified image resolution as target image resolution; and if the data amount N is larger than the data amount interval range, modifying the image resolution so that the modified image resolution is higher than the image resolution before modification, and determining the modified image resolution as the target image resolution. Therefore, the method of adjusting the image resolution can reduce the image resolution to improve the playing efficiency when the data quantity N is too large, and can improve the image resolution to reduce the playing efficiency when the data quantity N is too small, thereby ensuring that the data quantity of the local video playing is relatively stable when the network shakes. It should be noted that, for the adjustment of the image resolution, the video playing device may locally adjust the image resolution of the received video image, and the video playing device may also notify the video source device to adjust the image resolution of the video source.
As an embodiment, the video playing device of the present application may further determine the target image processing configuration parameter in combination with a plurality of set image processing configuration parameters.
When the data amount N is not within the data amount section range, there may be two cases where the data amount N is smaller than the lower limit of the data amount section range and the data amount N is larger than the upper limit of the data amount section range.
For the case that the data amount N is smaller than the lower limit of the data amount interval range, when the locally stored set image processing configuration parameters for video playing include an image buffer space, an image processing duration, an image display duration, an image decoding priority and an image resolution, the video playing device determines the target image processing configuration parameters according to the set image processing configuration parameters for video playing locally stored by the video playing device, and the specific process includes:
if the data amount N of the video image is smaller than the first data amount K1 and larger than the second data amount K2, and K1 is larger than K2, it is indicated that the data amount of the video image received in the current image processing period is smaller than the data amount when the network is stable and is not much different, so that the network state in the current image processing period can be considered to slightly shake, and the network transmission efficiency is lower, so that the video playing device at least modifies the image buffer space in the set image processing configuration parameters, and determines the modified image processing configuration parameters as the target image processing configuration parameters;
If the data amount of the video image is smaller than the second data amount K2 and larger than the third data amount K3, and K2 is larger than K3, it is indicated that the data amount of the video image received in the current image processing period is smaller than the data amount when the network is stable and has a larger phase difference, so that the network state in the current image processing period can be considered to generate general jitter, and the network transmission efficiency is low, so that the video playing device at least modifies 2 parameters in the set image processing configuration parameters, wherein the 2 parameters at least comprise an image cache space, and the other parameter can be selected from one of the above-mentioned image processing duration, image display duration, image decoding priority and image resolution, and the parameter modification method is the same as the modification method for independently modifying the parameters, and then the modified image processing configuration parameters are determined as the target image processing configuration parameters;
if the data amount of the video image is smaller than the third data amount K3, it indicates that the data amount of the video image received in the current image processing period is smaller than the data amount during network stabilization and is too different, so that the network state in the current image processing period can be considered to be severely dithered, and the network transmission efficiency is very low, so that the video playing device at least modifies 3 parameters in the set image processing configuration parameters, wherein the 3 parameters at least include an image buffer space, and the other two parameters can be selected from the image processing duration, the image display duration, the image decoding priority and the image resolution, the parameter modification method is the same as the modification method for independently modifying the parameters, and then the modified image processing configuration parameters are determined as the target image processing configuration parameters.
For the case that the data amount N is greater than the upper limit of the data amount interval range, when the set image processing configuration parameters for video playing locally stored by the video playing device include an image buffer space, an image processing duration, an image display duration, an image decoding priority and an image resolution, the video playing device determines the target image processing configuration parameters according to the set image processing configuration parameters for video playing locally stored by the video playing device, and specifically includes:
if the data amount of the video image is greater than the first data amount K1 and less than the second data amount K2, and K1 is less than K2, the data amount of the video image received in the current image processing period is greater than the data amount when the network is stable, and the difference is not great, the current network state is determined to be a slight jitter state, so that the video playing device can at least modify the image cache space in the set image processing configuration parameters, and determine the modified image processing configuration parameters as the target image processing configuration parameters;
if the data amount of the video image is greater than the second data amount K2 and less than the third data amount K3, K2 is less than K3, which means that the data amount of the video image received in the current image processing period is greater than the data amount when the network is stable and has more phase difference, the current network state is determined to be a general jitter state, so that the video playing device at least modifies 2 parameters in the set image processing configuration parameters, wherein the 2 parameters at least comprise an image cache space, and the other 1 parameter can be selected from one of the image processing duration, the image display duration, the image decoding priority and the image resolution, the parameter modification method is the same as the modification method for independently modifying the parameters, and then the modified image processing configuration parameters are determined to be the target image processing configuration parameters;
If the data amount of the video image is greater than the third data amount K3, it indicates that the data amount of the video image received in the current image processing period is greater than the data amount when the network is stable, and the difference is too large, it determines that the current network state is a severe jitter state, so that the video playing device modifies at least 3 parameters in the set image processing configuration parameters, where the 3 parameters at least include an image buffer space, and the other two parameters may be selected from the image processing duration, the image display duration, the image decoding priority, and the image resolution, and the parameter modification method is the same as the modification method for independently modifying the parameters, and determines the modified image processing configuration parameters as the target image processing configuration parameters.
Therefore, the method and the device can select the number of the adjustment parameters according to the intensity of the network jitter to adjust the image processing configuration parameters, so that the local video playing is relatively stable by adjusting the combination condition of different parameters under the condition of different network jitter levels.
And step 103, playing the video image received in the current image processing period by utilizing the target image processing configuration parameters.
In this embodiment, after the video playing device determines the target image processing configuration parameter of the current image processing period according to the above method, the video image received in the current image processing period may be played by using the target image processing configuration parameter.
The prior art solves the problem of network jitter on video playing equipment by informing a video source to adjust the data volume of a transmitted video image, but the process of informing the video source is uncontrollable when the network jitter is caused, so that the local video playing state can not be adjusted in time when the network jitter is caused. The present application can judge the current network jitter condition by the data amount of the video image received locally in the image processing period, if the network jitter condition, the target image processing configuration parameter of the video played in the current period can be determined by combining the local set image processing configuration parameter used in the stable state, so that the image processing configuration parameter of the video image can be adjusted according to the local actual condition, and the video jitter caused by the network jitter can be smoothed. Therefore, the method and the device can enable the effect of the smooth video to be more controllable, enable the smoothing process to be more suitable for a local playing environment and more accord with the local playing state, and optimize the video playing effect.
The video playing method of the present application will be described in detail with reference to fig. 2.
Referring to fig. 2, a specific process flow diagram of an exemplary video playing method of the present application includes the following steps:
step 201, counting the data quantity N of the video image received in the current image processing period;
step 202, judging whether the N is in a preset data volume interval k, p, if yes, turning to step 203; if not, go to step 204;
for example, assuming that the preset data size interval [ k, p ] is a [500,1500] frame image, if the data size N of the video image in the current image processing period is detected to be 1005 frames, the current network may be considered to be in a stable state; if the data amount N of the video image in the current image processing period is detected to be 10 frames or 10000 frames, the data amount N exceeds the preset data amount interval [500,1500], so that the current network can be considered as a jitter state.
Step 203, determining the set image processing configuration parameters stored locally by the video playing device as the target image processing configuration parameters, and turning to step 213;
step 204, judging whether the N is smaller than the lower limit k of the data volume interval [ k, p ] or larger than the upper limit p of the data volume interval; if the value is less than the lower limit k, go to step 205; if the threshold p is greater than the upper limit p, go to step 209;
For example, assuming that a preset data volume section [ k, p ] is a [500,1500] frame image, the lower limit k of the data volume section range is 500 frames, and the upper limit p is 1500 frames; if the detected data quantity N of the video image in the current image processing period is smaller than 500 frames, the current video data quantity is smaller; if the data amount N of the video image in the current image processing period is detected to be more than 1500 frames, the current video data amount is more.
Step 205, determining which interval of the intervals [ k1, k), [ k2, k 1), (0, k 2) the data amount N belongs to, and if the data amount N belongs to the interval [ k1, k), turning to step 206; if it belongs to the interval [ k2, k 1), go to step 207; if the segment belongs to the segment (0, k 2), go to step 208;
wherein 0< k2< k1< k, for example, k=500 frames, k1=300 frames, k1=100 frames, the setting of the interval range is only a reference, and the specific setting value may be determined according to the actual application situation.
Step 206, modifying the image buffer space in the set image processing configuration parameters, determining the modified image processing configuration parameters as the target image processing configuration parameters, and turning to step 213;
step 207, modifying 2 parameters of the set image processing configuration parameters, wherein the 2 parameters at least comprise an image cache space, determining the modified image processing configuration parameters as the target image processing configuration parameters, and turning to step 213;
Step 208, modifying 3 parameters of the set image processing configuration parameters, wherein the 3 parameters at least comprise an image cache space, and determining the modified image processing configuration parameters as the target image processing configuration parameters, and turning to step 213;
step 209, judging which section (p, p 1), (p 1, p 2) and (p 2, + -infinity) the data amount N belongs to, if the data amount N belongs to (p, p 1), turning to step 210, if the data amount N belongs to (p 1, p 2), turning to step 211, if the data amount N belongs to (p 2, + -infinity), turning to step 212;
where p < k1< k2< + -infinity, e.g., p=1500 frames, p1=2000 frames, p2=5000 frames, the setting of the interval range is only a reference, and the specific setting value can be determined according to the actual application situation.
Step 210, modifying the image buffer space in the set image processing configuration parameters, determining the modified image processing configuration parameters as the target image processing configuration parameters, and turning to step 213;
step 211, modifying 2 parameters of the set image processing configuration parameters, wherein the 2 parameters at least comprise an image cache space, determining the modified image processing configuration parameters as the target image processing configuration parameters, and turning to step 213;
Step 212, modifying 3 parameters in the set image processing configuration parameters, wherein the 3 parameters at least comprise an image cache space, determining the modified image processing configuration parameters as the target image processing configuration parameters, and turning to step 213;
and step 213, playing the video image received in the current image processing period by using the target image processing configuration parameters.
According to the method and the device, when the network shakes, the corresponding parameter adjustment strategy is selected according to different shaking conditions to adjust the image processing configuration parameters, so that the video image of the current image processing period is played by utilizing the modified image processing configuration parameters, and smooth playing of the current video can be ensured as much as possible.
Corresponding to the embodiment of the video playing method, the application also provides an embodiment of the video playing device for executing the video playing method.
As an embodiment, please refer to fig. 3, which is a video playing device, which at least includes a processor 31 and a memory 32; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory 32 is used for storing a computer program;
the processor 31 is configured to execute a computer program stored in the memory 32, where the processor 31 implements any one of the steps of the video playing method when executing the computer program.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the computer apparatus, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the description of the method embodiments in part.
Corresponding to the embodiments of the video playing method described above, the present application also provides embodiments of a computer readable storage medium for performing the video playing method described above.
As an embodiment, the present application further includes a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the steps of any of the video playback methods.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the video playback device embodiments and the computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In summary, the present application may enable the video playback device to count the data amount N of the video image received in the current image processing period; determining target image processing configuration parameters for playing video images received in a current image processing period according to the N and the set image processing configuration parameters for video playing locally stored by the video playing equipment; and playing the video image received in the current image processing period by utilizing the target image processing configuration parameters. Compared with the prior art, the video processing method and device based on the local statistics in the weak network environment are not dependent on processing from a video source to adjust the effect of local video playing, and target image processing configuration parameters of a current image processing period are determined according to the data quantity of the video image counted locally and the stored set image processing configuration parameters, so that video jitter brought by a network can be smoothed. Therefore, the video playing device optimizes the video playing effect through the local network state and the playing state, so that the video playing effect is more controllable locally.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (12)

1. A video playing method, wherein the method is applied to a video playing device, the method comprising:
counting the data quantity N of the video image received in the current image processing period;
determining target image processing configuration parameters for playing video images received in a current image processing period according to the N and the set image processing configuration parameters for video playing locally stored by the video playing equipment; when the target image processing configuration parameters are determined, firstly determining the intensity of network jitter according to the N and a preset data volume interval range, then selecting the number of parameters to be adjusted from the set image processing configuration parameters according to the intensity of the network jitter, and determining the adjusted parameters as the target image processing configuration parameters for playing the video image received in the current image processing period, so that the local video playing is relatively stable by adjusting the combination condition of different parameters under the condition of different network jitter levels;
and playing the video image received in the current image processing period by utilizing the target image processing configuration parameters.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The locally stored set image processing configuration parameters for video playing at least comprise one of image cache space, image processing time length, image display time length, image decoding priority and image resolution.
3. The method of claim 2, wherein determining the target image processing configuration parameters for playing the video image received in the current image processing period based on N and the set image processing configuration parameters for video playing stored locally by the video playing device comprises:
comparing the data quantity N with a preset data quantity interval range;
if the data quantity N is in the data quantity interval range, determining a set image processing configuration parameter for video playing, which is locally stored by the video playing equipment, as the target image processing configuration parameter;
and if the data quantity N is not in the data quantity interval range, determining the target image processing configuration parameters according to the set image processing configuration parameters for video playing, which are locally stored by the video playing equipment.
4. A method according to claim 3, wherein determining the target image processing configuration parameters in accordance with set image processing configuration parameters for video playback stored locally by the video playback device comprises:
When the set image processing configuration parameters comprise an image cache space, modifying the image cache space so that the modified image cache space is larger than the image cache space before modification, and determining the modified image cache space as a target image cache space.
5. A method according to claim 3, wherein determining the target image processing configuration parameters in accordance with set image processing configuration parameters for video playback stored locally by the video playback device comprises:
when the set image processing configuration parameters comprise image processing duration, if the data quantity N is smaller than the data quantity interval range, modifying the image processing duration so that the modified image processing duration is longer than the image processing duration before modification, and determining the modified image processing duration as a target image processing duration; and if the data quantity N is larger than the data quantity interval range, modifying the image processing time length so that the modified image processing time length is smaller than the image processing time length before modification, and determining the modified image processing time length as a target image processing time length.
6. A method according to claim 3, wherein determining the target image processing configuration parameters in accordance with set image processing configuration parameters for video playback stored locally by the video playback device comprises:
When the set image processing configuration parameters comprise image display time length, if the data quantity N is smaller than the data quantity interval range, modifying the image display time length so that the modified image display time length is longer than the image display time length before modification, and determining the modified image display time length as a target image display time length; and if the data quantity N is larger than the data quantity interval range, modifying the image display duration so that the modified image display duration is smaller than the image display duration before modification, and determining the modified image display duration as the target image display duration.
7. A method according to claim 3, wherein determining the target image processing configuration parameters in accordance with set image processing configuration parameters for video playback stored locally by the video playback device comprises:
when the set image processing configuration parameters comprise image decoding priorities, if the data quantity N is smaller than the data quantity interval range, modifying the image decoding priorities so that the modified image decoding priorities are lower than the image decoding priorities before modification, and determining the modified image decoding priorities as target image decoding priorities; and if the data quantity N is larger than the data quantity interval range, modifying the image decoding priority so that the modified image decoding priority is higher than the image decoding priority before modification, and determining the modified image decoding priority as the target image decoding priority.
8. A method according to claim 3, wherein determining the target image processing configuration parameters in accordance with set image processing configuration parameters for video playback stored locally by the video playback device comprises:
when the set image processing configuration parameters comprise image resolution, if the data quantity N is smaller than the data quantity interval range, modifying the image resolution so that the modified image resolution is lower than the image resolution before modification, and determining the modified image resolution as target image resolution; and if the data amount N is larger than the data amount interval range, modifying the image resolution so that the modified image resolution is higher than the image resolution before modification, and determining the modified image resolution as the target image resolution.
9. The method of claim 3, wherein when the locally stored set image processing configuration parameters for video playback include image buffer space, image processing duration, image display duration, image decoding priority, image resolution, determining the target image processing configuration parameters in accordance with the locally stored set image processing configuration parameters for video playback by the video playback device comprises:
If the data amount N of the video image is smaller than the first data amount K1 and larger than the second data amount K2, and K1 is larger than K2, at least modifying an image cache space in the set image processing configuration parameters, and determining the modified image processing configuration parameters as the target image processing configuration parameters;
if the data volume of the video image is smaller than the second data volume K2 and larger than the third data volume K3, and K2 is larger than K3, at least 2 parameters in the set image processing configuration parameters are modified, the 2 parameters at least comprise an image cache space, and the modified image processing configuration parameters are determined to be the target image processing configuration parameters;
and if the data volume of the video image is smaller than the third data volume K3, at least 3 parameters in the set image processing configuration parameters are modified, the 3 parameters at least comprise an image cache space, and the modified image processing configuration parameters are determined to be the target image processing configuration parameters.
10. The method of claim 3, wherein when the locally stored set image processing configuration parameters for video playback include image buffer space, image processing duration, image display duration, image decoding priority, image resolution, determining the target image processing configuration parameters in accordance with the locally stored set image processing configuration parameters for video playback by the video playback device, further comprises:
If the data volume of the video image is larger than the first data volume K1 and smaller than the second data volume K2, and K1 is smaller than K2, at least modifying an image cache space in the set image processing configuration parameters, and determining the modified image processing configuration parameters as the target image processing configuration parameters;
if the data volume of the video image is larger than the second data volume K2 and smaller than the third data volume K3, and K2 is smaller than K3, at least modifying 2 parameters in the set image processing configuration parameters, wherein the 2 parameters at least comprise an image cache space, and determining the modified image processing configuration parameters as the target image processing configuration parameters;
and if the data volume of the video image is larger than the third data volume K3, at least 3 parameters in the set image processing configuration parameters are modified, the 3 parameters at least comprise an image cache space, and the modified image processing configuration parameters are determined to be the target image processing configuration parameters.
11. The method according to any one of claims 4 to 10, wherein,
the set image processing configuration parameters comprise historical image processing configuration parameters stored according to video images played by the video playing equipment and image processing configuration parameters preset for the video images;
If the data amount N is smaller than the lower limit of the data amount interval range, when the data amount N of the video image is smaller than the first data amount K1 and larger than the second data amount K2, K1 is larger than K2, or if the data amount N is larger than the upper limit of the data amount interval range, when the data amount of the video image is larger than the first data amount K1 and smaller than the second data amount K2, K1 is smaller than K2, the current network state is a slight jitter state, at least modifying the image buffer space in the set image processing configuration parameters so that the modified image buffer space is larger than the image buffer space before modification, and determining the modified image processing configuration parameters as the target image processing configuration parameters;
if the data amount N is smaller than the lower limit of the data amount interval range, when the data amount of the video image is smaller than the second data amount K2 and larger than the third data amount K3, K2 is larger than K3, or if the data amount N is larger than the upper limit of the data amount interval range, when the data amount of the video image is larger than the second data amount K2 and smaller than the third data amount K3, K2 is smaller than K3, determining that the current network state is a general jitter state, and modifying at least 2 parameters in the set image processing configuration parameters, wherein the 2 parameters at least comprise an image buffer space, and the other 1 parameter can be selected from one of the above image processing duration, the image display duration, the image decoding priority and the image resolution; determining the modified image processing configuration parameters as the target image processing configuration parameters;
If the data amount N is smaller than the lower limit of the data amount interval range, when the data amount of the video image is smaller than the third data amount K3, or if the data amount N is larger than the upper limit of the data amount interval range, when the data amount of the video image is larger than the third data amount K3, determining that the current network state is a severe jitter state, modifying at least 3 parameters in the set image processing configuration parameters, wherein the 3 parameters at least comprise an image cache space, and the other two parameters can be selected from the image processing duration, the image display duration, the image decoding priority and the image resolution, and determining the modified image processing configuration parameters as the target image processing configuration parameters.
12. A video playback device, the video playback device comprising at least a memory and a processor;
the memory is used for storing a computer program;
the processor being adapted to execute a computer program stored on the memory, the processor implementing the steps of the method according to any one of claims 1-11 when the computer program is executed.
CN201910453595.9A 2019-05-28 2019-05-28 Video playing method and device Active CN112019918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910453595.9A CN112019918B (en) 2019-05-28 2019-05-28 Video playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910453595.9A CN112019918B (en) 2019-05-28 2019-05-28 Video playing method and device

Publications (2)

Publication Number Publication Date
CN112019918A CN112019918A (en) 2020-12-01
CN112019918B true CN112019918B (en) 2023-05-26

Family

ID=73500635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910453595.9A Active CN112019918B (en) 2019-05-28 2019-05-28 Video playing method and device

Country Status (1)

Country Link
CN (1) CN112019918B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791910A (en) * 2016-12-02 2017-05-31 浙江宇视科技有限公司 Frame of video processing method and processing device
CN109379626A (en) * 2018-11-27 2019-02-22 Oppo广东移动通信有限公司 Method for processing video frequency, device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8069260B2 (en) * 2007-01-12 2011-11-29 Microsoft Corporation Dynamic buffer settings for media playback
CN101466034A (en) * 2008-12-25 2009-06-24 华为技术有限公司 Method and device for sending and playing stream medium data and stream medium program request system
CN102006501B (en) * 2010-11-11 2013-06-12 中国联合网络通信集团有限公司 Streaming media play control method and device and streaming media player
US20130242186A1 (en) * 2012-03-14 2013-09-19 Samsung Electronics Co., Ltd. Image processing apparatus and control method thereof
CN109587555B (en) * 2018-11-27 2020-12-22 Oppo广东移动通信有限公司 Video processing method and device, electronic equipment and storage medium
CN109688465B (en) * 2018-11-27 2020-12-29 Oppo广东移动通信有限公司 Video enhancement control method and device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791910A (en) * 2016-12-02 2017-05-31 浙江宇视科技有限公司 Frame of video processing method and processing device
CN109379626A (en) * 2018-11-27 2019-02-22 Oppo广东移动通信有限公司 Method for processing video frequency, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112019918A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
US10659847B2 (en) Frame dropping method for video frame and video sending apparatus
US11792451B2 (en) Method and system for low latency high frame rate streaming
CA2888218C (en) Playback stall avoidance in adaptive media streaming
US20170134461A1 (en) Method and device for adjusting definition of a video adaptively
US20130035107A1 (en) System and method for adaptive traffic prioritization and bandwidth allocation on mobile data networks
CN110636346A (en) Code rate self-adaptive switching method and device, electronic equipment and storage medium
CN110022498B (en) Method and device for realizing code rate switching
US9232249B1 (en) Video presentation using repeated video frames
US20160180496A1 (en) Information processor, information processing method, and program
CN111651277B (en) Memory cleaning method, intelligent terminal and readable storage medium
US11412311B2 (en) Methods and systems for saving data while streaming video
CN116506665A (en) VR streaming method, system, device and storage medium for self-adaptive code rate control
CN102243856B (en) Method and device for dynamically switching screen data processing modes
CN112019918B (en) Video playing method and device
JP2008011177A (en) Dynamic quality control method by streaming distribution, and network system
US20140099040A1 (en) Image processing device and image processing method
JP5428702B2 (en) Stream communication system, server device, and client device
CN110912922B (en) Image transmission method and device, electronic equipment and storage medium
CN110312148B (en) Self-adaptive video data transmission method, device and medium
US8903223B1 (en) Video driver over a network
US11503354B2 (en) Methods and apparatus for streaming data
CN106910448B (en) Display screen refresh rate control method and system based on mobile terminal
US8791981B2 (en) Bit rate control apparatus and method thereof
CN114710804A (en) Data transmission adjusting method and device, electronic equipment and readable storage medium
WO2021013558A1 (en) A media client with adaptive buffer size and the related method

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