CN113225585A - Video definition switching method and device, electronic equipment and storage medium - Google Patents

Video definition switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113225585A
CN113225585A CN202010071483.XA CN202010071483A CN113225585A CN 113225585 A CN113225585 A CN 113225585A CN 202010071483 A CN202010071483 A CN 202010071483A CN 113225585 A CN113225585 A CN 113225585A
Authority
CN
China
Prior art keywords
video
key frame
switching
switched
data
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.)
Granted
Application number
CN202010071483.XA
Other languages
Chinese (zh)
Other versions
CN113225585B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010071483.XA priority Critical patent/CN113225585B/en
Publication of CN113225585A publication Critical patent/CN113225585A/en
Application granted granted Critical
Publication of CN113225585B publication Critical patent/CN113225585B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/23406Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving management of server-side video buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234381Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
    • 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
    • H04N21/4621Controlling the complexity of the content stream or additional data, e.g. lowering the resolution or bit-rate of the video stream for a mobile client with a small screen

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention discloses a video definition switching method, a video definition switching device, electronic equipment and a storage medium, wherein the video definition switching method comprises the following steps: the method comprises the steps of obtaining a currently played video, obtaining a video to be switched consistent with the content of the currently played video when a video definition switching request triggered by a user is received, loading index data corresponding to the video to be switched, extracting a current key frame of the currently played video, obtaining a current key frame, determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data, obtaining a switching key frame, and switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.

Description

