CN112019858B - Video playing method and device, computer equipment and storage medium - Google Patents

Video playing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112019858B
CN112019858B CN201910468193.6A CN201910468193A CN112019858B CN 112019858 B CN112019858 B CN 112019858B CN 201910468193 A CN201910468193 A CN 201910468193A CN 112019858 B CN112019858 B CN 112019858B
Authority
CN
China
Prior art keywords
video
data
playing
decoder
decoding
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
CN201910468193.6A
Other languages
Chinese (zh)
Other versions
CN112019858A (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 CN201910468193.6A priority Critical patent/CN112019858B/en
Publication of CN112019858A publication Critical patent/CN112019858A/en
Application granted granted Critical
Publication of CN112019858B publication Critical patent/CN112019858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • 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/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • 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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • 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/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4341Demultiplexing of audio and video streams
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention discloses a video playing method, a video playing device, computer equipment and a storage medium; decoding video compression coding data of a first video through a video decoder to obtain decoded video data of the first video, and playing the decoded video data of the first video; when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played; resetting the video decoder according to the decoding parameters of the second video; decoding the video compression coded data of the second video based on a set video decoder to obtain decoded video data of the second video; and playing the decoded video data of the second video. The scheme can improve the fluency of video playing switching.

Description

Video playing method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of videos, in particular to a video playing method, a video playing device, computer equipment and a storage medium.
Background
With the popularization of intelligent terminals and the development of the internet, watching online videos at each intelligent terminal becomes an important part in the life of people, and people have higher and higher video services. Providing users with better viewing effects has become an important task for various online video websites.
Currently, each large video website provides a novel video watching mode, namely interactive video. The interactive video is: when the user watches the video, the user decides the following trend at the moment of the key stage, and the user is given an opportunity to dominate the plot and ending trend of the episode. The interactive mode greatly enriches the watching modes of the user and improves the participation of the user.
In fact, the interactive video adopts a video playing switching technology, namely, when one video is played, switching to playing another video is carried out. However, when the current video playing switching technology is adopted to realize interactive video, the video playing switching can be caused to have the phenomenon of pause and the like, and therefore, the fluency of the video playing switching is poor.
Disclosure of Invention
The embodiment of the invention provides a video playing method and device, computer equipment and a storage medium, which can improve the fluency of video playing switching.
The embodiment of the invention provides a video playing method, which comprises the following steps:
decoding the video compression coding data of the first video through a video decoder to obtain decoded video data of the first video, and playing the decoded video data of the first video;
when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played;
resetting the video decoder according to the decoding parameters of the second video;
decoding the video compression coded data of the second video based on a set video decoder to obtain decoded video data of the second video;
and playing the decoded video data of the second video.
Correspondingly, an embodiment of the present invention further provides a video playing apparatus, including:
the first playing unit is used for decoding the video compression coded data of the first video through a video decoder to obtain decoded video data of the first video and playing the decoded video data of the first video;
the determining unit is used for determining a second video needing to be switched to play when the playing information of the first video meets a video playing switching condition;
a setting unit for resetting the video decoder according to the decoding parameters of the second video;
the decoding unit is used for decoding the video compression coded data of the second video based on the set video decoder to obtain decoded video data of the second video;
and the second playing unit is used for playing the decoded video data of the second video.
In an embodiment, the first playing unit may include:
the first decapsulation subunit is configured to decapsulate video data of a first video to obtain video compression encoded data of the first video;
the decoding subunit is configured to read, by the video decoder, video compression coded data of a first video from a video data queue and decode the video compression coded data to obtain decoded video data of the first video;
and the playing subunit is used for playing the decoded video data of the first video.
In an embodiment, the video playing apparatus according to the embodiment of the present invention further includes:
a first adding unit, configured to add video parameter data to the video data queue, where the video parameter data includes a decoding parameter of a second video;
a second adding unit, configured to add video compression coded data of the second video to the video data queue;
the setting unit is used for resetting the video decoder based on the video parameter data in the video data queue.
In an embodiment, the setting unit is configured to, when the video decoder reads video parameter data from the video data queue, reset the video decoder according to a decoding parameter in the video parameter data;
and the decoding unit is used for reading the video compression coded data of the second video from the video data queue through a set video decoder for decoding.
In an embodiment, the second adding unit may be configured to: acquiring a target position of video parameter data in the video data queue; determining the initial adding position of the video compression coding data of the second video in the video data queue according to the target position; and adding the video compression coding data of the second video into the video data queue according to the starting adding position.
In an embodiment, the first adding unit may include:
a second decapsulating subunit, configured to decapsulate video data of the second video to obtain video compression encoded data of the second video;
and the adding subunit is used for adding the video parameter data to the video data queue when the video compression coded data is the first video compression coded data of the second video.
In an embodiment, the second decapsulating subunit is specifically configured to: opening a decapsulator corresponding to the second video according to the address of the second video; and decapsulating the video data of the second video through the decapsulator to obtain video compression coding data of the second video.
In an embodiment, the determining unit may include:
the display subunit is used for displaying a video selection control on a video playing page when the playing information of the first video meets a video playing switching condition;
and the determining subunit is used for determining the video corresponding to the video selection control selected by the user as the second video needing to be switched to be played when the selection operation of the user on the video selection control is detected.
In an embodiment, the determining subunit is further configured to, when a selection operation of the user for the video selection control is not detected within a preset time period, select a video corresponding to the default video selection control as the second video that needs to be switched to be played.
In an embodiment, the determining unit is configured to: acquiring the current playing time of a first video in real time; and when the current playing time reaches the preset time, determining that a video playing switching condition is met, and determining a second video needing to be switched to be played.
In an embodiment, the setting unit is configured to restart the video decoder and release decoder parameters of the video decoder; setting decoder parameters of the video decoder according to decoding parameters of a second video.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps in any one of the video playing methods provided in the embodiments of the present invention when executing the program.
In addition, the embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in any one of the video playing methods provided by the embodiments of the present invention.
The embodiment of the invention can decode the video compression coding data of the first video through the video decoder to obtain the decoded video data of the first video, and play the decoded video data of the first video; when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played; resetting the video decoder according to the decoding parameters of the second video; decoding the video compression coded data of the second video based on a set video decoder to obtain decoded video data of the second video; and playing the decoded video data of the second video. Because the scheme can adopt one video decoder to decode different videos, the switching of video playing is realized, and a new video decoder is not required to be loaded or started to play for decoding when other videos are played in a switching manner, so that the phenomena of blocking and the like of video playing switching can be avoided, the fluency of video playing switching is improved, and resources can be saved at the same time.
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 schematic scene diagram of a video playing method according to an embodiment of the present invention;
fig. 1b is a flowchart of a video playing method according to an embodiment of the present invention;
FIG. 1c is a schematic view of a video playback page according to an embodiment of the present invention;
FIG. 1d is a schematic diagram of an interactive video scenario selection provided by an embodiment of the present invention;
fig. 1e is a schematic diagram illustrating another interactive video scenario selection provided by an embodiment of the present invention;
fig. 2a is another schematic flow chart of a video playing method according to an embodiment of the present invention;
FIG. 2b is a schematic diagram illustrating an interactive video playback decoding method according to an embodiment of the present invention;
fig. 2c is a schematic view of a playing process of an interactive video according to an embodiment of the present invention;
fig. 3a is a schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 3b is a schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 3c is a schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 3d is another schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 3e is another schematic structural diagram of a video playing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer 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 playing method, a video playing device, computer equipment and a storage medium. The video playing device can be integrated in a computer device, and the computer device can be a server, a terminal or other devices; for example, the terminal may be a mobile phone, a tablet computer, a notebook computer, or the like.
The server may be a single server, or a server cluster composed of a plurality of servers.
The embodiment of the present invention will describe a video playing method according to an embodiment of the present invention by taking a computer device as an example.
Referring to fig. 1a, taking a computer device as an example of a terminal, an embodiment of the present invention provides a video playing system, including a server 10, a terminal 20, and the like; the terminal 10 and the server 20 are connected via a network, such as a wired or wireless network, and the video playing device is integrated in the terminal.
The video playing device may be a software program with a video playing function, for example, the video playing device may be a video playing client. In practical application, the terminal can download and install the video playing device from the server through the network, and then the terminal can execute the method of the embodiment of the invention through the installed video playing device to realize video playing.
The server 10 may be configured to provide the video data to the terminal 20 for the terminal to play.
The terminal 20 may be configured to play videos and the like, for example, switch video playing and the like, and specifically, the terminal may obtain video data of a first video from a server, perform decapsulation processing on the video data of the first video to obtain video compression coded data of the first video, then decode the video compression coded data of the first video through a video decoder to obtain decoded video data of the first video, and play the decoded video data of the first video; when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played; resetting the video decoder according to the decoding parameters of the second video; decoding the video compression coded data of the second video based on the set video decoder to obtain decoded video data of the second video; and playing the decoded video data of the second video, thereby realizing switching from the first video to playing the second video.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The present embodiment will be described from the perspective of a video playback apparatus, which may be specifically integrated in a computer device such as a terminal
In the video playing method provided in the embodiment of the present invention, the method may be executed by a processor of a terminal, as shown in fig. 1b, a specific process of the video playing method may be as follows:
101. and decoding the video compression coded data of the first video through a video decoder to obtain decoded video data of the first video, and playing the decoded video data of the first video.
The first video can be interactive video and other types of video, the interactive video is a plot development opportunity for a user to select a video in the video playing process, and the user determines the subsequent plot development. For example, in the process of playing an interactive video, when an interactive point is reached, the terminal provides a plurality of scenarios for the user to select, and when the user can select the scenario to be developed through operation, the terminal can play the scenario video selected by the user.
The video decoder is used for performing decoding operation on video data, and specifically, video compression coded data can be decoded into uncompressed video original data. The compression coding standard of video includes h.264, MPEG2, etc. Decoding is the most important and complex link in the whole video playing. By decoding, the compression-encoded video data is output as uncompressed color data, such as YUV, RGB, and the like.
The video compression coded data are data formed by compression coding of video image data or video frame data, and the original video image or video frame can be obtained by decoding the video compression coded data.
In the embodiment of the present invention, the video compression encoding data of the first video may be obtained by decapsulating the video data of the first video. The decapsulation execution body may be of various types, for example, in an embodiment, video data of the first video is decapsulated by the server, and for example, in an embodiment, video data of the first video may be decapsulated by the terminal itself.
In an embodiment, in order to reduce the mutual waiting between the decapsulation and the decoding and improve the video playing efficiency, a queue may be further configured to buffer the video compression encoded data, which may be referred to as a video data queue. For example, the step "decoding the video compression encoded data of the first video by the video decoder, and playing the decoded video data of the first video" may include:
decapsulating video data of a first video to obtain video compression coded data of the first video;
adding video compression coding data of a first video to a video data queue;
reading video compression coding data of a first video from the video data queue through a video decoder for decoding to obtain decoded video data of the first video;
and playing the decoded video data of the first video.
The decapsulation is also called demultiplexing, and is used to separate input data in a package format (such as an AVI, MP4, TS, and FLV package format) into audio stream compression coded data and video compression coded data (which may be called a packet), and separate basic data streams such as video, audio, and subtitles.
In the embodiment of the present invention, the decapsulation may be implemented by a decapsulator, for example, a terminal may perform decapsulation processing on video data of a first video by using a decapsulator for the first video to obtain audio compression coded data and video compression coded data of the first video; and adding the video compression coded data to a video data queue and the audio compression coded data to an audio data queue. And then, the terminal reads the video compression coding data from the video data queue through the video decoder for decoding, reads the audio compression coding data from the audio data queue through the audio decoder for decoding, and plays the decoded video data and the decoded audio data, thereby realizing video playing.
102. And when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played.
The playing information of the first video is playing information in a process of playing the first video, and for example, the playing information may include: play time, video frames played, subtitle content played, and so on.
The video playing switching condition is a condition that other videos need to be switched to be played, and the condition can be related to playing information of the first video and can be set according to actual requirements. For example, in an embodiment, the video playback switching condition may include: the current playing time of the first video reaches a preset time; that is, the step "determining the second video to be switched to play when the play information of the first video meets the video play switching condition" may include: acquiring the current playing time of a first video in real time; and when the current playing time reaches the preset time, determining that the video playing switching condition is met, and determining a second video needing to be switched to be played.
In the interactive video, the video playing switching condition may include that a current playing time point of the first video reaches a preset time point, and the preset time point is an interactive point of the interactive video. The preset time or the preset time point can be set according to actual requirements, for example, 1 minute and 30 seconds, and the like.
In addition, in an embodiment, the video playing switching condition may further include that a currently playing video frame of the first video is a preset frame, or that a currently playing subtitle content of the first video is a preset content, and the like.
The second video is a video different from the first video, and in an interactive video scene, the second video may be a plot video of the interactive video, and the like.
The mode of determining the second video to be switched to play may be multiple, for example, the second video may be preset, and for example, the second video is further selected by the user. For example, when the playing information of the first video meets the video playing switching condition, a video selection control can be displayed on the video playing page, so that the user can select the video to be switched and played.
Specifically, the step "determining the second video to be switched to be played when the playing information of the first video meets the video playing switching condition" may include:
when the playing information of the first video meets the video playing switching condition, displaying a video selection control on a video playing page;
when the selection operation of the user for the video selection control is detected, determining the video corresponding to the video selection control selected by the user as a second video needing to be switched to be played.
The presentation form of the video selection control may be various, for example, an icon, a button, an input box, and the like, and in an interactive video scene, the video selection control may be a scenario selection control (also referred to as a scenario option).
The display position of the video selection control can be set according to actual requirements, for example, the display position can be at the bottom, the side, the top, and the like of a video playing page.
For example, referring to fig. 1c, the terminal plays an interactive video a (i.e., a first video) on a video playing page, and when the terminal determines that the playing information of the interactive video satisfies a video playing switching condition, for example, when the playing time of the interactive video a reaches an interactive time point, a scenario selection control is displayed on the video playing page, as shown in fig. 1d, the scenario selection control, "scenario 1", "scenario 2", "scenario 3", and the like, is displayed below the video playing page. The user can select the plot video needing to be played through the plot selection control so as to determine the trend of the plot. For example, if the user wants to switch the video of the play scenario 2, the user operates, such as clicking, sliding, and the like, the scenario selection control "scenario 2", and at this time, the terminal may determine the scenario video B corresponding to the scenario selection control "scenario 2" as the second video to be played, and then play the second video.
In an embodiment, in order to improve the success rate and efficiency of video switching, in consideration of the situation that a user does not operate the video selection control for a long time to select a video to be switched to play, a default video may be selected as the second video to be played. For example, the step "determining the second video to be switched to play when the playing information of the first video meets the video playing switching condition" may further include:
and when the selection operation of the user for the video selection control is not detected within the preset time length, selecting the video corresponding to the default video selection control as a second video needing to be switched to be played.
The starting time point of the preset duration can be set according to actual requirements, for example, the time determined to meet the video playing switching condition can be used as the starting time point, and the display time for displaying the video selection control can also be used as the starting time point. The length of the preset time period can be set according to actual requirements, such as 10 seconds.
For example, referring to fig. 1e, when the playing time of the interactive video a reaches the interactive time point, a scenario selection control is displayed on the video playing page. As shown in fig. 1d, a scenario selection control, "scenario 1", "scenario 2", "scenario 3", and the like, is displayed below the video playback page. And if the user does not operate any plot selection control to select the plot within 10 seconds after the plot selection control is displayed, taking the video corresponding to the default plot selection control as the second video needing to be switched to be played. For example, the video C corresponding to the scenario 3 ″ is played as the second video to be switched.
In an embodiment, in order to remind the user of the time of selecting the video, time progress information of the video selection can be displayed on the video playing page, and the time progress information is used for indicating the time progress of the user from the current selection ending time, for example, indicating the time length of the user from the current distance to the plot selection ending time, or the elapsed time length, and the like.
The time schedule information may be in various forms, such as a text form, a time length from the selected termination time is directly displayed, and a graphic form, such as a progress bar, is also shown. The progress bar is used for displaying the speed, the completion degree, the size of the residual unfinished task amount and the possibly required processing time of the processing task in a picture mode in real time when the terminal processes the task, and is generally displayed in a rectangular bar shape.
For example, referring to fig. 1e, when the playing time of the interactive video a reaches the interactive time point, scenario selection controls such as "scenario 1", "scenario 2", "scenario 3", etc. are displayed below the video playing page, and a time progress bar is displayed above the controls. If the user does not select any scenario, after the progress bar is finished, the terminal selects a scenario video corresponding to a default scenario selection control to play, for example, a video C corresponding to a default "scenario 3" is used as a second video to be switched to play. The plot can be continued conveniently, and the continuity of video playing is improved.
103. And resetting the video decoder according to the decoding parameters of the second video.
The decoding parameters of the video may include relevant video parameters required for the video decoder to decode the video, such as a video encoding format required by the video, a width of the video, and high-level information of the video.
Wherein the resetting of the video decoder may include a restart and a setting of the video decoder; for example, the step "resetting the video decoder according to the decoding parameters of the second video" may include:
restarting the video decoder and releasing the decoder parameters of the video decoder;
and setting decoder parameters of the video decoder according to the decoding parameters of the second video.
For example, the video decoder may be restarted, the parameter values of the decoder parameters of the video decoder cleared, and then the cleared decoder parameters are set according to the decoding parameters of the second video.
In an embodiment, in the case of implementing decoding by using a video data queue, before adding video compression coded data of the second video to the video data queue, video parameter data containing decoding parameters of the second video may be inserted into the video data queue, and then, after adding the video compression coded data of the second video to the queue; so that when the decoder reads the parameter data, the decoder can be reset based on the parameters conveyed by the data.
Specifically, after determining that the second video needing to be switched to be played, the method in the embodiment of the present invention may further include:
adding video parameter data to a video data queue, the video parameter data comprising decoding parameters of a second video;
adding video compression coding data of a second video to a video data queue;
at this time, the step of "resetting the video decoder according to the decoding parameters of the second video" may include: resetting the video decoder based on video parameter data in the video data queue. In particular, in one embodiment, when the video decoder reads video parameter data from the video data queue, the video decoder is reset according to the decoding parameters in the video parameter data.
For example, after determining the second video to be switched to play, the terminal may insert video parameter data into the video data queue, and then insert video compression coding data of the second video into the video data queue. The video decoder of the terminal reads the video compression coded data from the video data queue continuously for decoding, when the video decoder of the terminal reads the inserted video parameter data from the video queue, the decoder can be reset according to the video parameter data, and then the video compression coded data of the second video is read by the reset video decoder for decoding, so that the second video is played.
In this embodiment of the present invention, the video compression encoded data of the second video may be obtained by a terminal performing decapsulation processing, for example, the step "adding video parameter data to a video data queue" may include:
decapsulating the video data of the second video to obtain video compression coded data of the second video;
when the video compression coded data is the first video compression coded data of the second video, the video parameter data is added to the video data queue.
In one embodiment, to improve the efficiency of the decapsulation process, different decapsulators may be used for different videos. For example, a first video may be processed using a decapsulator corresponding to the first video, and a second video may be processed using a decapsulator corresponding to the second video. Specifically, the step of decapsulating the video data of the second video to obtain the video compression encoded data of the second video may include:
opening a decapsulator corresponding to the second video according to the address of the second video;
and decapsulating the video data of the second video through a decapsulator to obtain video compression coded data of the second video.
For example, referring to fig. 1d, when the user selects "scenario 2", the terminal determines that the video to be switched and played is the scenario video B corresponding to the scenario 2", then, the terminal may set the address of the scenario video B to the player, at this time, the player may start the decapsulator corresponding to the scenario video B, decapsulate the video encapsulated data of the video B by the decapsulator, when the first video compression encoded data of the video B is obtained, may insert a video parameter data (including a decoding parameter of the video B) into the video data queue, and then add the video compression encoded data of the video B into the video data queue. And when the decoder reads the video parameter data from the video data queue, resetting the decoder according to the video decoding parameters of the video parameter data.
In order to improve the efficiency and effect of video playing switching, in an embodiment, the video parameter data and the video compression coding data of the second video have a certain correlation at the adding position in the video data queue. For example, video compression encoded data of the second video may be added at a later position in the video data queue than the video parameter data.
Specifically, the step "adding video compression encoding data of the second video to the video data queue" may include:
acquiring a target position of video parameter data in a video data queue;
determining the initial adding position of the video compression coding data of the second video in the video data queue according to the target position;
and adding the video compression coding data of the second video into the video data queue according to the initial adding position.
In practical applications, the position in the data queue may be represented by a buffer unit identifier in the queue, for example, a user buffer unit number may be used to represent the position of a certain data.
For example, a certain buffer unit after the buffer unit of the video parameter data in the queue is determined as the initial adding buffer unit of the video compression coded data of the second video, for example, a buffer unit next to the buffer unit of the video parameter data is determined as the initial adding position of the video compression coded data of the second video.
In determining the start adding position, the terminal may successively add the video compression encoded data of the decapsulated second video to the queue with the start adding position as the start position.
104. And decoding the video compression coded data of the second video based on the set video decoder to obtain the decoded video data of the second video.
For example, in an embodiment, the video compression coded data of the second video may be read from the video data queue by a set video decoder and decoded to obtain decoded video data of the second video.
For example, referring to fig. 1d, when the user selects "scenario 2", the terminal determines that the video to be switched and played is scenario video B corresponding to scenario 2", then, the terminal may perform decapsulation processing on the video encapsulated data of video B through a decapsulator of video B, and when first video compression coded data of video B is obtained, may insert a video parameter data (including a decoding parameter of video B) into the video data queue, and then add the video compression coded data of video B into the video data queue. And when the decoder reads the video parameter data from the video data queue, resetting the decoder according to the video decoding parameters of the video parameter data, and reading the compressed and encoded data of the video B from the video data queue for decoding through the reset video decoder.
105. And playing the decoded video data of the second video.
In an embodiment, in order to improve the synchronization of audio and video playing, audio and video synchronization may be performed on the decoded video data and the decoded audio data of the second video, and the decoded video data and the decoded audio data of the synchronized second video are played. For example, the synchronized video data is transmitted to a video driver such as a video card for playing, and the synchronized audio data is transmitted to an audio driver such as a sound card for playing. The same is true for the playback of the first video.
The decoded audio data of the second video may be obtained by the terminal through a process of decapsulating the video data of the second video.
For example, referring to fig. 1d, when the user selects "scenario 2", the terminal determines that the video to be switched and played is the scenario video B corresponding to the scenario 2", then, the terminal may set the address of the scenario video B to the player, at this time, the player may start the decapsulator corresponding to the scenario video B, decapsulate the video encapsulated data of the video B by the decapsulator, when the first video compression encoded data of the video B is obtained, may insert a video parameter data (including a decoding parameter of the video B) into the video data queue, and then add the video compression encoded data of the video B into the video data queue. When the decoder reads the video parameter data from the video data queue, resetting the decoder according to the video decoding parameters of the video parameter data; the video decoder reads the video compression coding data of the video from the queue for decoding, then the terminal can carry out audio and video synchronization on the decoded video data and play the synchronized video data, for example, the video data is played through the video driving device, and the like, so that the plot video B is switched to be played.
As can be seen from the above, in the embodiment of the present invention, the video decoder decodes the video compression coded data of the first video to obtain the decoded video data of the first video, and plays the decoded video data of the first video; when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played; resetting the video decoder according to the decoding parameters of the second video; decoding the video compression coded data of the second video based on the set video decoder to obtain decoded video data of the second video; and playing the decoded video data of the second video. Because the scheme can adopt one video decoder to decode different videos, the video playing switching is realized, and a new video decoder does not need to be loaded or started to play for decoding when other videos are switched to play, so that compared with the existing playing scheme (for example, after a user selects to switch the played videos, another player needs to be started to play the next scenario in series after one video is played, the user can obviously feel the switching action between the videos, the user experience is obviously reduced), the phenomena of pause and the like of video playing switching can be avoided, the fluency of video playing switching is improved, and resources can be saved at the same time.
The method described in the above examples is further illustrated in detail below by way of example.
In this embodiment, the video playback apparatus will be specifically integrated in a terminal as an example.
As shown in fig. 2a, a video playing method specifically includes the following steps:
201. and the terminal carries out decapsulation processing on the video data of the first video to obtain video compression coding data of the first video.
For example, taking the first video as video a and the second video as video B as an example, referring to fig. 2B, a video playing and decoding diagram is provided.
A decapsulator: also called demultiplexing, which is to separate the input data in the encapsulated format into compressed encoded audio stream data and compressed encoded video data (called packet) and separate these elementary streams, such as video, audio, and subtitles.
A decoder: the system comprises an audio decoder and a video decoder, namely, the video/audio compression coding data is decoded into uncompressed video/audio original data. Compression coding standards for audio include AAC, MP3, and the like. Decoding is one of the most important and complex links in the overall system. By decoding, the compression-encoded video data is output as uncompressed color data, such as YUV, RGB, and the like; the compression-encoded audio data is output as uncompressed audio sample data, such as PCM data.
A package queue: including an audio package queue and a video package queue. The queue exists to buffer a certain data packet and reduce the mutual waiting between the decapsulator and the decode.
Audio and video synchronization: namely, according to the parameter information obtained in the processing process of the decapsulation module, the decoded audio and video data are synchronized, so that the user can send the audio and video data to the video card and the sound card of the system for playing (Render).
For example, referring to fig. 2b and fig. 2c, in the interactive video start-up phase, after the terminal may set the media resource of the video a to the player and tell that the player is in the interactive video mode, the player starts a new decapsulator (video a decapsulator) for the video a to decapsulate the media data of the video a.
202. The terminal adds video compression coding data of the first video to a video data queue.
For example, referring to fig. 2b and 2c, the terminal sends the video Package after video a is decapsulated to a video Package queue (i.e., video data queue).
203. And the terminal reads the video compression coding data of the first video from the video data queue through the video decoder and decodes the video compression coding data to obtain the decoded video data of the first video.
For example, referring to fig. 2b and fig. 2c, the video decoder in the terminal may read the packet of the video a from the video packet queue, and decode the packet to obtain the decoded video data of the video a.
204. And the terminal plays the decoded video data of the first video.
In an embodiment, audio and video synchronization may be performed on the decoded video data of the first video, and then the decoded video data is played.
For example, referring to fig. 2b and 2c, the video decoder sends the decoded video data to the audio and video synchronization module. And after the audio and video synchronization module performs audio and video synchronization, the synchronized video data is sent to a video driver/device for playing and displaying.
205. And when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played.
For example, a plot interactive point, which is a selection point of a user, is set about 10 seconds before the video a is played, and at this time, the playing is automatically paused, so that the user can select the plot interactive point. The user can select the plot video needing to be switched to be played, or the terminal automatically selects the plot video needing to be switched to be played according to a certain rule, and the like.
206. And the terminal carries out decapsulation processing on the video data of the second video to obtain video compression coding data of the second video.
For example, referring to fig. 2B and 2c, after the user selects video B (or the countdown time expires), the address of video B may be set to the player, and the player starts to start the decapsulator corresponding to video B immediately at this time. And decapsulating the media data of the video B through a decapsulator of the video B to obtain a video compression coding data Package of the video B.
207. And the terminal adds video parameter data to the video data queue, wherein the video parameter data contains the decoding parameters of the second video.
For example, before sending the video Package after decapsulating the video B to the video Package queue, the terminal inserts a self-generated parameter Package P, where P includes related video parameters of the video B, such as a video encoding format required by a video decoder, a video width, and high-level information of the video.
For another example, referring to fig. 2c, before sending the video packet after decapsulating the video B to the video packet queue, if it is determined that the packet of the current video B is the first packet, the terminal inserts a parameter tag data packet P into the video packet queue before the packet, where the parameter tag packet P includes the relevant video decoding parameter of the video B.
208. And the terminal adds the video compression coding data of the second video to the video data queue.
For example, after setting the parameter Package P, the terminal sends the video Package with the video B unpacked to the video Package queue
209. And the terminal reads the data from the video data queue through the video decoder for decoding, and resets the video decoder according to the decoding parameters in the video parameter data when the video decoder reads the video parameter data.
For example, referring to fig. 2c, after the video decoder reads the Package P, the decoder is restarted with the decoding parameters carried in the Package P. I.e. the decoder at this point can be used to decode video B. Therefore, the phenomena of screen splash, blockage and the like in video switching are avoided.
210. And the terminal reads the video compression coded data of the second video from the video data queue through the set video decoder for decoding.
For example, referring to fig. 2c, the video decoder reads a Package of video B from the video Package queue and decodes it.
211. And the terminal plays the decoded video compressed coding data of the second video.
For example, referring to fig. 2c, the video decoder sends the decoded video data to the audio/video synchronization module; and the audio and video synchronization module performs audio and video synchronization processing on the decoded video data of the video B and then sends the video data to the video driver/equipment for playing.
In practical applications, if the playing information of the second video satisfies the video playing switching condition, the steps 205-211 may also be executed to implement video playing switching.
The video playing method provided by the embodiment of the invention can be applied to various scenes needing to switch and play videos, such as interactive video scenes.
The video playing scheme provided by the embodiment of the invention can adopt one video decoder to decode different videos, thereby realizing the switching of video playing without loading or starting to play a new video decoder for decoding when other videos are played in a switching way, thus avoiding the phenomena of pause and the like of video playing switching, improving the fluency of video playing switching, and simultaneously saving resources.
In addition, the video playing scheme provided by the embodiment of the invention can realize video playing switching on equipment with low processing capacity, and greatly improves the practicability of video playing switching. For example, the scheme provided by the embodiment of the invention can realize seamless plot switching on equipment with low processing capacity or no support for multiple instances, such as a television, and greatly improve the watching experience of users.
In order to better implement the above method, correspondingly, the embodiment of the present invention further provides a video playing apparatus, wherein the video playing apparatus may be integrated in a computer device, such as a terminal.
For example, as shown in fig. 3a, the image processing apparatus may include a first playback unit 301, a determination unit 302, a setting unit 303, a decoding unit 304, and a second playback unit 305 as follows:
a first playing unit 301, configured to decode video compression coded data of a first video through a video decoder, and play decoded video data of the first video;
a determining unit 302, configured to determine, when the playing information of the first video meets a video playing switching condition, a second video that needs to be switched to be played;
a setting unit 303, configured to reset the video decoder according to the decoding parameters of the second video;
a decoding unit 304, configured to decode, based on a set video decoder, video compression coded data of the second video to obtain decoded video data of the second video;
a second playing unit 305, configured to play the decoded video data of the second video.
In an embodiment, referring to fig. 3b, the first playing unit 301 may include:
a first decapsulation subunit 3011, configured to decapsulate video data of a first video to obtain video compression encoded data of the first video;
a decoding subunit 3012, configured to read, by the video decoder, video compression encoded data of a first video from a video data queue for decoding, to obtain decoded video data of the first video;
a playing sub-unit 3013, configured to play the decoded video data of the first video.
In an embodiment, referring to fig. 3c, the video playing apparatus according to an embodiment of the present invention may further include:
a first adding unit 306, configured to add video parameter data to the video data queue, where the video parameter data includes a decoding parameter of a second video;
a second adding unit 307 for adding the video compression coded data of the second video to the video data queue;
the setting unit 303 is configured to reset the video decoder based on the video parameter data in the video data queue.
In an embodiment, the setting unit 303 is configured to, when the video decoder reads video parameter data from the video data queue, reset the video decoder according to a decoding parameter in the video parameter data;
the decoding unit 304 is configured to read the video compression encoding data of the second video from the video data queue through a set video decoder and decode the video compression encoding data.
In an embodiment, the second adding unit 307 may be configured to: acquiring a target position of video parameter data in the video data queue; determining the initial adding position of the video compression coding data of the second video in the video data queue according to the target position; and adding the video compression coding data of the second video into the video data queue according to the starting adding position.
In an embodiment, referring to fig. 3d, the first adding unit 306 may include:
a second decapsulating subunit 3061, configured to decapsulate the video data of the second video to obtain video compression encoded data of the second video;
an adding subunit 3062, configured to add video parameter data to the video data queue when the video compression coded data is the first video compression coded data of the second video.
In an embodiment, the second decapsulating subunit 3061 is specifically configured to: opening a decapsulator corresponding to the second video according to the address of the second video; and decapsulating the video data of the second video through the decapsulator to obtain video compression coding data of the second video.
In an embodiment, referring to fig. 3e, the determining unit 302 may include:
a display subunit 3021, configured to display a video selection control on a video playing page when the playing information of the first video meets a video playing switching condition;
the determining subunit 3022 is configured to, when a selection operation of the user on the video selection control is detected, determine a video corresponding to the video selection control selected by the user as a second video that needs to be switched to be played.
In an embodiment, the determining subunit 3022 is further configured to, when a selection operation of the user on the video selection control is not detected within a preset time period, select a video corresponding to the default video selection control as the second video that needs to be switched to be played.
In an embodiment, the determining unit 302 is configured to: acquiring the current playing time of a first video in real time; and when the current playing time reaches the preset time, determining that a video playing switching condition is met, and determining a second video needing to be switched to be played.
In an embodiment, the setting unit 303 is configured to restart the video decoder and release decoder parameters of the video decoder; setting decoder parameters of the video decoder according to decoding parameters of a second video.
In specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily, and implemented as the same or several entities, and specific implementations of the above units may refer to the foregoing method embodiment, which is not described herein again.
As can be seen from the above, in the video playing apparatus of this embodiment, the first playing unit 301 decodes the video compression coded data of the first video through the video decoder, and plays the decoded video data of the first video; then, when the playing information of the first video meets the video playing switching condition, the determining unit 302 determines a second video needing to be switched to be played; resetting, by the setting unit 303, the video decoder according to the decoding parameters of the second video; decoding, by the decoding unit 304, the video compression coded data of the second video based on the set video decoder to obtain decoded video data of the second video; the decoded video data of the second video is played by the second playing unit 305. Because the scheme can adopt one video decoder to decode different videos, the switching of video playing is realized, and a new video decoder is not required to be loaded or started to play for decoding when other videos are played in a switching manner, so that the phenomena of blocking and the like of video playing switching can be avoided, the fluency of video playing switching is improved, and resources can be saved at the same time.
In addition, an embodiment of the present invention further provides a computer device, as shown in fig. 4, which shows a schematic structural diagram of the computer device according to the embodiment of the present invention, specifically:
the computer 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 computer device configuration illustrated in FIG. 4 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer 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 monitoring the computer device as a whole. 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 computer 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 computer 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 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via 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 computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer 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 computer 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 programs stored in the memory 402, thereby implementing various functions as follows:
decoding video compression coded data of a first video through a video decoder, and playing decoded video data of the first video; when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played; resetting the video decoder according to the decoding parameters of the second video; decoding the video compression coded data of the second video based on a set video decoder to obtain decoded video data of the second video; and playing the decoded video data of the second video.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, the computer device of this embodiment may decode, by using a video decoder, video compression coded data of a first video, and play decoded video data of the first video; when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played; resetting the video decoder according to the decoding parameters of the second video; decoding the video compression coded data of the second video based on a set video decoder to obtain decoded video data of the second video; and playing the decoded video data of the second video. Because this scheme can adopt a video decoder to decode the operation to different videos to realize the video broadcast and switch, need not to load or play new video decoder and decode when switching broadcast other videos, consequently, can avoid appearing the phenomenon such as the card pause that the video broadcast switched, promoted the smoothness nature that the video broadcast switched and can also save the resource simultaneously.
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 present invention further provides a storage medium, which stores a plurality of instructions capable of being loaded by a processor to perform the steps of any of the video playing methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
decoding video compression coded data of a first video through a video decoder, and playing decoded video data of the first video; when the playing information of the first video meets the video playing switching condition, determining a second video needing to be switched to be played; resetting the video decoder according to the decoding parameters of the second video; decoding the video compression coded data of the second video based on the set video decoder to obtain decoded video data of the second video; and playing the decoded video data of the second video.
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 playing method provided in the embodiments of the present invention, beneficial effects that can be achieved by any video playing method provided in the embodiments of the present invention can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The video playing method, apparatus, computer device and storage medium provided in the embodiments of the present invention are described in detail above, and specific embodiments are applied in this document to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea 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 (12)

1. A video playback method, comprising:
decoding video compression coded data of a first video through a video decoder to obtain decoded video data of the first video, and playing the decoded video data of the first video, wherein the first video is an interactive video;
when the playing information of the first video meets a video playing switching condition, determining a second video needing to be switched to be played, wherein the second video is a plot video of the first video;
adding video parameter data to a video data queue, the video parameter data comprising decoding parameters of a second video;
acquiring a target position of video parameter data in the video data queue;
determining the initial adding position of the video compression coding data of the second video in the video data queue according to the target position;
adding video compression coding data of the second video to the video data queue according to the starting adding position;
resetting the video decoder based on video parameter data in the video data queue;
decoding the video compression coded data of the second video read from the video data queue based on a set video decoder to obtain decoded video data of the second video;
and playing the decoded video data of the second video.
2. The video playing method of claim 1, wherein decoding the video compression coded data of the first video by a video decoder to obtain decoded video data of the first video, and playing the decoded video data of the first video comprises:
decapsulating video data of a first video to obtain video compression coded data of the first video;
reading video compression coding data of a first video from a video data queue through the video decoder for decoding to obtain decoded video data of the first video;
and playing the decoded video data of the first video.
3. The video playback method of claim 2, wherein resetting the video decoder based on the video parameter data in the video data queue comprises: and when the video decoder reads the video parameter data from the video data queue, resetting the video decoder according to the decoding parameters in the video parameter data.
4. The video playback method of claim 1, wherein adding video parameter data to the video data queue comprises:
decapsulating the video data of the second video to obtain video compression coded data of the second video;
and when the video compression coded data is the first video compression coded data of the second video, adding video parameter data into the video data queue.
5. The video playing method of claim 4, wherein the decapsulating the video data of the second video to obtain the video compression coded data of the second video comprises:
opening a decapsulator corresponding to the second video according to the address of the second video;
and decapsulating the video data of the second video through the decapsulator to obtain video compression coding data of the second video.
6. The video playing method of claim 1, wherein when the playing information of the first video satisfies a video playing switching condition, determining that a second video to be played needs to be switched comprises:
when the playing information of the first video meets the video playing switching condition, displaying a video selection control on a video playing page;
when the selection operation of the user for the video selection control is detected, determining the video corresponding to the video selection control selected by the user as a second video needing to be switched to be played.
7. The video playing method according to claim 6, wherein when the playing information of the first video satisfies a video playing switching condition, determining that a second video to be played needs to be switched, further comprising:
and when the selection operation of the user for the video selection control is not detected within the preset time, selecting the video corresponding to the default video selection control as the second video needing to be switched and played.
8. The video playing method of claim 1, wherein when the playing information of the first video satisfies a video playing switching condition, determining that a second video needing to be switched to be played comprises:
acquiring the current playing time of a first video in real time;
and when the current playing time reaches the preset time, determining that a video playing switching condition is met, and determining a second video needing to be switched to be played.
9. The video playback method of claim 1, wherein resetting the video decoder based on the video parameter data in the video data queue comprises:
restarting the video decoder and releasing decoder parameters of the video decoder;
setting decoder parameters of the video decoder according to decoding parameters of a second video.
10. A video playback apparatus, comprising:
the first playing unit is used for decoding video compression coded data of a first video through a video decoder to obtain decoded video data of the first video and playing the decoded video data of the first video, wherein the first video is an interactive video;
the determining unit is used for determining a second video needing to be switched and played when the playing information of the first video meets a video playing switching condition, wherein the second video is a plot video of the first video;
a first adding unit, configured to add video parameter data to a video data queue, where the video parameter data includes a decoding parameter of a second video;
the second adding unit is used for acquiring the target position of the video parameter data in the video data queue; determining the initial adding position of the video compression coding data of the second video in the video data queue according to the target position; adding video compression coding data of the second video to the video data queue according to the starting adding position;
a setting unit for resetting the video decoder based on the video parameter data in the video data queue;
the decoding unit is used for decoding the video compression coded data of the second video read from the video data queue based on a set video decoder to obtain decoded video data of the second video;
and the second playing unit is used for playing the decoded video data of the second video.
11. A storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of the method according to any of claims 1-9.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method according to any of claims 1-9 are implemented when the program is executed by the processor.
CN201910468193.6A 2019-05-31 2019-05-31 Video playing method and device, computer equipment and storage medium Active CN112019858B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910468193.6A CN112019858B (en) 2019-05-31 2019-05-31 Video playing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910468193.6A CN112019858B (en) 2019-05-31 2019-05-31 Video playing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112019858A CN112019858A (en) 2020-12-01
CN112019858B true CN112019858B (en) 2022-11-29

Family

ID=73500603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910468193.6A Active CN112019858B (en) 2019-05-31 2019-05-31 Video playing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112019858B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222182B (en) * 2021-12-15 2024-02-09 湖南快乐阳光互动娱乐传媒有限公司 Video playing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108260014A (en) * 2018-04-12 2018-07-06 腾讯科技(上海)有限公司 A kind of video broadcasting method and terminal and storage medium
CN109168078A (en) * 2018-09-10 2019-01-08 苏宁智能终端有限公司 A kind of video definition switching method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219579B (en) * 2014-08-20 2018-03-06 北京奇艺世纪科技有限公司 A kind of video switching method and device
CN105516791A (en) * 2014-09-29 2016-04-20 宇龙计算机通信科技(深圳)有限公司 Intelligent household streaming media seamless connection realization method and intelligent household streaming media seamless connection realization system
CN105657520A (en) * 2014-11-18 2016-06-08 乐视网信息技术(北京)股份有限公司 Video definition switching method and video player
CN106131550B (en) * 2016-07-25 2020-02-14 合一网络技术(北京)有限公司 Method and device for playing multimedia file

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108260014A (en) * 2018-04-12 2018-07-06 腾讯科技(上海)有限公司 A kind of video broadcasting method and terminal and storage medium
CN109168078A (en) * 2018-09-10 2019-01-08 苏宁智能终端有限公司 A kind of video definition switching method and device

Also Published As

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

Similar Documents

Publication Publication Date Title
CN110557670B (en) Method, device, terminal and storage medium for playing video in webpage
US10225613B2 (en) Method and apparatus for video playing processing and television
US8875204B2 (en) Information processor, information processing method and program
US10735817B2 (en) Video playback method and apparatus, and computer readable storage medium
US10271105B2 (en) Method for playing video, client, and computer storage medium
CN106534952B (en) Source switching back-film source continuous playing method and smart television
CN109803151B (en) Multimedia data stream switching method and device, storage medium and electronic device
CN111432260A (en) Method, device and equipment for synchronizing multiple paths of video pictures and storage medium
CN114071226B (en) Video preview graph generation method and device, storage medium and electronic equipment
US9055272B2 (en) Moving image reproduction apparatus, information processing apparatus, and moving image reproduction method
CN105187895A (en) Data-caching method and system for playing videos on mobile platform by means of hardware acceleration
CN114040243B (en) Live broadcasting room video playing method and device
CN204013943U (en) A kind of device that carries out video intercepting and process on OTT box
CN111510755A (en) Audio and video switching method and device, computer equipment and readable storage medium
CN106162332A (en) One is televised control method and device
CN113225585A (en) Video definition switching method and device, electronic equipment and storage medium
CN112019858B (en) Video playing method and device, computer equipment and storage medium
CN112055227B (en) Cloud game interaction method, system, device, storage medium and electronic equipment
CN110582024A (en) method and device for playing video
CN105338401A (en) Playing method and system of multimedia file
CN111954041A (en) Video loading method, computer equipment and readable storage medium
CN114827724A (en) Video playing method and related equipment
CN105430527B (en) Streaming media reminding method and terminal equipment
JP2009164969A (en) Unit, method and program for reproducing content, and recording medium recording the program
JP2006339980A (en) Image reproducer

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: 40036265

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