CN107197371B - video definition switching method and device - Google Patents

video definition switching method and device Download PDF

Info

Publication number
CN107197371B
CN107197371B CN201610149109.0A CN201610149109A CN107197371B CN 107197371 B CN107197371 B CN 107197371B CN 201610149109 A CN201610149109 A CN 201610149109A CN 107197371 B CN107197371 B CN 107197371B
Authority
CN
China
Prior art keywords
video source
video
playing
definition
transparency
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
CN201610149109.0A
Other languages
Chinese (zh)
Other versions
CN107197371A (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.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Dongjing Computer 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 Guangzhou Dongjing Computer Technology Co Ltd filed Critical Guangzhou Dongjing Computer Technology Co Ltd
Priority to CN201610149109.0A priority Critical patent/CN107197371B/en
Priority to PCT/CN2017/075638 priority patent/WO2017157191A1/en
Publication of CN107197371A publication Critical patent/CN107197371A/en
Application granted granted Critical
Publication of CN107197371B publication Critical patent/CN107197371B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the 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, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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
    • 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/44209Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network

Abstract

The invention discloses a video definition switching method and device, relates to the field of video playing, and aims to solve the problem that the definition switching process influences the video playing fluency. The method of the invention comprises the following steps: determining whether to switch video definition according to the current network condition in the process of playing the first video source; if the video definition is switched, a second decoding library is established, and a second video source with the definition level corresponding to the current network speed is loaded through the second decoding library; synchronously playing a second video source on the newly-built canvas overlapped with the first video source canvas according to the playing progress of the first video source; the transparency transition of the canvas of the first video source is converted into complete transparency within a preset time period from the start of playing the second video source, and meanwhile, the transparency transition of the newly-built canvas is converted into complete opacity; switching the sound of a first video source to the sound of a second video source; the playing of the first video source is stopped. The method and the device are mainly applied to the process of switching the definition of the online video.

Description

video definition switching method and device
Technical Field
The present invention relates to the field of video playing, and in particular, to a method and an apparatus for switching video definition.
background
at present, each large video site provides videos with different definitions aiming at online videos, and the common definition grades comprise standard definition, high definition, ultra-definition and the like. When a user watches an online video through a webpage player of a browser or a native player of an APP client, a proper definition level can be selected according to network conditions and personal requirements. Generally, a user generally prefers to view a video with higher definition without limitation to the network bandwidth, and needs to adjust the definition level of the video downward when the network bandwidth cannot support the current definition level.
In the prior art, video definition switching is mainly completed through manual operation, and a user clicks a definition control in a player to select a required definition level in a triggered definition level menu. After the user finishes the selection, the client stops playing the original video, requests the video with the new definition level from the server, and after the streaming media data of the new video is loaded, the player starts playing the new video from the interruption point of the stop of the playing, thereby finishing the definition switching of the video.
the existing video definition switching mode needs manual operation intervention of a user, and after the client stops playing the original video and before loading the new video, the player is in a state of being incapable of playing, and the playing cannot be continued until the new video is loaded. Therefore, the video playing process is forced to be interrupted due to the switching of the definition, thereby affecting the smoothness of video playing and causing inconvenience to users in watching the video.
disclosure of Invention
The invention provides a video definition switching method and device, which can solve the problem that the definition switching process influences the video playing fluency.
To solve the above problem, in one aspect, the present invention provides a video sharpness switching method, including:
Determining whether to switch video definition according to the current network condition in the process of playing the first video source through the first decoding library;
If the video definition is switched, a second decoding library is established, a second video source with the definition level corresponding to the current network speed is loaded through the second decoding library, and the second video source and the first video source are different video sources of the same video content;
synchronously playing a second video source on a newly-built canvas overlapped with the first video source canvas according to the playing progress of the first video source, wherein the initial transparency of the newly-built canvas is completely transparent, and the initial playing volume of the second video source is the same as the playing volume of the first video source;
within a preset time length from the start of playing the second video source, the transparency transition of the canvas of the first video source is converted into complete transparency, and meanwhile, the transparency transition of the newly-built canvas is converted into complete opacity; and switching the sound of the first video source to the sound of the second video source;
the playing of the first video source is stopped.
in another aspect, the present invention further provides a video sharpness switching apparatus, including:
The determining unit is used for determining whether to switch the video definition according to the current network condition in the process that the playing unit plays the first video source through the first decoding library;
The loading unit is used for establishing a second decoding library if the video definition is switched, loading a second video source with the definition level corresponding to the current network speed through the second decoding library, wherein the second video source and the first video source are different video sources of the same video content;
The playing unit is used for synchronously playing a second video source on a newly-built canvas overlapped with the first video source canvas according to the playing progress of the first video source, wherein the initial transparency of the newly-built canvas is completely transparent, and the initial playing volume of the second video source is the same as the playing volume of the first video source;
The control unit is used for converting the transparency transition of the canvas of the first video source into complete transparency and simultaneously converting the transparency transition of the newly-built canvas into complete opacity within a preset time length from the start of playing the second video source; and switching the sound of the first video source to the sound of the second video source;
The playback unit is further configured to stop playing back the first video source.
The video definition switching method and the video definition switching device can automatically determine whether to switch the video definition according to the current network condition, and select the second video source with the definition grade matched with the current network speed for loading if the video definition needs to be switched, and a user does not need to execute any operation in the switching process; when the definition is switched, the invention adopts a double-decoding-library mechanism to realize, namely, in the process of playing a first video source by a first decoding library, a second video source is synchronously played on a newly-built canvas overlapped with the canvas of the first video source by a second decoding library, so that the buffer gap between the video sources is eliminated, and the seamless connection of the video source pictures is realized; in addition, the invention also uses a gradual change type switching mechanism, and realizes the smooth conversion of the picture definition by the transitional adjustment of the transparency of the picture cloth, thereby avoiding the jump change of the picture definition and ensuring that the switching process is more natural and smooth. The video definition switching method and the video definition switching device can automatically and smoothly switch the video definition in a seamless manner, and can effectively guarantee the fluency of video playing in the switching process.
the foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a video sharpness switching method according to an embodiment of the present invention;
Fig. 2 is a flowchart illustrating another video sharpness switching method provided in an embodiment of the present invention;
fig. 3 is a block diagram illustrating a video sharpness switching apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating another video definition switching apparatus according to an embodiment of the present invention.
Detailed Description
exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
the embodiment of the invention provides a video definition switching method, which is mainly executed on an electronic device side capable of installing a streaming media player, such as a mobile phone, a Personal Computer (PC), a tablet personal computer, a wearable device and the like, wherein the streaming media player can be an APP (application) native player or a webpage player. As shown in fig. 1, the method includes:
101. And determining whether to switch video definition according to the current network condition in the process of playing the first video source through the first decoding library.
In general, a player plays a video source according to a predetermined or user-selected definition level, and in a definition grading standard, the definition levels are sequentially divided into, in order of definition from low to high: smooth, standard-definition, high-definition, ultra-high-definition and the like. In practical application, different definition division standards can be formulated according to different manufacturer standards, industry alliance standards or national/international standards, which is not limited in this embodiment.
the first video source is a video source currently playing, and the definition level of the first video source may be set by a default of a player or a video site, or may be set manually by a user at the start of playing or during playing of the video. In this embodiment, when the player plays the first video source through the first decoding library, the device determines whether to switch the video definition based on the current network condition.
the network condition may be a bandwidth speed of the network (hereinafter, simply referred to as a network speed), or may be a network type, such as a 3G network, a WIFI network, a VPN network, or the like. The device may perform the sharpness switching when the network speed changes or when the network type changes (mostly due to network switching). For GSM, 3G, 4G, etc. mobile networks, the network conditions may further include the location of the device in the cell, the loading condition of the base station to which the device belongs, the communication mode (simplex, duplex) between the device and the base station, and the magnitude of the transmission/reception power of the device. Generally, the change of the condition changes the signal strength of the device in the cell, thereby affecting the communication speed in the downlink direction, and therefore, the change of the condition can be used as a factor for triggering the sharpness switching. For a local area network mainly based on WIFI, the network conditions may further include the strength of the WIFI signal received by the device, the bridging number of stages of the router, the number of devices accessed by the router, and the like. Changes in these conditions can affect the bandwidth allocated by the device and thus the wire speed of the data download, and can therefore be used as a trigger for the switch in sharpness as well. The above network conditions may be used alone or in combination of multiple conditions, and the present embodiment does not specifically limit the type and usage of the network conditions.
In practical application, the device may actively initiate a monitoring process for the network condition, and may also passively receive a notification message sent from the outside to know what kind of change occurs in the network condition. For the former case, for example, the device may initiate a location update request to the base station to obtain an identifier of the base station to which the device belongs currently, or send a Ping packet to the network server to perform downlink data rate measurement. For the latter case, the device may receive cell update information transmitted by the target base station when a cell handover occurs, or receive a network type change notification broadcast by the operating system after a handover from the mobile network to the local area network.
When the video definition is determined to be switched, the device sequentially executes the steps 102 to 105, and when the video definition is determined not to be switched, the device cancels the execution of the subsequent flow and continues to actively or passively monitor the network condition.
102. and if the video definition is switched, establishing a second decoding library, and loading a second video source with the definition level corresponding to the current network speed through the second decoding library.
the second video source and the first video source are different video sources of the same video content, that is, the video contents played by the second video source and the first video source are the same and the playing time is the same, for example, both are cartoon "black cat guard", and the difference is that the definition level of the second video source is different from that of the first video source in a general situation. Of course, since the definition levels are set corresponding to the network speeds, and different network speeds correspond to different definition levels, when the network speeds corresponding to different network conditions are the same or substantially similar, there may be a case where the definition levels of the second video source and the first video source are the same, and this embodiment does not exclude this case.
In the prior art, a device uses a decoding library to switch video definition, and when a first video source is played through the decoding library, if definition switching is required, the device can terminate the playing of the first video source, and then loads and plays a second video source through the decoding library. Since it takes a certain time to load the second video source, after the first video source is terminated and before the second video source is started to be played, there are time intervals ranging from several seconds to several tens of seconds, which damages the fluency of video playing.
in this embodiment, the device performs resolution conversion by using a dual-decoding-library mechanism, and when the resolution needs to be switched, the device establishes a second decoding library, and loads a second video source through the second decoding library, so that the playing of the first video source by the first decoding library is not affected in the process.
103. And synchronously playing a second video source on the newly-built canvas overlapped with the first video source canvas according to the playing progress of the first video source.
And the equipment creates a canvas through a second decoding library, wherein the size of the canvas is the same as that of the first video source canvas, and the canvas is overlapped above or below the first video source canvas. And on the newly-built canvas, the equipment synchronously plays the second video source according to the playing progress of the first video source.
Illustratively, when the loading of the second video source is completed, the first video source is played to the position of 1:43:59, the device adjusts the initial playing progress of the second video source to 1:43:59, and the second video source is played on the new canvas from 1:43:59, so that the synchronous playing of the first video source and the second video source is realized.
It should be noted that, in this embodiment, the initial transparency of the new canvas is completely transparent, that is, the second video source is played on the new canvas with a completely transparent image effect. Since the first video source canvas is normally playing the first video source with a completely opaque image effect, the content seen by the user is still the content of the first video source, in case the two canvases are overlapping and the new canvas is completely transparent.
in addition, except for performing transition conversion on image content, the device also needs to perform undifferentiated conversion on the sound of the video source, which is embodied as indiscriminate conversion of the playing volumes of the two video sources, so that it is necessary to ensure that the initial playing volume of the second video source is the same as the playing volume of the first video source, so as to perform subsequent volume switching.
104. within a preset time length from the start of playing the second video source, the transparency transition of the canvas of the first video source is converted into complete transparency, and meanwhile, the transparency transition of the newly-built canvas is converted into complete opacity; and switching the sound of the first video source to the sound of the second video source.
The preset duration is the time length consumed by definition transition conversion, can be set by a designer, can also develop a special setting interface, and provides the possibility of self-defining setting for a user. In general, the transition effect of the definition is gentler and softer as the preset duration is longer, and the transition effect of the definition is more obvious as the preset duration is shorter. In practical applications, the preset duration may be set based on the order of seconds or milliseconds, and the embodiment does not limit the specific value of the preset duration.
illustratively, when the second video source is played from 1:43:59 and the preset time period is set to 10 seconds, the device needs to complete the transition of the sharpness before 1:44: 09.
During this 10 second period, the device needs to transition the transparency of the first video source canvas step by step to fully transparent, while transitioning the transparency of the newly created canvas step by step to fully opaque. In this embodiment, in order to pursue the transition effect of absolute zero parallax, the transparency of the first video source canvas and the newly-built canvas may be transitioned synchronously, that is, the transparency transition speeds of the two canopies are ensured to be the same. For example, when the two are in constant speed transition, it is necessary to ensure that the two use the same transition speed, and when the two are in variable speed transition, it is necessary to ensure that the transition acceleration is the same. Certainly, in practical application, the transition effect with parallax is allowed, in this case, the transition speed of the first video source canvas and the newly-built canvas is not required to be strictly the same, as long as the transition from the completely transparent to the completely opaque or the completely opaque to the completely transparent is ensured to be completed within the preset time.
For the switching of the sound, as the playing volumes of the first video source and the second video source are the same, transition conversion is not needed, and the sound of the first video source is only required to be switched to the sound of the second video source at one time. In this embodiment, the device may perform the sound switching when the second video source starts to be played, may perform the sound switching at any time within a preset time period, or may perform the sound switching at any time after the transparency conversion is completed. The device only needs to complete the sound switching before stopping playing the first video source, and the specific time for switching the sound is not limited in the embodiment.
105. The playing of the first video source is stopped.
After step 104 is performed, the first video source canvas becomes completely transparent, the user cannot observe the playing content of the first video source, and after the new canvas becomes completely opaque, the user can see the second video source, and the device has completed the definition conversion from the visual sense of the user. However, at this time, the first video source is still played through the first decoding library inside the device, and since the playing of the first video source has no meaning at this time, in order to save the resource consumption of the player, the device executes step 105 to stop the playing of the first video source, and thus, the process shown in fig. 1 is completed.
The video definition switching method provided by the embodiment can automatically determine whether to switch the video definition according to the current network condition, and select the second video source with the definition level matched with the current network speed for loading if the video definition needs to be switched, and the switching process does not need any operation executed by a user; when the definition is switched, the embodiment is realized by adopting a dual-decoding-library mechanism, namely, in the process of playing the first video source by the first decoding library, the second video source is synchronously played on the newly-built canvas overlapped with the canvas of the first video source by the second decoding library, so that the buffer gap between the video sources is eliminated, and the seamless connection of the video source pictures is realized; in addition, the embodiment also uses a gradual change type switching mechanism, and realizes smooth transition of the picture definition by transition adjustment of the transparency of the picture cloth, so that the jump change of the picture definition is avoided, and the switching process is more natural and smooth. By combining the above points, the video definition switching method provided by the embodiment can automatically and smoothly switch the video definition in a seamless manner, and can effectively guarantee the fluency of video playing in the switching process.
Further, as a supplement to the method shown in fig. 1, an embodiment of the present invention further provides a method for switching video definition, as shown in fig. 2, the method includes:
201. And determining whether to switch video definition according to the current network condition in the process of playing the first video source through the first decoding library.
When actively monitoring changes in network conditions, the device periodically performs condition monitoring throughout the use of the player, such as testing the network speed every 2 minutes, or requesting a location update every 100 seconds. The equipment caches the network parameters obtained by each monitoring so as to be used for comparison in the next condition monitoring. When the network parameter monitored this time is changed compared with the network parameter monitored last time, the video definition needing to be switched can be determined.
it should be noted that, for the network parameters obtained by the first monitoring after the player is started, since there is no comparison between the network parameters obtained by the previous monitoring, different execution strategies can be formulated according to different design requirements in practical applications. For example, when saving the device and the network resources is the first principle, the device does not perform the task of switching the video definition after the network parameters are measured for the first time; and when the user experience is taken as the first principle, the equipment directly determines the video definition after the network parameters are measured for the first time.
When passively monitoring changes in network conditions, the timing of monitoring network conditions is not determined by the device itself, which determines the switch video sharpness directly upon receiving notification of a change in network conditions.
Two schemes for determining the video definition of the handover according to the network conditions in this embodiment are given below:
1. Switching video sharpness based on network speed
when the equipment is located in a certain network, the equipment regularly tests the network speed and judges whether the network speed of the current network is changed relative to the network speed obtained in the previous test. And if the network speed of the current network changes, the equipment determines the video definition of the switching.
illustratively, the device is connected to a home WIFI local area network, and during the process of playing the first video source, the device tests the network speed by taking 90 seconds as a period. When the measured network speed is 1.2M/S, the equipment compares the network speed with the cached previous network speed test result of 900KB/S, and the equipment determines the video definition switching when the network speed is inconsistent with the cached previous network speed test result of 900 KB/S. Or, when the current network speed test result is greater than the current measured network speed, for example, 1.8M/S, the device also determines to switch the video definition.
in practical applications, there may be small changes in network speed, such as 900KB/S and 932KB/S, for which it is not necessary to switch video definition frequently, so in one implementation of the present solution, a minimum network speed difference value, such as 0.5M/S, may be preset in the device. The equipment determines to switch the video definition only when the difference value of the network speeds measured in two times is larger than or equal to the minimum network speed difference value, otherwise, the network speed is not changed.
2. switching video sharpness based on network changes
Generally, the network speeds of different types of networks are different, for example, the network speed of a 3G network is generally higher than that of a GSM network, and the network speed of a hundred-megabyte bandwidth local area network is often higher than that of a 3G network; furthermore, even networks of the same type may have differences in network speed, for example, a hundred megabit bandwidth local area network may have a network speed higher than a ten megabit bandwidth local area network, a 3G network of operator a may have a network speed lower than a 3G network of operator B, and so on. The device can judge whether to switch to a new network, and if the device is switched to the new network, the device determines the video definition of the switching and tests the network speed of the new network.
In the scheme, the operating system monitors the network through a special thread, the equipment subscribes a system notification message to the operating system, and the system notification message is used for notifying a network switching event. The device judges whether to switch to a new network according to whether a system notification message sent by an operating system is received, namely, the device determines that the new network is switched when the system notification message is received, and determines that the device is not switched to the new network when the system notification message is received.
specifically, taking an Android operating system as an example: the operating system will provide a broadcastereiver service to all applications, based on which the operating system will broadcast all applications subscribing to this event with the current event. Generally, an event is defined as a designated string in an operating system, and for an event of network switch, the corresponding string is "android. When the operating system discovers that the network accessed by the equipment is changed, the operating system sends the character string of the network switching event to each application as a system notification message through the BroadcastReceiver service.
in an implementation manner of this scheme, the device may also actively request the network type of the current network from the operating system, and determine whether to switch to a new network by determining whether the network type changes. Specifically, the application in the device may execute the getNetworkInfo method to call a connectitvitymanager service, and request the operating system for the network type of the current network.
The above two schemes for determining video resolution to be switched are only part of feasible schemes provided in this embodiment, and in practical applications, the device may also determine video resolution to be switched based on changes of various network conditions, such as whether the device switches a base station, whether the device is located at a cell edge, whether the number of devices accessed by a local area network router changes, and the like, which is limited by space, and this embodiment does not describe any other schemes one by one.
It should be noted that, no matter what network conditions are taken as the basis for determining the video definition to be switched, the device needs to test the network speed of the current network so as to search the second video source corresponding to the definition level of the current network speed in the subsequent process. In this embodiment, the device may establish a dedicated thread in the application for network speed testing, and may also perform network speed testing through a third-party speed testing application and obtain a testing result through an inter-process communication mechanism. At present, the network speed test belongs to a mature technical means, and the contents of the test principle, the test mode and the like are not introduced too much in the embodiment.
202. and if the video definition is switched, searching the definition grade corresponding to the current network speed.
The equipment is preset with a 'network speed-definition level' mapping table, and the mapping table is used for recording definition levels corresponding to different network speeds. After the network speed test is carried out, the equipment accesses the mapping table to search the definition level corresponding to the current network speed.
The wire speed parameters in the mapping table may be discrete values, such as 100KB/S, 200KB/S, 500KB/S, 1M/S, 2M/S, 2.5M/S, etc., each corresponding to one or more levels of resolution that can be supported at the wire speed. When a parameter corresponds to a plurality of sharpness levels, the device may select any one of the sharpness levels. For example, the mapping table may be formed as the following table:
network speed Grade of sharpness
1M/S Fluency
2M/S Smooth and clear in standard
5M/S smooth, standard and high definition
10M/S Smooth, standard-definition, high-definition and ultra-high-definition
In an implementation manner of this embodiment, to improve the playing quality of the video as much as possible, the device selects the highest definition level that the network speed parameter can support, that is, loads the second video source of the highest definition level supported by the current network speed through the second decoding library. For example, in the above table, when the line speed is 1M/S, the device selects the definition level "smooth", and when the line speed is 5M/S, the device selects the definition level "high definition".
furthermore, in order to reduce the table data traversed by the device and shorten the time for the device to access the mapping table, the mapping table may also only record the highest definition level corresponding to each network speed parameter. For example, the improved mapping table may be formed as follows:
network speed Grade of sharpness
1M/S Fluency
2M/S Standard definition
5M/S High definition
10M/S Ultra high definition
The specific values in the above table are only exemplary and do not limit the present embodiment. In practical application, when the measured network speed is not recorded in the mapping table, the device searches the mapping table by using the network speed parameter closest to the actual network speed. For example, when the actual speed measurement is 4M/S, the equipment selects the definition level high definition according to the network speed gear of 5M/S.
203. and establishing a second decoding library, and loading a second video source with the definition level corresponding to the current network speed through the second decoding library.
after the definition level is determined, the device sends a video source request to the video site through the second decoding library, and requests to load a second video source corresponding to the definition level. In practice, the device may preferentially request the second video source from the site providing the first video source, and when the site does not provide the second video source, the device selects to request the second video source from the other video sites.
204. And recording the playing progress of the first video source when the loading of the second video source is finished, and recording as the first playing progress.
The decoding library often needs short buffering time when playing the video source, if the playing progress of the first video source is taken as the initial playing progress of the second video source when the second video source is loaded, then when the second video source starts to play from the initial playing progress, the playing progress of the first video source exceeds the initial playing progress, and therefore the second video source and the first video source cannot be played in absolute synchronization. For example, the playing progress of the first video source is 1:24:02 when the second video source is loaded in the second decoding library. Assuming that 1 second is required to buffer the initial playing progress of the second video source from 00:00:00 to 1:24:02, the problem of 1:24:02 as the initial playing progress of the second video source is as follows: when the second video source is buffered and starts playing from 1:24:02, the playing progress of the first video source reaches 1:24:03, and a progress difference of 1 second exists between the two video sources, so that the two video sources cannot be played synchronously.
to solve this problem, the present embodiment employs a progress post mechanism, and the absolute synchronization of the two video sources is ensured through the implementation from step 204 to step 207. Specifically, the device records the playing progress reached by the first video source at the moment when the second video source is loaded, and records the playing progress as the first playing progress. In the above example, the first play progress recorded by the device is 1:24: 02.
205. And adding the first playing progress and the preset progress post allowance to obtain a second playing progress.
The unit of the schedule post-allowance is second, the duration of the schedule post-allowance can be set according to experience, and the setting of the schedule post-allowance under the general condition can meet the following requirements: the progress post margin is not less than the maximum time length required for buffering the video source under the condition of specific network speed. By specific wire speed is meant the minimum wire speed that the current network may achieve. For example, under the minimum network speed condition of the current network, 3 seconds are required for buffering one video source at the slowest, and the progress post margin should be equal to or greater than 3 seconds. The above requirement is made to ensure that the second video source completes buffering before the first video source is played to the second playing schedule.
In practical application, the factors affecting the video source buffering speed also include the speed of the site responding to the video source request, the DNS resolution speed, the firewall filtering speed, and the like. The time length of the progress post allowance can meet the time consumption requirement of video source buffering by comprehensively considering all factors when the progress post allowance is set.
In this embodiment, assuming that the schedule post-allowance is set to be 3 seconds, when the first playing schedule is 1:24:02, the second playing schedule calculated in this step is 1:24: 05.
206. And adjusting the initial playing progress of the second video source to be a second playing progress.
The second decoding library buffers the second video source and adjusts its initial play-out progress from the default 00:00:00 to 1:24: 05. In the process, the first video source continues to play, but the playing progress has not yet reached 1:24: 05. And pausing the playing of the second video source after the second video source is buffered to 1:24:05, and waiting for the first video source to be played to 1:24: 05.
207. And when the first video source is played to the second playing progress, starting to play the second video source on the newly-built canvas.
After the device establishes the second decoding library, a new canvas for playing the second video source is established through the second decoding library, and when the first video source is played to 1:24:05, the second video source is started to be played on the new canvas through the second decoding library. Since the initial playing progress of the second video source is also 1:24:05, it can be ensured that both video sources are played synchronously from 1:24: 05.
at the moment when the second video source is played, the transparency of the canvas of the first video source is the same as that of the canvas of the normal playing and is completely opaque, while the initial transparency of the newly-built canvas is completely transparent, at this moment, the user still watches the first video source, and the video definition is not changed.
208. and when the second video source starts to play, the sound of the first video source is closed.
At 1:24:05, where the second video source starts playing, the sound of the first video source is turned off by the first decoding library. Since the playback volume of the second video source is the same as that of the first video source, a non-difference switching in sound can be realized. The first video source is still played according to the playing progress after the sound is closed.
209. And gradually reducing the transparency parameter of the first video source canvas according to a preset transparency step value, and simultaneously gradually increasing the transparency parameter of the newly-built canvas according to the transparency step value.
assuming that the preset time period for the transitional transparency is 4 seconds, the first video source and the second video source need to be completed within the time period of 1:24:05 to 1:24: 09. In this embodiment, the transparency of the first video source and the transparency of the second video source are transited at a constant speed, and the first video source and the second video source use the same transparency step value.
the present embodiment provides two implementations for determining the transparency step value. Firstly, automatically calculating by the equipment according to a transparency parameter range and preset time to obtain a transparency step value; second, a developer or a user manually sets a transparency step value. For the former method, assuming that the transparency parameter ranges from 0 to 100, and 0 is completely transparent and 100 is completely opaque (although the value of the transparency parameter in other standards may also range from 0 to 1 or 0 to 200, which is not shown here), the device divides the upper limit value 100 of the transparency parameter by the preset time length of 4 seconds, and calculates the transparency step value to be 25, that is, the transparency change rate of the two video sources is 25 transparency units per second. In the latter case, the transparency step value is set manually according to an empirical value or personal preference, and the transparency step value should be set such that the transparency can be switched from an upper limit value (lower limit value) to a lower limit value (upper limit value) for a preset period of time, for example, the transparency step value can be set to 30 or 50. Alternatively, the device may recalculate the new transition duration based on the transparency parameter range and the set transparency step value, for example, when the transparency step value is set to 40, the device divides the transparency upper limit value 100 by 40 to obtain a new transition duration of 2.5 seconds.
when the transparency conversion is carried out, the first video source is converted into the transparency 0 from the transparency 100 at a constant speed according to the transparency step value, and the second video source is converted into the transparency 100 from the transparency 0 at a constant speed according to the transparency step value. Since the transition in transparency is linear, the transition in sharpness is smooth and soft in visual perception, and no change in saltiness occurs.
In the transparency conversion process, the first video source and the second video source are always synchronously played, when the playing progress reaches 1:24:09 (namely, when the conversion is completed), the first video source canvas is changed into completely transparent, the newly-built canvas is changed into completely opaque, and the content watched by the user is the second video source.
210. And deleting the first decoding library and clearing the cache of the first video source.
The device stops playback of the first video source, deletes the first decoding library and deletes the data of the first video source (including the played data and the data whose buffering is completed and has not been played) from the buffer. And at this point, only the second decoding library is reserved in the player to play the second video source, and the definition switching process is finished.
further, as an addition to the methods shown in fig. 1 and fig. 2, an embodiment of the present invention further provides a method for switching video definition. The method is based on the principle of providing a video source with higher definition for a user, and if the definition level of a second video source is equal to or less than that of a first video source, the definition switching is not performed on the equipment in order to save network transmission resources and processing resources of the equipment. Specifically, the method comprises the following steps:
The device performs step 202 of fig. 2, looks up a table to obtain the definition level of the second video source, reads the definition level of the first video source from the data packet file of the first video data, and compares the two. If the definition level of the first video source is equal to or greater than the definition level of the second video source, it indicates that the definition level of the second video source is not superior to that of the first video source, in this case, it is not essential to switch the video definition, the device cancels the establishment of the second decoding library, does not execute steps 203 to 210, and continues to play the first video source. If the definition level of the first video source is smaller than that of the second video source, it indicates that the second video source can provide a higher-quality definition image, the device establishes a second decoding library, loads the second video source and sequentially executes the subsequent processes of fig. 2.
further, as an improvement to the above method, for the case that the definition level of the first video source is greater than the definition level of the second video source, the device may count the buffering times occurring in the process of playing the first video source, and when the buffering times exceeds a preset time threshold, establish a second decoding library and load the second video source. For example, after comparing the sharpness levels of the two video sources, if the playing process of the first video source generates multiple interrupt buffers (for example, more than 3 times) within a preset time period, the device establishes a second decoding library, loads the second video source, and sequentially executes the subsequent flow of fig. 2.
the above mechanism is designed for the purpose of: when the definition level of the first video source is greater than that of the second video source, the current network speed is reduced to some extent theoretically, and in order to avoid video playing pause, the first video source should be switched to the second video source with the lower definition level, so that the smoothness of video playing is ensured. The reduction in the network speed is not necessarily caused by the single factor of the actual bandwidth reduction. In practical applications, the poor stability of the network signal may also cause fluctuation of the network speed in a short time, for example, in the case that the WIFI signal is weakened or the device is located at the edge of a cell, although the actual bandwidth is not reduced, the actual downlink rate at the device side is reduced due to the weakening of the network signal. When the device is in an environment with a high bandwidth but poor signal stability, the network should be given a time to restore stability, and it is not so urgent to perform a resolution switch. Only when the first video source appears interrupt buffering for many times, can this condition be more reliably determined to be due to bandwidth reduction, and at this moment, some user experience needs to be sacrificed to switch to low definition, otherwise when the network signal recovers to be stable, the problem of playing low definition video under the high bandwidth condition can occur, which goes against the principle of providing high definition video as high as possible for the user.
the above are several methods for switching video definition provided by the embodiments of the present invention. The following briefly introduces several application scenarios of embodiments of the present invention:
1. In the process of playing the video source, the equipment tests the network speed at regular time, and when the network speed changes, the highest definition grade supported by the current network speed is switched.
2. After switching to the new network, the network speed of the new network is tested and switched to the highest level of resolution supported by the network speed of the new network.
3. After switching to the new network, the corresponding level of resolution is switched to, depending on the network type of the new network. For example, when switching to a mobile network such as GSM, 3G, 4G, etc., in order to save traffic of a user, the definition level of a video source may be adjusted down appropriately, or directly adjusted down to the lowest definition level, in which case definition quality is not the first pursuit; when the video source is switched to the WIFI network, the maximum definition level supported by the current network speed can be switched to improve the definition level of the video source as much as possible.
4. the equipment records and learns the behavior of manually setting the definition levels of the user in different network speed environments, obtains the definition level preference of the user in different network speed environments, and switches to the definition level preferred by the user according to the current network speed.
Further, as an implementation of the method and the application scenario, an embodiment of the present invention further provides a video definition switching apparatus, which may be located in an electronic device such as a mobile phone, a Personal Computer (PC), a tablet computer, and a wearable device, or be independent of the electronic device, but establish a data interaction relationship with the electronic device. As shown in fig. 3, the apparatus includes: a determination unit 31, a loading unit 32, a playback unit 33, and a control unit 34. Wherein the content of the first and second substances,
A determining unit 31, configured to determine whether to switch video sharpness according to a current network condition in a process that the playing unit 33 plays the first video source through the first decoding library;
The loading unit 32 is configured to establish a second decoding library if the video definition is switched, and load a second video source with a definition level corresponding to the current network speed through the second decoding library, where the second video source and the first video source are different video sources of the same video content;
The playing unit 33 is configured to synchronously play a second video source on a new canvas overlapped with the first video source canvas according to the playing progress of the first video source, where an initial transparency of the new canvas is completely transparent, and an initial playing volume of the second video source is the same as a playing volume of the first video source;
The control unit 34 is configured to convert the transparency transition of the canvas of the first video source into complete transparency and convert the transparency transition of the newly-built canvas into complete opacity within a preset time period from the start of playing the second video source; and switching the sound of the first video source to the sound of the second video source;
The play unit 33 is also used to stop playing the first video source.
further, as shown in fig. 4, the determining unit 31 includes a first determining module 311 configured to:
Judging whether the network speed of the current network changes or not;
And if the network speed of the current network changes, determining the video definition of the switching.
Further, as shown in fig. 4, the determining unit 31 includes a second determining module 312 for:
monitoring a system notification message broadcasted by an operating system, wherein the system notification message is used for notifying a network switching event;
And judging whether to switch to a new network according to whether the system notification message is received.
Further, the second determining module 312 is configured to:
Monitoring a system notification message broadcasted by an operating system, wherein the system notification message carries network type information of a current network;
and judging whether to switch to a new network or not according to the network type information.
Further, as shown in fig. 4, the apparatus further includes:
An obtaining unit 35, configured to obtain a sharpness level of the second video source before establishing the second decoding library;
a comparison unit 36 for comparing the sharpness levels of the first video source and the second video source;
A loading unit 32, configured to cancel establishment of the second decoding library if the level of sharpness of the first video source is equal to or greater than the level of sharpness of the second video source;
The loading unit 32 is further configured to establish a second decoding library and load the second video source if the sharpness level of the first video source is less than the sharpness level of the second video source.
further, as shown in fig. 4, the apparatus further includes:
A counting unit 37, configured to count the number of buffering times occurring in the process of playing the first video source if the level of definition of the first video source is greater than the level of definition of the second video source;
and the loading unit 32 is configured to establish a second decoding library and load the second video source when the buffering time exceeds a preset time threshold.
further, the loading unit 32 is configured to load, through the second decoding library, the second video source with the highest resolution level supported by the current network speed.
further, a playing unit 33 is configured to: recording the playing progress of the first video source when the loading of the second video source is finished, and recording as a first playing progress;
adding the first playing progress and the preset progress post allowance to obtain a second playing progress;
Adjusting the initial playing progress of the second video source to a second playing progress;
and when the first video source is played to the second playing progress, starting to play the second video source.
Further, a control unit 34 for:
And gradually reducing the transparency parameter of the first video source canvas according to a preset transparency step value, and simultaneously gradually increasing the transparency parameter of the newly-built canvas according to the transparency step value.
Further, the control unit 34 is configured to turn off the sound of the first video source when the second video source starts playing.
Further, the playing unit 33 is configured to, after stopping playing the first video source:
deleting the first decoding library;
The cache of the first video source is cleared.
the video definition switching device provided by this embodiment can automatically determine whether to switch video definition according to the current network condition, and select a second video source with a definition level matching the current network speed for loading if switching is required, and the switching process does not require any operation performed by a user; when the definition is switched, the embodiment is realized by adopting a dual-decoding-library mechanism, namely, in the process of playing the first video source by the first decoding library, the second video source is synchronously played on the newly-built canvas overlapped with the canvas of the first video source by the second decoding library, so that the buffer gap between the video sources is eliminated, and the seamless connection of the video source pictures is realized; in addition, the embodiment also uses a gradual change type switching mechanism, and realizes smooth transition of the picture definition by transition adjustment of the transparency of the picture cloth, so that the jump change of the picture definition is avoided, and the switching process is more natural and smooth. It can be seen from synthesizing the above-mentioned several points that the auto-change over device of video definition that this embodiment provided can carry out seamless smooth switch to the video definition automatically, can effectively ensure the smoothness degree of video broadcast at the switching in-process.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
in the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in the title of the invention (e.g., means for determining the level of links within a web site) in accordance with embodiments of the invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
it should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (20)

1. a method for video sharpness switching, the method comprising:
determining whether to switch video definition according to the current network condition in the process of playing the first video source through the first decoding library;
if the video definition is switched, establishing a second decoding library, and loading a second video source with the definition level corresponding to the current network speed through the second decoding library, wherein the second video source and the first video source are different video sources of the same video content;
Synchronously playing the second video source on a newly-built canvas overlapped with a first video source canvas according to the playing progress of the first video source, wherein the initial transparency of the newly-built canvas is completely transparent, and the initial playing volume of the second video source is the same as the playing volume of the first video source;
Within a preset time length from the start of playing the second video source, converting the transparency transition of the canvas of the first video source into complete transparency, and simultaneously converting the transparency transition of the newly-built canvas into complete opacity; and switching the sound of the first video source to the sound of the second video source;
stopping playing the first video source;
Prior to the establishing a second decoding bank, the method further comprises:
Acquiring the definition grade of the second video source;
Comparing the sharpness levels of the first video source and the second video source;
if the definition level of the first video source is greater than the definition level of the second video source, counting the buffering times appearing in the process of playing the first video source;
And when the buffering times exceed a preset time threshold value, establishing a second decoding library and loading the second video source.
2. the method of claim 1, wherein determining whether to switch video sharpness based on current network conditions comprises:
Judging whether the network speed of the current network changes or not;
And if the network speed of the current network changes, determining the video definition of the switching.
3. the method of claim 1, wherein determining whether to switch video sharpness based on current network conditions comprises:
Judging whether to switch to a new network;
and if the network is switched to a new network, determining to switch the video definition.
4. The method of claim 3, wherein the determining whether to switch to a new network comprises:
Monitoring a system notification message broadcasted by an operating system, wherein the system notification message is used for notifying a network switching event;
and judging whether to switch to a new network according to whether the system notification message is received.
5. The method of claim 1, wherein prior to said establishing a second decoding bank, the method further comprises:
if the definition level of the first video source is equal to the definition level of the second video source, canceling to establish a second decoding library;
And if the definition level of the first video source is smaller than that of the second video source, establishing a second decoding library and loading the second video source.
6. The method of claim 1, wherein loading, by the second decoding library, the second video source with the level of sharpness corresponding to the current line speed comprises:
And loading a second video source with the highest definition level supported by the current network speed through the second decoding library.
7. the method of claim 1, wherein said synchronously playing the second video source according to the playing progress of the first video source comprises:
Recording the playing progress of the first video source when the second video source is loaded, and recording as a first playing progress;
Adding the first playing progress and a preset progress post allowance to obtain a second playing progress;
adjusting the initial playing progress of the second video source to the second playing progress;
and when the first video source is played to the second playing progress, starting to play the second video source.
8. The method of claim 1, wherein transitioning the transparency of the first video source canvas to fully transparent and simultaneously transitioning the transparency of the newly created canvas to fully opaque comprises:
and gradually reducing the transparency parameter of the first video source canvas according to a preset transparency step value, and simultaneously gradually increasing the transparency parameter of the newly-built canvas according to the transparency step value.
9. the method of claim 1, wherein switching the sound of the first video source to the sound of the second video source comprises:
And when the second video source starts to play, the sound of the first video source is closed.
10. The method of claim 1, wherein after said stopping of playing said first video source, said method further comprises:
Deleting the first decoding bank;
and clearing the cache of the first video source.
11. An apparatus for video sharpness switching, the apparatus comprising:
The determining unit is used for determining whether to switch the video definition according to the current network condition in the process that the playing unit plays the first video source through the first decoding library;
The loading unit is used for establishing a second decoding library if the video definition is switched, and loading a second video source with the definition level corresponding to the current network speed through the second decoding library, wherein the second video source and the first video source are different video sources of the same video content;
the playing unit is used for synchronously playing the second video source on a new canvas overlapped with a first video source canvas according to the playing progress of the first video source, wherein the initial transparency of the new canvas is completely transparent, and the initial playing volume of the second video source is the same as the playing volume of the first video source;
the control unit is used for converting the transparency transition of the canvas of the first video source into complete transparency and simultaneously converting the transparency transition of the newly-built canvas into complete opacity within a preset time length from the start of playing the second video source; and switching the sound of the first video source to the sound of the second video source;
the playing unit is further used for stopping playing the first video source;
The device further comprises:
An obtaining unit, configured to obtain a sharpness level of the second video source before the second decoding library is established;
A comparison unit for comparing the sharpness levels of the first video source and the second video source;
The counting unit is used for counting the buffering times appearing in the process of playing the first video source if the definition level of the first video source is greater than the definition level of the second video source;
and the loading unit is also used for establishing a second decoding library and loading the second video source when the buffering times exceed a preset time threshold.
12. The apparatus of claim 11, wherein the determining unit comprises a first determining module configured to:
Judging whether the network speed of the current network changes or not;
and if the network speed of the current network changes, determining the video definition of the switching.
13. the apparatus of claim 11, wherein the determining unit comprises a second determining module configured to:
monitoring a system notification message broadcasted by an operating system, wherein the system notification message is used for notifying a network switching event;
And judging whether to switch to a new network according to whether the system notification message is received.
14. the apparatus of claim 13, wherein the second determining module is configured to:
monitoring a system notification message broadcasted by an operating system, wherein the system notification message carries network type information of a current network;
And judging whether to switch to a new network or not according to the network type information.
15. the apparatus of claim 11, wherein the loading unit is further configured to cancel establishing a second decoding library if the sharpness level of the first video source is equal to the sharpness level of the second video source;
the loading unit is further configured to establish a second decoding library and load the second video source if the definition level of the first video source is less than the definition level of the second video source.
16. the apparatus of claim 11, wherein the loading unit is configured to load a second video source with a highest resolution level supported by a current network speed through the second decoding library.
17. The apparatus of claim 11, wherein the playback unit is configured to: recording the playing progress of the first video source when the second video source is loaded, and recording as a first playing progress;
Adding the first playing progress and a preset progress post allowance to obtain a second playing progress;
Adjusting the initial playing progress of the second video source to the second playing progress;
And when the first video source is played to the second playing progress, starting to play the second video source.
18. The apparatus of claim 11, wherein the control unit is configured to:
and gradually reducing the transparency parameter of the first video source canvas according to a preset transparency step value, and simultaneously gradually increasing the transparency parameter of the newly-built canvas according to the transparency step value.
19. the apparatus of claim 11, wherein the control unit is configured to turn off sound of the first video source when playing of the second video source is started.
20. The apparatus of claim 11, wherein the playback unit is configured to, after stopping playing back the first video source:
Deleting the first decoding bank;
And clearing the cache of the first video source.
CN201610149109.0A 2016-03-15 2016-03-15 video definition switching method and device Active CN107197371B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610149109.0A CN107197371B (en) 2016-03-15 2016-03-15 video definition switching method and device
PCT/CN2017/075638 WO2017157191A1 (en) 2016-03-15 2017-03-03 Method and apparatus for switching video definitions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610149109.0A CN107197371B (en) 2016-03-15 2016-03-15 video definition switching method and device

Publications (2)

Publication Number Publication Date
CN107197371A CN107197371A (en) 2017-09-22
CN107197371B true CN107197371B (en) 2019-12-13

Family

ID=59850544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610149109.0A Active CN107197371B (en) 2016-03-15 2016-03-15 video definition switching method and device

Country Status (2)

Country Link
CN (1) CN107197371B (en)
WO (1) WO2017157191A1 (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545461A (en) * 2018-05-29 2019-12-06 北京字节跳动网络技术有限公司 Resolution switching method and device of media file and storage medium
CN110582012B (en) * 2018-06-11 2021-07-30 腾讯科技(深圳)有限公司 Video switching method, video processing device and storage medium
CN110602425A (en) * 2018-06-13 2019-12-20 上海哔哩哔哩科技有限公司 Video definition adjusting method, system, computer readable storage medium and terminal
US11178451B2 (en) 2018-08-17 2021-11-16 Roku, Inc. Dynamic playout of transition frames while transitioning between playout of media streams
CN109144613B (en) * 2018-09-03 2021-10-15 武汉斗鱼网络科技有限公司 Android definition switching method and device, terminal and readable medium
CN109144611B (en) * 2018-09-03 2021-07-23 武汉斗鱼网络科技有限公司 Android definition switching method and device, terminal and readable medium
CN109144612B (en) * 2018-09-03 2021-10-15 武汉斗鱼网络科技有限公司 Android definition switching method and device, terminal and readable medium
CN109451361B (en) * 2018-10-18 2022-01-04 武汉斗鱼网络科技有限公司 Code stream definition switching method and device for Android system, terminal and readable medium
CN109413457B (en) * 2018-10-18 2021-11-09 武汉斗鱼网络科技有限公司 Code stream definition switching method and device for Android system, terminal and readable medium
CN111510770B (en) 2019-01-30 2021-08-24 上海哔哩哔哩科技有限公司 Method and device for switching definition, computer equipment and readable storage medium
CN111726642B (en) * 2019-03-19 2023-05-30 北京京东尚科信息技术有限公司 Live broadcast method, apparatus and computer readable storage medium
CN110166810B (en) * 2019-04-25 2022-03-29 腾讯科技(深圳)有限公司 Video rendering engine switching method, device and equipment and readable storage medium
CN110149536B (en) * 2019-05-27 2021-11-16 湖南快乐阳光互动娱乐传媒有限公司 Video playing method and device
CN110278452A (en) * 2019-06-24 2019-09-24 北京字节跳动网络技术有限公司 Video Acceleration of starting method, apparatus, storage medium, terminal and server
CN110753266A (en) * 2019-10-23 2020-02-04 深圳市酷开网络科技有限公司 Video definition adjusting method and device and storage medium
CN110719526B (en) * 2019-10-28 2021-05-07 腾讯科技(深圳)有限公司 Video playing method and device
CN113055833B (en) * 2019-12-11 2022-08-12 中国移动通信有限公司研究院 Service optimization method, base station and application layer equipment
CN111294641B (en) * 2020-03-10 2022-10-21 北京奇艺世纪科技有限公司 Video playing method, system, device, electronic equipment and readable storage medium
CN112291611A (en) * 2020-10-27 2021-01-29 重庆虚拟实境科技有限公司 Video playing method, computer device and readable storage medium
CN113038243B (en) * 2021-05-28 2021-09-17 卡莱特云科技股份有限公司 Transparency adjusting method and device in video source picture playing process
CN113825020B (en) * 2021-09-18 2023-09-29 北京百度网讯科技有限公司 Video definition switching method, device, equipment, storage medium and program product
CN116781951B (en) * 2023-08-24 2023-12-05 湖南快乐阳光互动娱乐传媒有限公司 Definition adjusting method, device and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4912696B2 (en) * 2006-02-28 2012-04-11 パナソニック株式会社 Wireless transmission system for video data
CN103702042A (en) * 2013-12-27 2014-04-02 Tcl新技术(惠州)有限公司 Dual-channel display equipment-based signal source switching method and device
CN103763618A (en) * 2013-12-27 2014-04-30 乐视网信息技术(北京)股份有限公司 Definition switching method and electronic device
CN104219579A (en) * 2014-08-20 2014-12-17 北京奇艺世纪科技有限公司 Video switching method and video switching device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4912696B2 (en) * 2006-02-28 2012-04-11 パナソニック株式会社 Wireless transmission system for video data
CN103702042A (en) * 2013-12-27 2014-04-02 Tcl新技术(惠州)有限公司 Dual-channel display equipment-based signal source switching method and device
CN103763618A (en) * 2013-12-27 2014-04-30 乐视网信息技术(北京)股份有限公司 Definition switching method and electronic device
CN104219579A (en) * 2014-08-20 2014-12-17 北京奇艺世纪科技有限公司 Video switching method and video switching device

Also Published As

Publication number Publication date
WO2017157191A1 (en) 2017-09-21
CN107197371A (en) 2017-09-22

Similar Documents

Publication Publication Date Title
CN107197371B (en) video definition switching method and device
US9955401B2 (en) Method and apparatus for managing handovers in a wireless network based on speed group assignments
US10129809B2 (en) Method and apparatus for managing handovers in a wireless network
KR101297411B1 (en) Apparatus and method for controlling selective use of heterogeneous networks according to unprocessed state of data being streamed
CN109314793B (en) Method for providing adaptive streaming service and streaming server
US20140094163A1 (en) Method and Apparatus for Pre-Loading Information Over a Communication Network
KR101243737B1 (en) Method for receiving streaming data as selectively changing a network to use between heterogeneous networks according to amount of buffered data and an apparatus for said method
CN103763505A (en) Method and device suitable for screen direction switching in video call
CN102291599A (en) Network video playing method and network video playing device
CN104040992A (en) Media streaming in mobile networks with improved efficiency
US10182086B2 (en) Method and apparatus for transmitting streaming media data
US8725947B2 (en) Cache control for adaptive stream player
CN109379766A (en) A kind of method and device switching WiFi network
CN106792169A (en) Internet video play handling method and device
CN111669799A (en) Network connection method and device and electronic equipment
CN105791987A (en) Media data playing method and terminal
KR20150093507A (en) Method and system for providing adaptive video streaming service based on viewing distance
CN112087646B (en) Video playing method and device, computer equipment and storage medium
CN103686942B (en) The method and multimode user terminal of data transmission
US20230115955A1 (en) Voice call method and apparatus and electronic device
KR101879439B1 (en) Method for video service using adaptive bitrate
CN110602425A (en) Video definition adjusting method, system, computer readable storage medium and terminal
CN113438702A (en) Cell switching method and device, electronic equipment and readable storage medium
CN107592342B (en) Information pushing method and device
US20210120067A1 (en) Quality prediction apparatus, quality prediction method and program

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
TR01 Transfer of patent right

Effective date of registration: 20200507

Address after: 310051 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 510640 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio square 14 storey tower

Patentee before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right