Video definition switching method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for switching video sharpness, an electronic device, and a storage medium.
Background
With the development of network technology, users can use terminals to surf the internet to watch videos. The video provided by one video source on the network generally has a plurality of code rates, and the videos with different code rates have different definitions. When a user watches the video, the code rate of the watched video can be manually selected according to the watching requirement.
At present, a video definition switching scheme is mainly based on a real-time Streaming media protocol (HTTP Live Streaming, HLS), that is, a video file is firstly fragmented, and reloaded based on the fragments when the definition is switched.
Disclosure of Invention
The embodiment of the invention provides a video definition switching method and device, electronic equipment and a storage medium, which can solve the problem of frame skipping playing and further reduce flow consumption.
The embodiment of the invention provides a video definition switching method, which comprises the following steps:
acquiring a currently played video to obtain the currently played video;
when a video definition switching request triggered by a user is received, acquiring a video to be switched consistent with the content of a currently played video, wherein the code rate of the currently played video is different from that of the video to be switched;
loading index data corresponding to the video to be switched;
extracting a current key frame of a currently played video to obtain a current key frame;
determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame;
and switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
Correspondingly, an embodiment of the present invention further provides a video definition switching apparatus, including:
the first acquisition module is used for acquiring a currently played video to obtain the currently played video;
the second acquisition module is used for acquiring a video to be switched consistent with the content of a currently played video when a video definition switching request triggered by a user is received, wherein the code rate of the currently played video is different from that of the video to be switched;
the loading module is used for loading the index data corresponding to the video to be switched;
the extraction module is used for extracting the current key frame of the current playing video to obtain the current key frame;
the determining module is used for determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame;
and the switching module is used for switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
Optionally, in some embodiments of the present invention, the determining module includes:
the acquisition submodule is used for acquiring the video data of the current key frame from the current playing video to obtain first video data;
and the determining submodule is used for selecting the key frame meeting the preset conditions in the video to be switched according to the first video data, the current key frame and the index data to obtain a switching key frame.
Optionally, in some embodiments of the present invention, the determining sub-module includes:
the acquisition unit is used for acquiring the position of the current key frame in the first video data to obtain the position information corresponding to the current key frame;
and the selecting unit is used for selecting the key frames meeting the preset conditions in the video to be switched according to the index data to obtain the switching key frames.
Optionally, in some embodiments of the present invention, the selecting unit includes:
the loading subunit is used for loading the video data corresponding to the video to be switched based on the index data to obtain second video data;
and the selecting subunit is used for selecting the key frame matched with the position information in the second video data to obtain a switching key frame.
Optionally, in some embodiments of the present invention, the obtaining subunit is specifically configured to:
extracting a timestamp corresponding to the current key frame to obtain a first timestamp, an
Extracting timestamps corresponding to all key frames in the second video data to obtain a plurality of second timestamps;
and determining the key frame with the second timestamp consistent with the first timestamp as the key frame corresponding to the current key frame to obtain a switching key frame.
Optionally, in some embodiments of the present invention, the switching module is specifically configured to:
determining video data played by the currently played video according to the current key frame;
calculating the video data to be loaded of the video to be switched according to the current key frame, the played video data and the index data;
updating a preset video data buffer area through the video data needing to be loaded to obtain an updated buffer area;
and switching the currently played video to the video to be switched based on the video data to be loaded and the updated buffer area by taking the switching key frame as a starting point.
Optionally, in some embodiments of the present invention, the apparatus further includes a deletion module, where the deletion module is specifically configured to: and deleting the video data corresponding to the currently played video in the updated buffer area.
Optionally, in some embodiments of the present invention, the system further includes a building module, where the building module is specifically configured to:
constructing a video data buffer;
and loading video data corresponding to the currently played video in the video data buffer area.
The method comprises the steps of obtaining a video to be switched consistent with the content of the currently played video when a video definition switching request triggered by a user is received after the currently played video is obtained, obtaining the video to be switched consistent with the content of the currently played video, wherein the code rate of the currently played video is different from the code rate of the video to be switched, loading index data corresponding to the video to be switched, extracting the current key frame of the currently played video to obtain the current key frame, determining the key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame, and finally switching the currently played video into the video to be switched on the basis of the current key frame, the switching key frame and the index data. Therefore, the scheme can solve the problem of frame skipping playing, and further reduce the flow consumption.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a scene schematic diagram of a video sharpness switching method provided by an embodiment of the present invention;
fig. 1b is a schematic flowchart of a video sharpness switching method according to an embodiment of the present invention;
fig. 2a is another flow chart of a video sharpness switching method according to an embodiment of the present invention;
fig. 2b is a schematic diagram illustrating a display page corresponding to a currently played video in the video sharpness switching method according to the embodiment of the present invention;
FIG. 2c is a diagram of a frame of video frame in the video sharpness switching method according to the embodiment of the present invention;
fig. 2d is a schematic diagram of switching and playing a video to be switched in the video definition switching method provided in the embodiment of the present invention;
fig. 3a is a schematic structural diagram of a first implementation of a video sharpness switching apparatus according to an embodiment of the present invention;
fig. 3b is another schematic structural diagram of a second implementation of the video sharpness switching apparatus according to the embodiment of the present invention;
fig. 3c is a schematic structural diagram of a third implementation of the video sharpness switching apparatus according to the embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a video definition switching method and device, electronic equipment and a storage medium.
The video definition switching device may be specifically integrated in a terminal, and the terminal may include a mobile phone, a tablet Computer, or a Personal Computer (PC).
Referring to fig. 1a, an embodiment of the present invention provides a video definition switching system (hereinafter referred to as a switching system), where the switching system may include a terminal, a server and a user, and for example, the video definition switching device is integrated in a personal computer, the personal computer may be installed with a client, the client may be any client capable of providing a video playing service, such as a web client based on a browser, the video playing service may support the user to watch a video through the browser, during the process of watching the video, the user may also switch video definitions for the same video, for example, when the user needs to switch the video definition of the currently played video, the user obtains a video to be switched that is consistent with the content of the currently played video, and the code rate of the video to be switched is different from the code rate of the currently played video, then, loading index data corresponding to a video to be switched, then, extracting a current key frame of a currently played video to obtain a current key frame, then, determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame, and finally, switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
According to the scheme, the key frame (namely the switching key frame) corresponding to the current key frame is determined in the video to be switched according to the current key frame and the index data, and then the currently played video is switched into the video to be switched based on the current key frame, the switching key frame and the index data, namely, in the scheme, the video definition is switched based on the key frame, so that the problem of frame skipping playing in the existing scheme can be solved, and the flow consumption is reduced.
The following are detailed below. It should be noted that the description sequence of the following embodiments is not intended to limit the priority sequence of the embodiments.
A video sharpness switching method includes: the method comprises the steps of obtaining a currently played video, obtaining a video to be switched consistent with the content of the currently played video when a video definition switching request triggered by a user is received, loading index data corresponding to the video to be switched, extracting a current key frame of the currently played video, obtaining a current key frame, determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data, obtaining a switching key frame, and switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
Referring to fig. 1b, fig. 1b is a schematic flow chart illustrating a video sharpness switching method according to an embodiment of the invention. The specific process of the video definition switching method may be as follows:
101. and acquiring the currently played video to obtain the currently played video.
The currently played video may be obtained from various ways, for example, from the internet and/or a specified database, and may specifically be determined according to requirements of practical applications, where the currently played video may include a tv drama, a movie, and a video recorded by a user.
It should be noted that, before video switching, a video data buffer may be constructed, where the video data buffer may be used to store and manage video source data segments, that is, optionally, before the step "acquiring a currently played video and obtaining a currently played video", the method may specifically further include:
(11) constructing a video data buffer;
(12) and loading video data corresponding to the currently played video in the video data buffer.
For example, before the video switch, the currently played video is video a, and the video data corresponding to the video a may be loaded in the video data buffer.
102. And when a video definition switching request triggered by a user is received, acquiring a video to be switched consistent with the content of the currently played video.
The code rate of the currently played video is different from that of the video to be switched, the code rate is the number of data bits transmitted in unit time during data transmission, the unit is kbps (kilobits per second), namely the sampling rate, the higher the sampling rate in unit time is, the higher the precision is, the closer the processed file is to the original file, the higher the code rate is, the clearer the picture is, and the vice versa.
For example, when a video definition switching request triggered by a user is received, the switching request indicates to switch a video a to a video B, that is, the video a is a currently played video, and the video B is a video to be switched, where the content of the video a is the same as the content of the video B, and the bit rate of the video a is different from the bit rate of the video B.
103. And loading index data corresponding to the video to be switched.
In the embodiment of the present invention, a video transmission protocol is followed between the terminal and the server in the video playing process, and the transmission protocol may include: real Time Messaging Protocol (RTMP) and hls (http Live streaming) protocols, among others. Except for special description, the subsequent embodiments of the present invention all take the HLS protocol as an example, the HLS protocol is a streaming media solution, and includes video indexes and video fragments, where the video indexes include many basic information of the video stream, and when a user plays a video through a terminal, the user does not directly play the video indexes, but analyzes the video indexes to obtain indexes of the video fragments, and finds out corresponding URLs of the video fragments according to the indexes to play, where each video fragment is a segment of video content of a video to be played, and includes a time stamp of a key frame and data such as video content corresponding to the time stamp, for example, formats of a currently played video and a video to be switched are both fourth generation motion Picture Experts Group (MP 4) formats, and for an MP4 file, the most important is index data, the index data (also called header file) records decoding information, timestamps, positions and other data of all subsequent audio frames and video frames, and certainly, the definition of switching the currently played video based on other streaming media protocols is also the same, and is not described herein again.
104. And extracting the current key frame of the current playing video to obtain the current key frame.
Wherein, the video frames may include a key frame (I frame), a forward predicted frame (P frame), and a bidirectional predicted frame (B frame), the I frame is an intra-coded frame, is the first frame of each picture, and is a complete picture; p frames are forward predicted frames, and changes are recorded relative to an I frame or an adjacent previous P frame; the B frame is a bidirectional interpolated frame, and is different from the P frame in that it can refer to either an I frame or an adjacent previous frame, or an adjacent subsequent frame, that is, the P frame records a change relative to the adjacent previous and subsequent frames, that is, to play a small segment of picture, the I frame must be found, and then the corresponding B frame and P frame can be decoded smoothly, and it should be noted that the sequence of step 103 and step 104 is not limited.
105. And determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame.
Since the content of the currently played video is consistent with the video to be switched, that is, the number of images recorded by the two videos is the same, and therefore, the number of key frames corresponding to the two videos is also consistent, that is, each key frame in the video to be switched has a key frame corresponding to the key frame in the currently played video, in the embodiment of the present invention, the key frame corresponding to the current key frame in the video to be switched can be determined according to the current key frame and the index data, the difference is that the states of the two video frames are different, for example, when a switching request of video definition triggered by a user for a video a is received, the switching request indicates to switch a video B, at this time, the key frame I1 of the video a is playing, the video frame I1 is determined to be the current key frame, the key frame corresponding to the video frame I1 in the video B is determined to be the key frame I2 according to the video frame I1 and the index data, then the key frame I2 is determined to be a switching key frame.
For example, the video data where the current key frame is located may be obtained from the currently played video, and the key frame corresponding to the current key frame in the video to be switched is determined based on the video data, the current key frame, and the index data, that is, optionally, in some embodiments, the step "determining the key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain the switching key frame" may specifically include:
(21) acquiring video data where a current key frame is located from a current playing video to obtain first video data;
(22) and selecting a key frame meeting preset conditions from the video to be switched according to the first video data, the current key frame and the index data to obtain a switching key frame.
For example, a key frame consistent with the image content of the current key frame may be selected from the video to be switched according to the first video data, the current key frame, and the index data to obtain a switching key frame, and specifically, the image content of the current key frame and the image content corresponding to each key frame in the video to be switched may be identified by using a neural network model.
For another example, the method may further include the steps of obtaining a position of a current key frame in the first video data, determining a key frame corresponding to the current key frame in the video to be switched according to the position and the index data, and then determining a key frame corresponding to the current key frame in the video to be switched according to the position and the index data to obtain a switching key frame, that is, optionally, selecting a key frame meeting a preset condition in the video to be switched according to the first video data, the current key frame and the index data to obtain the switching key frame, where the steps specifically include:
(31) acquiring the position of a current key frame in first video data to obtain position information corresponding to the current key frame;
(32) and selecting a key frame with position information meeting preset conditions in the video to be switched according to the index data to obtain a switching key frame.
For example, specifically, the obtaining of the position of the current key frame in the first video data, where the position indicates that the current key frame is located at the position of the 8 th frame in the first video data, then loading the video data corresponding to the video to be switched based on the index data, and selecting the 8 th frame key frame in the video data corresponding to the video to be switched to obtain the switching key frame, that is, optionally, in some embodiments, the step "determining the key frame corresponding to the current key frame in the video to be switched according to the position information and the index data to obtain the switching key frame" may specifically include:
(41) loading video data corresponding to the video to be switched based on the index data to obtain second video data;
(42) and selecting a key frame matched with the position information from the second video data to obtain a switching key frame.
For example, specifically, the index data is analyzed, video data corresponding to a video to be switched is loaded based on an analysis result to obtain second video data, then a key frame corresponding to the current key frame is obtained from the second video data, and a switching key frame is obtained, where two ways may be used to obtain the switching key frame by obtaining the key frame corresponding to the current key frame from the second video data:
the first mode is as follows: the key frame corresponding to the current key frame may be obtained from the second video data according to the position information of the current key frame, so as to obtain the switching key frame, for example, if the current key frame is data of the 8 th frame, the 8 th frame in the second video data may be determined as the key frame corresponding to the current key frame, so as to obtain the switching key frame.
The second mode is as follows: the key frame corresponding to the current key frame may be selected from the second video data according to the timestamp corresponding to the current key frame and the timestamps corresponding to the key frames in the second video data, that is, optionally, in some embodiments, the step "obtaining the key frame corresponding to the current key frame from the second video data to obtain the switching key frame" may specifically include:
(51) extracting a timestamp corresponding to the current key frame to obtain a first timestamp, and extracting timestamps corresponding to all key frames in the second video data to obtain a plurality of second timestamps;
(52) and determining the key frames with the second timestamps consistent with the first timestamps as the key frames corresponding to the current key frames to obtain the switching key frames.
For example, the currently played video and the video to be switched are both videos of 100 seconds, and the timestamp of the current key frame indicates that the current key frame is a key frame of 10 seconds, then, the key frame of 10 seconds in the second video data may be determined as the key frame corresponding to the current key frame, so as to obtain a switching key frame, and after the switching key frame is obtained, step 106 may be executed.
106. And switching and playing the currently played video to be switched based on the current key frame, the switching key frame and the index data.
For example, specifically, the video data to be loaded of the video to be switched may be calculated according to the current key frame, the switching key frame, and the index data, and then the video to be switched is switched and played in the currently played video based on the switching key frame and the video data to be loaded, that is, optionally, in some embodiments, the step "switching and playing the video to be switched in the currently played video based on the current key frame, the switching key frame, and the index data" may specifically include:
(61) determining video data played by a currently played video according to the current key frame;
(62) calculating video data to be loaded of the video to be switched according to the current key frame, the played video data and the index data;
(63) updating a preset video data buffer area through the video data needing to be loaded to obtain an updated buffer area;
(64) and switching the currently played video to play the video to be switched based on the switching key frame and the updated buffer area by taking the switching key frame as a starting point.
For example, specifically, if the current key frame is the 3 rd key frame, determining the video data played by the currently played video according to the current key frame includes: the method comprises the steps of obtaining video data of a video to be switched based on index data, calculating the video data to be loaded of the video to be switched according to a current key frame and played video data, then reversely calculating the size of a video data buffer area to be loaded according to the video data played by the current played video and the video data to be loaded, namely updating a preset video data buffer area according to the video data played by the current played video and the video data to be loaded, and finally switching the current played video into the video to be switched based on a switching key frame and the video data to be loaded.
In order to avoid unnecessary traffic waste, after the currently played video is switched to the video to be switched, the video data of the previous video in the updated buffer area may be further switched, for example, after the video a is switched to the video B, the video data of the video a in the updated buffer area may be deleted, that is, in some implementations, the step "after the currently played video is switched to the video to be switched based on the video data to be loaded and the updated buffer area with the switching key frame as a starting point" may further include: and deleting the video data corresponding to the currently played video in the updated buffer area.
The method comprises the steps of firstly obtaining a currently played video to obtain the currently played video, obtaining a video to be switched consistent with the content of the currently played video when a video definition switching request triggered by a user is received, then loading index data corresponding to the video to be switched, then extracting a current key frame of the currently played video to obtain a current key frame, then determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame, and finally switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data. Compared with the existing video definition switching scheme, the video definition switching method can determine the key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain the switching key frame, and then switches and plays the video to be switched based on the current key frame, the switching key frame and the index data, namely, the video definition switching is performed based on the key frame in the scheme, so that the problem of frame skipping playing in the existing scheme can be solved, and the flow consumption is reduced.
The method according to the examples is further described in detail below by way of example.
In this embodiment, the video definition switching device is specifically integrated in a terminal as an example.
Referring to fig. 2a, a video sharpness switching method may specifically include the following processes:
201. and the terminal acquires the currently played video to obtain the currently played video.
The terminal may obtain the currently played video in various ways, for example, the currently played video may be obtained from the internet and/or a designated database, and the currently played video may specifically be determined according to requirements of practical applications, and the currently played video may include a television series, a movie, and a video recorded by a user.
It should be noted that, before video switching, the terminal may construct a video data buffer, and the video data buffer may be used to store and manage video source data segments, that is, optionally, in some embodiments, the terminal may specifically construct a video data buffer, and then load video data corresponding to a currently played video in the video data buffer.
202. And when receiving a video definition switching request triggered by a user, the terminal acquires a video to be switched consistent with the content of the currently played video.
For example, please refer to fig. 2B, the terminal may be equipped with a client, the client may be any client capable of providing a video playing service, a display screen of the terminal may display a display page corresponding to the currently played video, the display page may include a switching control a, a switching control B, and a switching control C, when the terminal receives a video definition switching request triggered by a user, and if the terminal detects a selection operation of the user for the switching control C, the terminal obtains the video to be switched corresponding to the currently played video, and the definition of the video to be switched corresponds to the switching control C.
203. And the terminal loads index data corresponding to the video to be switched.
For an MP4 file, the most important is index data, which records decoding information, timestamps, positions, and other data of all subsequent audio frames and video frames, and certainly, the definition of switching the currently played video based on other streaming media protocols is also the same, and is not described herein again.
204. The terminal extracts the current key frame of the current playing video to obtain the current key frame.
Wherein, the video frames may include a key frame (I frame), a forward predicted frame (P frame), and a bidirectional predicted frame (B frame), the I frame is an intra-coded frame, is the first frame of each picture, and is a complete picture; p frames are forward predicted frames, and changes are recorded relative to an I frame or an adjacent previous P frame; the B frame is a bidirectional interpolated frame, and is different from the P frame in that it may refer to either an I frame or an adjacent previous frame, or an adjacent subsequent frame, that is, the P frame records a change with respect to the adjacent previous and subsequent frames, as shown in fig. 2c, video playing may be understood as being completed by rendering consecutive picture frames in sequence, but for video transmission, coding compression must be performed, each segment of video is composed of an I frame and a plurality of B frames, and P frames, where the B frames and the P frames are compression-coded depending on the I frame, the I frame in each segment of video is always the first frame, that is, for playing this segment of video, the I frame must be found first before the corresponding B frame and P frame can be decoded smoothly, and it should be noted that the order of steps 203 and 204 is not limited.
205. And the terminal determines a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame.
Because the content of the currently played video is consistent with the video to be switched, that is, the number of images recorded by the two videos is the same, the number of key frames corresponding to the two videos is also consistent, that is, each key frame in the video to be switched has a key frame corresponding to the key frame in the currently played video, for example, the terminal acquires video data of the currently played video to obtain first video data, then the terminal determines the key frame corresponding to the current key frame in the video to be switched according to the first video data, the current key frame and the index data to obtain a switching key frame, further, for example, specifically, the terminal acquires the position of the current key frame in the first video data, the position indicates that the current key frame is at the position of the 8 th frame in the first video data, then the terminal loads the video data corresponding to the video to be switched based on the index data, and the terminal acquires a key frame corresponding to the current key frame from the video data corresponding to the video to be switched according to the position information to obtain a switching key frame.
206. And the terminal switches the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
Specifically, the terminal can calculate the video data to be loaded of the video to be switched according to the current key frame, the switching key frame and the index data, and then switch and play the video to be switched of the currently played video based on the switching key and the video data to be loaded.
For example, referring to fig. 2d, if the current key frame is the 3 rd key frame, the terminal may determine, according to the current key frame, that the video data of the currently played video includes: the video data of the 1 st frame, the video data of the 2 nd frame and the video data of the 3 rd frame, then the terminal can obtain the video data of the video to be switched based on the index data, the terminal calculates the video data to be loaded of the video to be switched according to the current key frame and the played video data, and finally the terminal switches the video to be switched to play the video to be switched based on the switching key frame and the video data to be loaded, for example, as shown in the figure, the video switching can be performed at the third frame I frame, and for example, in order to improve the fluency of video playing, the video can be switched at the next frame of the switching key frame, that is, the video can be switched at the fourth frame I frame, and the setting is specifically performed according to the actual situation.
Optionally, in some embodiments, after the terminal switches to play the video to be switched, the terminal may delete the video data corresponding to the currently played video in the video data buffer area
It can be known from the above that, the terminal of the present invention first obtains a currently played video to obtain the currently played video, when receiving a video definition switching request triggered by a user, the terminal obtains a video to be switched having a content consistent with that of the currently played video, then, the terminal loads index data corresponding to the video to be switched, next, the terminal extracts a current key frame of the currently played video to obtain a current key frame, then, the terminal determines a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame, and finally, the terminal switches the currently played video to play the video to be switched based on the current key frame, the switching key frame and the index data. Compared with the existing video definition switching scheme, the terminal can determine the key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain the switching key frame, and then the terminal switches the video to be switched to play the video to be switched based on the current key frame, the switching key frame and the index data.
In order to better implement the method for switching video definition according to the embodiments of the present invention, an embodiment of the present invention further provides a switching device (switching device for short) based on the video definition. The terms are the same as those in the video definition switching method, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3a, fig. 3a is a schematic structural diagram of a first implementation manner of a video definition switching apparatus according to an embodiment of the present invention, where the switching apparatus may include a first obtaining module 301, a second obtaining module 302, a loading module 303, an extracting module 304, a determining module 305, and a switching module 306, and specifically the following may be implemented:
the first obtaining module 301 is configured to obtain a currently played video to obtain the currently played video.
The first obtaining module 301 may obtain the currently played video in various ways, for example, the currently played video may be obtained from the internet and/or a specified database, and the currently played video may specifically be determined according to requirements of practical applications, and the currently played video may include a tv drama, a movie, a video recorded by a user, and the like.
The second obtaining module 302 is configured to obtain a video to be switched, which is consistent with the content of the currently played video, when a video definition switching request triggered by a user is received.
The code rate of the currently played video is different from that of the video to be switched, the code rate is the number of data bits transmitted in unit time during data transmission, the unit is kbps (kilobits per second), namely the sampling rate, the higher the sampling rate in unit time is, the higher the precision is, the closer the processed file is to the original file, the higher the code rate is, the clearer the picture is, and the vice versa.
And the loading module 303 is configured to load index data corresponding to the video to be switched.
In the embodiment of the present invention, a video transmission protocol is followed between the terminal and the server in the video playing process, and the transmission protocol may include: real Time Messaging Protocol (RTMP) and hls (http Live streaming) protocols, among others. Except for special description, the subsequent embodiments of the present invention all take the HLS protocol as an example, the HLS protocol is a streaming media solution, and includes video indexes and video fragments, where the video indexes record indexes of the video fragments, and when a user plays a video through a terminal, the user does not directly play the video indexes, but analyzes the video indexes to obtain the indexes of the video fragments, and finds out the corresponding URLs of the video fragments according to the indexes to play, where each video fragment is a segment of video content of a video to be played and includes a time stamp and data such as the video content corresponding to the time stamp, for example, formats of a currently played video and a video to be converted are both in a fourth generation motion Picture Experts Group (MP 4) format, and for an MP4 file, the most important index data is index data, and the index data records decoding information, and decoding information of all subsequent audio frames and video frames are recorded in the subsequent audio frames, and video fragments in the current video frames The data such as the timestamp and the position, of course, also the definition of the currently played video is switched based on other streaming media protocols, which is not described herein again.
The extracting module 304 is configured to extract a current key frame of a currently played video to obtain a current key frame.
The determining module 305 is configured to determine, according to the current key frame and the index data, a key frame corresponding to the current key frame in the video to be switched, so as to obtain a switching key frame.
Since the content of the currently played video is consistent with the video to be switched, that is, the number of images recorded by the two videos is the same, the number of key frames corresponding to the two videos is also consistent, that is, each key frame in the video to be switched has a key frame corresponding to the key frame in the currently played video.
Optionally, in some embodiments, the determining module 305 may specifically include:
the acquisition submodule is used for acquiring video data where the current key frame is located from the current playing video to obtain first video data;
and the determining submodule is used for selecting the key frame meeting the preset conditions from the videos to be switched according to the first video data, the current key frame and the index data to obtain the switching key frame.
Optionally, in some embodiments, the determining the sub-module specifically may include:
the acquisition unit is used for acquiring the position of the current key frame in the first video data to obtain the position information corresponding to the current key frame;
and the selecting unit is used for selecting the key frames meeting the preset conditions in the video to be switched according to the index data to obtain the switching key frames.
Optionally, in some embodiments, the selecting unit may specifically include:
the loading subunit is used for loading the video data corresponding to the video to be switched based on the index data to obtain second video data;
and the selecting subunit is used for selecting the key frame matched with the current key frame position information in the second video data to obtain the switching key frame.
Optionally, in some embodiments, the obtaining subunit may specifically be configured to: extracting the time stamp corresponding to the current key frame to obtain a first time stamp, extracting the time stamp corresponding to each key frame in the second video data to obtain a plurality of second time stamps, determining the key frame with the second time stamp consistent with the first time stamp as the key frame corresponding to the current key frame to obtain a switching key frame.
The switching module 306 is configured to switch the currently played video to a video to be switched based on the current key frame, the switching key frame, and the index data.
For example, specifically, the video data to be loaded of the video to be switched may be calculated according to the current key frame, the switching key frame and the index data, and then the video to be switched is switched and played from the currently played video based on the switching key and the video data to be loaded.
Optionally, in some embodiments, the switching module 306 may be specifically configured to: determining video data played by a currently played video according to a current key frame, calculating video data to be loaded of a video to be switched according to the current key frame, the played video data and index data, updating a preset video data buffer area according to the video data to be loaded to obtain an updated buffer area, and switching the currently played video to play the video to be switched based on the video data to be loaded and the updated buffer area by taking a switching key frame as a starting point.
Optionally, in some embodiments, please refer to fig. 3b, further including a deleting module 307, where the deleting module 307 is specifically configured to delete video data corresponding to a currently played video in the updated buffer.
Optionally, in some embodiments, please refer to fig. 3c, which further includes a building module 308, where the building module 308 may specifically be configured to: and constructing a video data buffer area, and loading video data corresponding to the currently played video in the video data buffer area.
It can be seen that, in the video definition switching apparatus according to the embodiment of the present invention, the first obtaining module 301 obtains a currently played video, after the currently played video is obtained, the second obtaining module 302 obtains a to-be-switched video consistent with the content of the currently played video when receiving a video definition switching request triggered by a user, then the loading module 303 loads index data corresponding to the to-be-switched video, then the extracting module 304 extracts a current key frame of the currently played video to obtain a current key frame, then the determining module 305 determines a key frame corresponding to the current key frame in the to-be-switched video according to the current key frame and the index data to obtain a switching key frame, and finally the switching module 306 switches the currently played video to play the to-be-switched video based on the current key frame, the switching key frame, and the index data. Compared with the existing video definition switching scheme, the determining module 305 of the present invention may determine the key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain the switching key frame, and then the switching module 306 switches the currently played video to the video to be switched based on the current key frame, the switching key frame and the index data, that is, in the scheme, the video definition switching is performed based on the key frame, so that the problem of frame skipping playing in the existing scheme can be solved, and further, the flow consumption is reduced.
In addition, an embodiment of the present invention further provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
the method comprises the steps of obtaining a currently played video, obtaining a video to be switched consistent with the content of the currently played video when a video definition switching request triggered by a user is received, loading index data corresponding to the video to be switched, extracting a current key frame of the currently played video, obtaining a current key frame, determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data, obtaining a switching key frame, and switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The method comprises the steps of firstly obtaining a currently played video to obtain the currently played video, obtaining a video to be switched consistent with the content of the currently played video when a video definition switching request triggered by a user is received, then loading index data corresponding to the video to be switched, then extracting a current key frame of the currently played video to obtain a current key frame, then determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame, and finally switching the currently played video to play the video to be switched based on the current key frame, the switching key frame and the index data. Compared with the existing video definition switching scheme, the video definition switching method can determine the key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain the switching key frame, and then switches and plays the video to be switched based on the current key frame, the switching key frame and the index data, namely, the video definition switching is performed based on the key frame in the scheme, so that the problem of frame skipping playing in the existing scheme can be solved, and the flow consumption is reduced.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the video definition switching methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
the method comprises the steps of obtaining a currently played video, obtaining a video to be switched consistent with the content of the currently played video when a video definition switching request triggered by a user is received, loading index data corresponding to the video to be switched, extracting a current key frame of the currently played video, obtaining a current key frame, determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data, obtaining a switching key frame, and switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any video definition switching method provided in the embodiment of the present invention, the beneficial effects that can be achieved by any video definition switching method provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The foregoing describes in detail a video sharpness switching method, apparatus, electronic device, and storage medium provided in the embodiments of the present invention, and a specific example is applied in the present document to explain the principle and implementation manner of the present invention, and the description of the foregoing embodiments is only used to help understand the method and core ideas of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (15)

1. A method for video sharpness switching, comprising:
acquiring a currently played video to obtain the currently played video;
when a video definition switching request triggered by a user is received, acquiring a video to be switched consistent with the content of a currently played video, wherein the code rate of the currently played video is different from that of the video to be switched;
loading index data corresponding to the video to be switched;
extracting a current key frame of a currently played video to obtain a current key frame;
determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame;
and switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
2. The method according to claim 1, wherein the determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame comprises:
acquiring video data where the current key frame is located from the current playing video to obtain first video data;
and selecting a key frame meeting preset conditions from the video to be switched according to the first video data, the current key frame and the index data to obtain a switching key frame.
3. The method according to claim 2, wherein the selecting a key frame satisfying a preset condition from the video to be switched according to the first video data, the current key frame and the index data to obtain a switching key frame comprises:
acquiring the position of a current key frame in the first video data to obtain position information corresponding to the current key frame;
and selecting a key frame with position information meeting preset conditions in the video to be switched according to the index data to obtain a switching key frame.
4. The method according to claim 3, wherein the selecting a key frame satisfying a preset condition from the video to be switched according to the index data to obtain a switching key frame comprises:
loading video data corresponding to the video to be switched based on the index data to obtain second video data;
and selecting a key frame matched with the position information from the second video data to obtain a switching key frame.
5. The method according to claim 4, wherein said obtaining the key frame matching with the position information in the second video data to obtain a switching key frame comprises:
extracting a timestamp corresponding to the current key frame to obtain a first timestamp, an
Extracting timestamps corresponding to all key frames in the second video data to obtain a plurality of second timestamps;
and determining the key frame consistent with the first timestamp in the plurality of second timestamps as the key frame corresponding to the current key frame to obtain a switching key frame.
6. The method according to any one of claims 1 to 5, wherein switching the currently playing video to play the video to be switched based on the current key frame, the switching key frame and the index data comprises:
determining video data played by the currently played video according to the current key frame;
calculating the video data to be loaded of the video to be switched according to the current key frame, the played video data and the index data;
updating a preset video data buffer area through the video data needing to be loaded to obtain an updated buffer area;
and switching the currently played video to the video to be switched based on the video data to be loaded and the updated buffer area by taking the switching key frame as a starting point.
7. The method according to claim 6, wherein after switching the currently played video to the video to be switched based on the video data to be loaded and the updated buffer area with the switching key frame as a starting point, further comprising:
and deleting the video data corresponding to the currently played video in the updated buffer area.
8. The method according to any one of claims 1 to 5, wherein before obtaining the currently playing video, further comprising:
constructing a video data buffer;
and loading video data corresponding to the currently played video in the video data buffer area.
9. A video sharpness switching apparatus, comprising:
the first acquisition module is used for acquiring a currently played video to obtain the currently played video;
the second acquisition module is used for acquiring a video to be switched consistent with the content of a currently played video when a video definition switching request triggered by a user is received, wherein the code rate of the currently played video is different from that of the video to be switched;
the loading module is used for loading the index data corresponding to the video to be switched;
the extraction module is used for extracting the current key frame of the current playing video to obtain the current key frame;
the determining module is used for determining a key frame corresponding to the current key frame in the video to be switched according to the current key frame and the index data to obtain a switching key frame;
and the switching module is used for switching the currently played video into the video to be switched based on the current key frame, the switching key frame and the index data.
10. The apparatus of claim 9, wherein the determining module comprises:
the obtaining submodule is used for obtaining video data where the current key frame is located from the current playing video to obtain first video data;
and the determining submodule is used for selecting the key frame meeting the preset conditions in the video to be switched according to the first video data, the current key frame and the index data to obtain a switching key frame.
11. The apparatus of claim 10, wherein the determination submodule comprises:
the acquisition unit is used for acquiring the position of the current key frame in the first video data to obtain the position information corresponding to the current key frame;
and the selecting unit is used for selecting the key frames meeting the preset conditions in the video to be switched according to the index data to obtain the switching key frames.
12. The apparatus of claim 11, wherein the selection unit comprises:
the loading subunit is used for loading the video data corresponding to the video to be switched based on the index data to obtain second video data;
and the selecting subunit is used for selecting the key frame matched with the position information in the second video data to obtain a switching key frame.
13. The apparatus according to claim 12, wherein the obtaining subunit is specifically configured to:
extracting a timestamp corresponding to the current key frame to obtain a first timestamp, an
Extracting timestamps corresponding to all key frames in the second video data to obtain a plurality of second timestamps;
and determining the key frame with the second timestamp consistent with the first timestamp as the key frame corresponding to the current key frame to obtain a switching key frame.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method for switching video sharpness according to any one of claims 1-9.
15. A storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the video sharpness switching method according to any one of claims 1-8.
CN202010071483.XA 2020-01-21 2020-01-21 Video definition switching method and device, electronic equipment and storage medium Active CN113225585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010071483.XA CN113225585B (en) 2020-01-21 2020-01-21 Video definition switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010071483.XA CN113225585B (en) 2020-01-21 2020-01-21 Video definition switching method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113225585A true CN113225585A (en) 2021-08-06
CN113225585B CN113225585B (en) 2024-08-23

Family

ID=77085250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010071483.XA Active CN113225585B (en) 2020-01-21 2020-01-21 Video definition switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113225585B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339291A (en) * 2021-12-31 2022-04-12 杭州当虹科技股份有限公司 Method for zooming and playing streaming media video
CN114449344A (en) * 2022-02-03 2022-05-06 百果园技术(新加坡)有限公司 Video stream transmission method and device, electronic equipment and storage medium
CN115396729A (en) * 2022-08-26 2022-11-25 百果园技术(新加坡)有限公司 Video target frame determining method, device, equipment and storage medium
WO2024082379A1 (en) * 2022-10-19 2024-04-25 深圳看到科技有限公司 Switching method and apparatus used for multiple video streams

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219579A (en) * 2014-08-20 2014-12-17 北京奇艺世纪科技有限公司 Video switching method and video switching device
CN105979404A (en) * 2015-12-01 2016-09-28 乐视致新电子科技(天津)有限公司 Streaming media processing method and device
CN109168078A (en) * 2018-09-10 2019-01-08 苏宁智能终端有限公司 A kind of video definition switching method and device
CN109246462A (en) * 2018-10-11 2019-01-18 苏宁易购集团股份有限公司 A kind of video flowing seamless handover method and device
CN110636346A (en) * 2019-09-19 2019-12-31 北京达佳互联信息技术有限公司 Code rate self-adaptive switching method and device, electronic equipment and storage medium
CN110636338A (en) * 2019-09-17 2019-12-31 北京百度网讯科技有限公司 Video definition switching method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219579A (en) * 2014-08-20 2014-12-17 北京奇艺世纪科技有限公司 Video switching method and video switching device
CN105979404A (en) * 2015-12-01 2016-09-28 乐视致新电子科技(天津)有限公司 Streaming media processing method and device
CN109168078A (en) * 2018-09-10 2019-01-08 苏宁智能终端有限公司 A kind of video definition switching method and device
CN109246462A (en) * 2018-10-11 2019-01-18 苏宁易购集团股份有限公司 A kind of video flowing seamless handover method and device
CN110636338A (en) * 2019-09-17 2019-12-31 北京百度网讯科技有限公司 Video definition switching method and device, electronic equipment and storage medium
CN110636346A (en) * 2019-09-19 2019-12-31 北京达佳互联信息技术有限公司 Code rate self-adaptive switching method and device, electronic equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339291A (en) * 2021-12-31 2022-04-12 杭州当虹科技股份有限公司 Method for zooming and playing streaming media video
CN114339291B (en) * 2021-12-31 2024-05-28 杭州当虹科技股份有限公司 Method for scaling and playing streaming media video
CN114449344A (en) * 2022-02-03 2022-05-06 百果园技术(新加坡)有限公司 Video stream transmission method and device, electronic equipment and storage medium
CN114449344B (en) * 2022-02-03 2024-02-09 百果园技术(新加坡)有限公司 Video stream transmission method, device, electronic equipment and storage medium
CN115396729A (en) * 2022-08-26 2022-11-25 百果园技术(新加坡)有限公司 Video target frame determining method, device, equipment and storage medium
CN115396729B (en) * 2022-08-26 2023-12-08 百果园技术(新加坡)有限公司 Video target frame determining method, device, equipment and storage medium
WO2024082379A1 (en) * 2022-10-19 2024-04-25 深圳看到科技有限公司 Switching method and apparatus used for multiple video streams

Also Published As

Publication number Publication date
CN113225585B (en) 2024-08-23

Similar Documents

Publication Publication Date Title
US10187668B2 (en) Method, system and server for live streaming audio-video file
US10027927B2 (en) High quality multimedia transmission from a mobile device for live and on-demand viewing
CN109168078B (en) Video definition switching method and device
CN113225585B (en) Video definition switching method and device, electronic equipment and storage medium
KR100424762B1 (en) Image data providing system and method thereof
CN107634930B (en) Method and device for acquiring media data
CN110784718B (en) Video data encoding method, apparatus, device and storage medium
CN108737884B (en) Content recording method and equipment, storage medium and electronic equipment
US20070252897A1 (en) Image capturing apparatus and method, and recording medium therefor
CN106998485B (en) Video live broadcasting method and device
CN102882829A (en) Transcoding method and system
JP2017139628A (en) Communication device, communication system, communication method and computer program
EP3748983B1 (en) Video playback method, terminal apparatus, and storage medium
CN109168020A (en) Method for processing video frequency, device, calculating equipment and storage medium based on live streaming
CN115243074B (en) Video stream processing method and device, storage medium and electronic equipment
WO2020215454A1 (en) Screen recording method, client, and terminal device
US20040075678A1 (en) Multimedia contents editing apparatus and multimedia contents playback apparatus
CN110662017A (en) Video playing quality detection method and device
CN105122818A (en) Computer system, distribution control system, distribution control method, and computer-readable storage medium
CN111436009A (en) Real-time video stream transmission and display method and transmission and play system
CN112235600B (en) Method, device and system for processing video data and video service request
CN107493478B (en) Method and device for setting coding frame rate
CN109618198A (en) Live content reports method and device, storage medium, electronic equipment
CN113382278A (en) Video pushing method and device, electronic equipment and readable storage medium
CN111107387B (en) Video transcoding method and device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40051647

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant