CN113014981A - Video playing method and device, electronic equipment and readable storage medium - Google Patents

Video playing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113014981A
CN113014981A CN201911315567.7A CN201911315567A CN113014981A CN 113014981 A CN113014981 A CN 113014981A CN 201911315567 A CN201911315567 A CN 201911315567A CN 113014981 A CN113014981 A CN 113014981A
Authority
CN
China
Prior art keywords
module
video
target
rate
audio
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.)
Pending
Application number
CN201911315567.7A
Other languages
Chinese (zh)
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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201911315567.7A priority Critical patent/CN113014981A/en
Publication of CN113014981A publication Critical patent/CN113014981A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/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/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/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/4342Demultiplexing isochronously with video sync, e.g. according to bit-parallel or bit-serial interface formats, as SDI
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Landscapes

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

Abstract

The embodiment of the application provides a video playing method, a video playing device, an electronic device and a readable storage medium, wherein the method comprises the following steps: the method comprises the steps that a demultiplexing module receives a rate switching instruction, the rate switching instruction is generated based on a rate switching instruction of a user, the rate switching instruction is used for indicating that the playing rate of a target video is switched to a target rate, and a data cleaning starting instruction and a data cleaning ending instruction are not triggered to be sent to a rear module of the demultiplexing module; and the demultiplexing module sends the current playing position of the target video and the target speed to an audio and video synchronization module and an output module in the rear module according to the speed switching instruction. The method avoids the inconsistent scenario caused by video skipping and greatly improves the user experience. Meanwhile, the processing flow is simplified, and the processing speed of the system is improved.

Description

Video playing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to smart television technologies, and in particular, to a video playing method and apparatus, an electronic device, and a readable storage medium.
Background
With the continuous development of internet technology, more and more users choose to watch videos through terminal devices connected to a network. The terminal devices can include mobile phones, computers and smart televisions. When watching a video, some users may choose to play at double speed, that is, the video is played at a speed faster than the normal playing speed, for practical purposes. At present, a Streaming media network transmission protocol (HTTP Live Streaming, HLS for short) based on HTTP is generally adopted for network video, and in the HLS protocol, a video is divided into a plurality of ts segments, and the duration of each ts segment is several seconds. When the intelligent television plays the video, the video player in the intelligent television plays the video after downloading, demultiplexing, decoding and other processing based on the HLS protocol.
In the prior art, if a user selects to switch the playing speed of a video played by the smart television, for example, selects to play at a double speed, the video player first skips to a ts segment head closest to a current playing position, and then starts from the ts segment head to play the video at the switched speed.
However, the method in the prior art causes the video scenario to be discontinuous when the playing speed is switched, and the watching experience of the user is affected.
Disclosure of Invention
The embodiment of the application provides a video playing method and device, an electronic device and a readable storage medium, which are used for solving the problem that watching experience of a user is influenced because video scenarios are not consistent when playing speed is switched in the prior art.
In a first aspect, an embodiment of the present application provides a video playing method, including:
the method comprises the steps that a demultiplexing module receives a rate switching instruction, the rate switching instruction is generated based on a rate switching instruction of a user, the rate switching instruction is used for indicating that the playing rate of a target video is switched to a target rate, and a data cleaning starting instruction and a data cleaning ending instruction are not triggered to be sent to a rear module of the demultiplexing module;
the demultiplexing module sends the current playing position and the target speed of the target video to an audio and video synchronization module and an output module in the rear module according to the speed switching instruction, audio and video synchronization is carried out according to the current playing position and the target speed through the audio and video synchronization module, and the target video is played according to the current playing position and the target speed through the output module;
the rear module comprises a video decoding module, an audio and video synchronization module and an output module.
As an optional implementation manner, the demultiplexing module does not send a data cleaning start instruction and a data cleaning end instruction to the back module according to the rate switching instruction, and further includes, before sending the current playing position of the target video and the target rate to the audio and video synchronization module and the output module in the back module:
and the demultiplexing module acquires the target rate according to the rate switching instruction and the rate configuration information.
As an optional implementation manner, the rate switching instruction includes the target rate.
As an optional implementation manner, the sending, by the demultiplexing module, the current playing position of the target video and the target rate to the audio/video synchronization module and the output module in the back module includes:
and the demultiplexing module sends a segmentation event to the audio and video synchronization module and the output module, wherein the segmentation event comprises the current playing position of the target video and the target speed.
As an optional implementation manner, the performing, by the audio/video synchronization module, audio/video synchronization according to the current playing position and the target rate includes:
determining display time according to the current playing position, the target speed and system time corresponding to the current playing position through the audio and video synchronization module;
and synchronizing the target video according to the difference value between the display time and the current system time through the audio and video synchronization module.
As an optional implementation manner, the determining, by the audio/video synchronization module, the display time according to the current playing position, the target rate, and the system time corresponding to the current playing position includes:
determining the running time according to the current playing position and the target speed through the audio and video synchronization module;
and taking the sum of the running time and the system time corresponding to the current playing position as the display time through the audio and video synchronization module.
As an alternative implementation, the rate switch instruction is an HLS-based instruction.
In a second aspect, an embodiment of the present application provides a video playing apparatus, including:
the receiving module is used for receiving a rate switching instruction, the rate switching instruction is generated based on a rate switching instruction of a user, the rate switching instruction is used for instructing to switch the playing rate of a target video to a target rate, and triggering to not send a data cleaning starting instruction and a data cleaning ending instruction to a rear module of the demultiplexing module;
the processing module is used for sending the current playing position and the target speed of the target video to an audio and video synchronization module and an output module in the rear module according to the speed switching instruction, carrying out audio and video synchronization according to the current playing position and the target speed through the audio and video synchronization module, and playing the target video according to the current playing position and the target speed through the output module;
the rear module comprises a video decoding module, an audio and video synchronization module and an output module.
As an optional implementation manner, the method further includes:
and the acquisition module is used for acquiring the target rate according to the rate switching instruction and the rate configuration information.
As an optional implementation manner, the rate switching instruction includes the target rate.
As an optional implementation manner, the processing module is specifically configured to:
and sending a segmentation event to the audio and video synchronization module and the output module, wherein the segmentation event comprises the current playing position of the target video and the target speed.
As an optional implementation manner, the processing module is specifically configured to:
determining display time according to the current playing position, the target speed and system time corresponding to the current playing position through the audio and video synchronization module;
and synchronizing the target video according to the difference value between the display time and the current system time through the audio and video synchronization module.
As an optional implementation manner, the processing module is specifically configured to:
determining the running time according to the current playing position and the target speed through the audio and video synchronization module;
and taking the sum of the running time and the system time corresponding to the current playing position as the display time through the audio and video synchronization module.
As an alternative implementation, the rate switch instruction is an HLS-based instruction.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory for storing program instructions;
a processor for calling and executing the program instructions in the memory to perform the method steps of the first aspect.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a computer program is stored, where the computer program is used to execute the method in the first aspect.
According to the video playing method, the video playing device, the electronic device and the readable storage medium, the rate switching instruction different from the existing seek instruction is generated based on the rate switching instruction of the user, the rate switching instruction can trigger not to execute the data cleaning process, after the demultiplexing module of the network player receives the rate switching instruction, the current playing position and the target rate of the target video are directly sent to the rear module, and the rear module processes according to the current playing position and the target rate, so that the network player can directly play from the current playing position according to the target rate, the plot inconsistency caused by video skipping is avoided, and the user experience is greatly improved. Meanwhile, processing procedures such as data cleaning, demultiplexing, decoding and the like are omitted, the processing flow is simplified, and the processing speed of the system is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic block diagram of a video player;
fig. 2 is a schematic flow chart of a playing rate switching process performed by a network player in the prior art;
fig. 3 is an exemplary system architecture diagram of a video playing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a video playing method according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating interaction between modules of a network player performing play rate switching processing according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a video playing method according to an embodiment of the present application;
fig. 7 is a block diagram of a video playing apparatus according to an embodiment of the present disclosure;
fig. 8 is a block diagram of a video playback device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device 900 according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
When the intelligent television plays the video, the video player in the intelligent television plays the video after downloading, demultiplexing, decoding and other processing based on the HLS protocol. Fig. 1 is a schematic diagram of a module structure of a video player, and as shown in fig. 1, the video player may include a network protocol parsing and downloading module, a demultiplexing module, an audio decoding module, a video decoding module, an audio and video synchronization module, an audio output module, and a video output module. After the network protocol analysis and download module downloads the network video, the video is cached in a download data cache queue, the demultiplexing module reads the video from the cache queue and performs demultiplexing processing on the video and the audio respectively, the processed audio data is cached in the demultiplexed audio data cache queue, and the processed video data is cached in the demultiplexed video data cache queue. The audio decoding module decodes audio data in the audio data cache queue after demultiplexing, the video decoding module decodes video data in the video data cache queue after demultiplexing, and the decoded audio and video are synchronized by the audio and video synchronization module and then are output by the audio output module and the video output module respectively.
Fig. 2 is a schematic flow chart of a playing rate switching process performed by a network player in the prior art. In the network video playing process, after a user sends an instruction for switching the playing rate by pressing a specific key in a remote controller and the like, a processor of the intelligent television sends a seek instruction to a multiplexing module in a video player of the intelligent television according to the instruction of the user. The seek command is used to instruct the video player to play the video at the new speed from the current playing position. As shown in fig. 2, after receiving the seek instruction, the demultiplexing module first performs a data Flushing (FLUSH) process. The method specifically comprises the following steps:
(1) the demultiplexing module sends a data cleaning starting instruction (FLUSH _ START EVENT) to the downstream audio decoding module, the downstream video decoding module, the downstream audio and video synchronization module, the downstream audio output module and the downstream video output module in sequence, after receiving FLUSH _ START EVENT, the downstream modules respectively empty respective internal data, and the video player is changed from a PLAYING state to a PAUSED state.
(2) After each downstream module finishes emptying the internal data, the demultiplexing module sends a data cleaning end instruction (FLUSH _ STOP EVENT) to each downstream module in sequence, and after each downstream module receives the FLUSH _ STOP EVENT, the downstream modules STOP emptying the internal data respectively. The FLUSH flow ends.
After the FLUSH flow is finished, the demultiplexing module searches the ts segment header nearest to the current PLAYING position according to the current PLAYING position required by the seek instruction, and then the demultiplexing module sequentially sends segmentation events (SEGMENT EVENT) to each downstream module to inform the ts segment header and the new PLAYING speed, so that the video player is changed from the pause state to the play state. And processing by each downstream module according to the ts segment header and the new playing speed, so that the video player plays the video at the new playing speed.
In the above processing process in the prior art, the demultiplexing module instructs each downstream module to process according to the ts segment header closest to the current playing position, and for the user, the video jumps to the position that has been played before and then plays according to the new speed, so the method in the prior art causes the video scenario to be discontinuous when the playing speed is switched, and the viewing experience of the user is affected. In addition, since the demultiplexing module needs to instruct each downstream module to process according to the ts segment header closest to the current playing position, and the data stored in the buffer of each downstream module is data related to the current playing position, and after jumping to another position, the data all become invalid data, the demultiplexing module needs to firstly FLUSH the data stored in each downstream module through a data Flushing (FLUSH) flow before SEGMENT EVENT, and thus, the processing flow is also complicated.
Based on the above problems, an embodiment of the present application provides a video playing method, where a rate switching instruction different from an existing seek instruction is generated based on a rate switching instruction of a user, and the rate switching instruction may trigger not to execute a data cleaning process, after a demultiplexing module of a network player receives the rate switching instruction, a current playing position and a target rate of a target video are directly sent to a back module, and the back module processes according to the current playing position and the target rate, so that the network player can directly play from the current playing position according to the target rate, thereby avoiding a scenario discontinuity caused by video skipping, greatly improving user experience, and simultaneously simplifying a processing flow and improving a processing speed of a system.
Fig. 3 is an exemplary system architecture diagram of a video playing method according to an embodiment of the present application, and as shown in fig. 3, the embodiment of the present application may be applied to a scenario in which a network video is watched by using a smart television, which relates to a smart television and a server. Specifically, a user selects a certain network video through an interface of the smart television, and the smart television downloads the network video from the server and starts to play the network video according to the selection of the user. During the playing process of the network video, if a user wants to switch the speed of the video, for example, wants to play at 2 times speed, the user can press a specific key (for example, a fast forward key) on the remote controller to send an instruction to switch the playing speed to the smart television. And responding to the instruction of the user by the processor of the intelligent television, and playing the network video at the switched speed from the current playing position by using the method of the embodiment of the application. And displaying the prompt message of 'having switched to 2 times speed playing'.
Fig. 4 is a schematic flowchart of a video playing method provided in an embodiment of the present application, where an execution main body of the method may be, for example, an intelligent television, and specifically, may be a demultiplexing module in a video player of the intelligent television. As shown in fig. 4, the method includes:
s401, the demultiplexing module receives a rate switching instruction, the rate switching instruction is generated based on a rate switching instruction of a user, the rate switching instruction is used for instructing to switch the playing rate of the target video to the target rate, and triggering not to send a data cleaning starting instruction and a data cleaning ending instruction to a rear module of the demultiplexing module.
Optionally, referring to fig. 1, the subsequent module of the demultiplexing module may include a video decoding module, an audio and video synchronization module, an audio output module, and a video output module. In the embodiment of the present application, the audio output module and the video output module are collectively referred to as an output module.
It should be noted that the following module described in the embodiments of the present application has the same meaning as the downstream module described above.
Optionally, the target video refers to a video currently being played by the smart television. The target rate is the playing rate after switching indicated by the rate switching instruction. The target rate may be greater than the currently playing rate or may be less than the currently playing rate, which is not specifically limited in this embodiment of the present application.
Optionally, after the user sends an instruction to switch the play rate through the remote controller, the processor of the smart television, after recognizing the instruction, sends a rate switching instruction to the demultiplexing module of the video player in response to the instruction. The rate switching instruction is an instruction different from the existing seek instruction, the demultiplexing module may directly determine, according to the instruction name of the rate switching instruction, that the playing rate of the target video needs to be switched to the target rate, and directly determine not to send the data cleansing start instruction (FLUSH _ START EVENT) and the data cleansing end instruction (FLUSH _ STOP EVENT) to the following module of the demultiplexing module. The rate switch instruction may be an HLS-based instruction that conforms to the HLS protocol, and each of the modules in the processor and the video player constructs or parses the instruction based on the HLS protocol.
S402, the demultiplexing module sends the current playing position and the target speed of the target video to an audio and video synchronization module and an output module in the latter module according to the speed switching instruction, audio and video synchronization is carried out through the audio and video synchronization module according to the current playing position and the target speed, and the target video is played through the output module according to the current playing position and the target speed.
After receiving the speed switching instruction, the demultiplexing module directly sends the current playing position and the target speed to the audio and video synchronization module and the output module according to the instruction. It should be understood that sending the current playing position and the target speed to the output module refers to sending the current playing position and the target speed to both the audio output module and the video output module. Correspondingly, the output module plays the target video according to the current playing position and the target speed, which means that the audio output module plays the audio data of the target video and the video output module outputs the video data of the target.
As described above, in the prior art, switching the playing rate by using the seek instruction requires that the video first jump to the ts segment header closest to the current playing position, and the data in the subsequent module is based on the current playing position, so that after the jump, the data in the subsequent module becomes invalid data, and therefore, the data cached in the subsequent module needs to be flushed by using the data flushing flow in fig. 2. In the embodiment of the present application, the rate switching is instructed by a new rate switching instruction, and since all the data cached in the subsequent module are based on the current playing position, the data cleaning process may not be executed by being triggered by the new rate switching instruction, and the subsequent module may directly perform processing according to the current playing position and the target rate sent by the demultiplexing module, so that the video player may start to follow the new target rate from the current playing position. The above process not only avoids the scenario discontinuity caused by video skipping, but also saves the data cleaning flow, and meanwhile, because data cleaning is not carried out, the processes of demultiplexing, decoding and the like do not need to be carried out again.
It should be noted that, in this embodiment, the demultiplexing module may only send the current playing position and the target rate to the audio and video synchronization module and the output module, and does not need to send the current playing position and the target rate to the audio decoding module and the video decoding module, and the audio decoding module and the video decoding module still read and decode data from the demultiplexed data buffer queue according to the processing procedure before receiving the rate switching instruction, so as to further reduce the processing complexity.
Fig. 5 is a schematic view of interaction between modules of a network player performing play rate switching processing according to an embodiment of the present application, and as shown in fig. 5, after receiving a rate switching instruction, a demultiplexing module directly sends a current play position and a target rate to an audio and video synchronization module, an audio output module, and a video output module without executing a data cleaning process.
In this embodiment, a rate switching instruction different from an existing seek instruction is generated based on a rate switching instruction of a user, the rate switching instruction may trigger not to execute a data cleaning process, after receiving the rate switching instruction, a demultiplexing module of the network player directly sends a current playing position and a target rate of a target video to a rear module, and the rear module processes according to the current playing position and the target rate, so that the network player can directly play from the current playing position according to the target rate, which not only avoids plot discontinuity caused by video skip, but also greatly improves user experience. Meanwhile, processing procedures such as data cleaning, demultiplexing, decoding and the like are omitted, the processing flow is simplified, and the processing speed of the system is improved.
As an alternative implementation, the demultiplexing module may first obtain the target rate before sending the target rate to the subsequent module.
In a first optional manner, the demultiplexing module may obtain the target rate according to the rate switching instruction and the rate configuration information.
Optionally, the rate configuration information may be configured by the user in advance on a configuration page of the smart television. For example, the user may pre-configure the rate of the double-speed playing to be 2 times speed. And when the demultiplexing module receives the speed switching instruction, reading the 2 times speed and taking the speed as the target speed.
In a second alternative, the target rate may be carried in the rate switching command.
Optionally, after recognizing the indication of switching the play rate by the user, the processor may read the rate configuration information from the configuration information of the smart television, take the rate configuration information as the target rate, and carry the target rate in the rate switching instruction. And after receiving the speed switching instruction, the demultiplexing module analyzes the instruction to obtain the target speed.
As an optional implementation manner, when the demultiplexing module in the step S402 sends the current playing position and the target rate to the audio/video synchronization module and the output module, the current playing position and the target rate may be sent by carrying the two pieces of information in the segmentation event (SEGMENT EVENT).
Specifically, the demultiplexing module sends a segment event to the audio/video synchronization module and the output module, where the segment event includes the current playing position of the target video and the target rate.
As can be seen from the foregoing, in the existing process, after the data cleansing process is completed, the demultiplexing module sends SEGMENT EVENT to the following module, where ts segment header closest to the current playing position and the target rate are carried. In this embodiment, the demultiplexing module may still use SEGMENT EVENT, and since the event name is not changed, the audio/video synchronization module and the output module do not need to be changed or processed additionally, and only need to process at the position and rate indicated by SEGMENT EVENT as in the prior art. Meanwhile, unlike the prior art, the position information carried by the audio/video synchronization module SEGMENT EVENT in this embodiment is the current playing position, and therefore, the audio/video synchronization module and the output module perform processing based on the current playing position. Therefore, in the embodiment, the current playing position and the target speed are carried in the SEGMENT EVENT, so that the video player can play the video at the target speed from the current playing position, and meanwhile, the audio and video synchronization module and the output module do not need to be modified, and the processing efficiency of the system is improved.
The following describes a process in which the audio/video synchronization module controls the play rate based on the current play position and the target rate.
Fig. 6 is a schematic flow diagram of a video playing method provided in an embodiment of the present application, and as shown in fig. 6, after receiving the current playing position and the target rate, the audio/video synchronization module may execute the following processes:
s601, determining display time through an audio and video synchronization module according to the current playing position, the target speed and system time corresponding to the current playing position.
Alternatively, the current playing position may refer to a time relative to the starting position of the target video. Illustratively, the current play position is 10 seconds, which indicates that the current play is to the 10 th second of the target video.
The system time may refer to the time of the smart television system, and may be, for example, 0 point, 0 minute, 10 seconds at 1 month, 1 day, and 2020.
The display time may refer to a display time of the cache data of the audio and video synchronization module.
For convenience of description, in the embodiment of the present application, a current playing position is denoted as s.start, a target rate is denoted as s.rate, and a system time corresponding to the current playing position is denoted as basetime.
As an alternative, the process of determining the display time is:
and determining the running time according to the current playing position and the target speed through the audio and video synchronization module, and taking the sum of the running time and the system time corresponding to the current playing position as the display time through the audio and video synchronization module.
The embodiment of the present application records the running time as runningtime.
Wherein, runningtime can be calculated by the following formula (1):
runningtime=(timestamp-S.start)/abs(S.rate)+S.base (1)
wherein, the timestamp represents the timestamp of the buffered data of the audio and video synchronization module, and s.base is 0, as can be known from the above formula (1), s.rate indirectly controls the playing speed by influencing the running time of the buffered data.
After calculating running time, the result of basetime + running time is taken as the above display time.
And S602, synchronizing the target video through the audio and video synchronization module according to the difference value between the display time and the current system time.
Alternatively, the difference jitter between the display time and the current system time may be calculated by the following formula (2):
jitter=now-(runningtime+basetime) (2)
wherein now is the current system time.
If jitter <0, it means that the display time of the cache data has not been reached and therefore needs to wait for display, and if jitter >0, it means that the display time of the cache data has elapsed and therefore needs to discard the cache data.
Fig. 7 is a block structure diagram of a video playing apparatus according to an embodiment of the present application, where the apparatus may be the foregoing demultiplexing module, or may be an apparatus including the foregoing demultiplexing module, as shown in fig. 7, the apparatus includes:
a receiving module 701, configured to receive a rate switching instruction, where the rate switching instruction is generated based on a rate switching instruction of a user, and the rate switching instruction is used to instruct to switch a playing rate of a target video to a target rate, and trigger not to send a data cleaning start instruction and a data cleaning end instruction to a subsequent module of a demultiplexing module.
A processing module 702, configured to send the current playing position of the target video and the target rate to an audio and video synchronization module and an output module in the rear module according to the rate switching instruction, perform audio and video synchronization according to the current playing position and the target rate through the audio and video synchronization module, and play the target video according to the current playing position and the target rate through the output module.
The rear module comprises a video decoding module, an audio and video synchronization module and an output module.
Fig. 8 is a block diagram of a video playing apparatus according to an embodiment of the present application, and as shown in fig. 8, the apparatus further includes:
an obtaining module 703, configured to obtain the target rate according to the rate switching instruction and the rate configuration information.
As an optional implementation manner, the rate switching instruction includes the target rate.
As an optional implementation, the processing module 702 is specifically configured to:
and sending a segmentation event to the audio and video synchronization module and the output module, wherein the segmentation event comprises the current playing position of the target video and the target speed.
As an optional implementation, the processing module 702 is specifically configured to:
determining display time according to the current playing position, the target speed and system time corresponding to the current playing position through the audio and video synchronization module; and synchronizing the target video according to the difference value between the display time and the current system time through the audio and video synchronization module.
As an optional implementation, the processing module 702 is specifically configured to:
determining the running time according to the current playing position and the target speed through the audio and video synchronization module; and taking the sum of the running time and the system time corresponding to the current playing position as the display time through the audio and video synchronization module.
As an alternative embodiment, the rate switch instruction is an HLS-based instruction.
The video playing device provided in the embodiment of the present application may perform the method steps in the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the determining module may be a processing element separately set up, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the determining module is called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when some of the above modules are implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call program code. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Fig. 9 is a schematic structural diagram of an electronic device 900 according to an embodiment of the present application. The electronic device may be the smart television described above. As shown in fig. 9, the electronic device may include: the system comprises a processor 91, a memory 92, a communication interface 93 and a system bus 94, wherein the memory 92 and the communication interface 93 are connected with the processor 91 through the system bus 94 and complete mutual communication, the memory 92 is used for storing computer execution instructions, the communication interface 93 is used for communicating with other devices, and the processor 91 implements the scheme of the embodiment shown in the above fig. 4 to fig. 6 when executing the computer program.
The system bus mentioned in fig. 9 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The memory may comprise Random Access Memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor may be a general-purpose processor, including a central processing unit CPU, a Network Processor (NP), and the like; but also a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Optionally, an embodiment of the present application further provides a storage medium, where instructions are stored in the storage medium, and when the storage medium is run on a computer, the storage medium causes the computer to execute the method according to the embodiment shown in fig. 4 to 6.
Optionally, an embodiment of the present application further provides a chip for executing the instruction, where the chip is configured to execute the method in the embodiment shown in fig. 4 to 6.
The embodiment of the present application further provides a program product, where the program product includes a computer program, where the computer program is stored in a storage medium, and the computer program can be read from the storage medium by at least one processor, and when the computer program is executed by the at least one processor, the method of the embodiment shown in fig. 4 to 6 can be implemented.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division". "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for convenience of description and distinction and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiment of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A video playback method, comprising:
the method comprises the steps that a demultiplexing module receives a rate switching instruction, the rate switching instruction is generated based on a rate switching instruction of a user, the rate switching instruction is used for indicating that the playing rate of a target video is switched to a target rate, and a data cleaning starting instruction and a data cleaning ending instruction are not triggered to be sent to a rear module of the demultiplexing module;
the demultiplexing module sends the current playing position and the target speed of the target video to an audio and video synchronization module and an output module in the rear module according to the speed switching instruction, audio and video synchronization is carried out according to the current playing position and the target speed through the audio and video synchronization module, and the target video is played according to the current playing position and the target speed through the output module;
the rear module comprises a video decoding module, an audio and video synchronization module and an output module.
2. The method according to claim 1, wherein the demultiplexing module does not send a data cleansing start instruction and a data cleansing end instruction to a following module according to the rate switching instruction, and further includes, before sending the current playing position of the target video and the target rate to an audio and video synchronization module and an output module in the following module:
and the demultiplexing module acquires the target rate according to the rate switching instruction and the rate configuration information.
3. The method of claim 1, wherein the target rate is included in the rate switch instruction.
4. The method according to any one of claims 1 to 3, wherein the demultiplexing module sends the current playing position of the target video and the target rate to an audio/video synchronization module and an output module in the post module, and includes:
and the demultiplexing module sends a segmentation event to the audio and video synchronization module and the output module, wherein the segmentation event comprises the current playing position of the target video and the target speed.
5. The method according to any one of claims 1 to 3, wherein the performing audio/video synchronization according to the current playing position and the target rate by the audio/video synchronization module comprises:
determining display time according to the current playing position, the target speed and system time corresponding to the current playing position through the audio and video synchronization module;
and synchronizing the target video according to the difference value between the display time and the current system time through the audio and video synchronization module.
6. The method according to claim 5, wherein the determining, by the audio/video synchronization module, a display time according to the current playing position, the target rate, and a system time corresponding to the current playing position comprises:
determining the running time according to the current playing position and the target speed through the audio and video synchronization module;
and taking the sum of the running time and the system time corresponding to the current playing position as the display time through the audio and video synchronization module.
7. The method of claim 1, wherein the rate switch instruction is an instruction of a streaming media network transport protocol (HLS) based on the hypertext transfer protocol (HTTP).
8. A video playback apparatus, comprising:
the receiving module is used for receiving a rate switching instruction, the rate switching instruction is generated based on a rate switching instruction of a user, the rate switching instruction is used for instructing to switch the playing rate of a target video to a target rate, and triggering to not send a data cleaning starting instruction and a data cleaning ending instruction to a rear module of the demultiplexing module;
the processing module is used for sending the current playing position and the target speed of the target video to an audio and video synchronization module and an output module in the rear module according to the speed switching instruction, carrying out audio and video synchronization according to the current playing position and the target speed through the audio and video synchronization module, and playing the target video according to the current playing position and the target speed through the output module;
the rear module comprises a video decoding module, an audio and video synchronization module and an output module.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor for invoking and executing program instructions in said memory for performing the method steps of any of claims 1-7.
10. A readable storage medium, characterized in that a computer program is stored in the readable storage medium for performing the method of any of claims 1-7.
CN201911315567.7A 2019-12-19 2019-12-19 Video playing method and device, electronic equipment and readable storage medium Pending CN113014981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911315567.7A CN113014981A (en) 2019-12-19 2019-12-19 Video playing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911315567.7A CN113014981A (en) 2019-12-19 2019-12-19 Video playing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113014981A true CN113014981A (en) 2021-06-22

Family

ID=76381368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911315567.7A Pending CN113014981A (en) 2019-12-19 2019-12-19 Video playing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113014981A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596586A (en) * 2021-08-18 2021-11-02 三星电子(中国)研发中心 Method and device for starting streaming media double-speed playing
WO2023036092A1 (en) * 2021-09-13 2023-03-16 北京字跳网络技术有限公司 Audio playback method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997152A (en) * 2006-01-06 2007-07-11 腾讯科技(深圳)有限公司 A method, terminal and server for quick skip in the online playing
CN101106723A (en) * 2007-07-10 2008-01-16 中国传媒大学 A system and method for quickly playing multimedia information
CN101188770A (en) * 2007-12-17 2008-05-28 上海广电(集团)有限公司中央研究院 An audio and video synchronization output method for multi-process control
CN103986978A (en) * 2014-04-14 2014-08-13 曦威胜科技开发(深圳)有限公司 Method for achieving functions of fast forward, fast backward and accurate Seek in HLS protocol in expanding mode
CN105578216A (en) * 2015-12-21 2016-05-11 武汉市烽视威科技有限公司 Method for realizing HLS on-demand fast forward and fast backward operation
WO2017071604A1 (en) * 2015-10-28 2017-05-04 中兴通讯股份有限公司 Playback method, device and storage medium
WO2017096786A1 (en) * 2015-12-11 2017-06-15 乐视控股(北京)有限公司 Online playback method, device and system of video stream
CN107087214A (en) * 2016-02-16 2017-08-22 中国电信股份有限公司 Realize method, client and system that streaming medium content speed is played
CN108366299A (en) * 2018-03-29 2018-08-03 上海七牛信息技术有限公司 A kind of media playing method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997152A (en) * 2006-01-06 2007-07-11 腾讯科技(深圳)有限公司 A method, terminal and server for quick skip in the online playing
CN101106723A (en) * 2007-07-10 2008-01-16 中国传媒大学 A system and method for quickly playing multimedia information
CN101188770A (en) * 2007-12-17 2008-05-28 上海广电(集团)有限公司中央研究院 An audio and video synchronization output method for multi-process control
CN103986978A (en) * 2014-04-14 2014-08-13 曦威胜科技开发(深圳)有限公司 Method for achieving functions of fast forward, fast backward and accurate Seek in HLS protocol in expanding mode
WO2017071604A1 (en) * 2015-10-28 2017-05-04 中兴通讯股份有限公司 Playback method, device and storage medium
WO2017096786A1 (en) * 2015-12-11 2017-06-15 乐视控股(北京)有限公司 Online playback method, device and system of video stream
CN105578216A (en) * 2015-12-21 2016-05-11 武汉市烽视威科技有限公司 Method for realizing HLS on-demand fast forward and fast backward operation
CN107087214A (en) * 2016-02-16 2017-08-22 中国电信股份有限公司 Realize method, client and system that streaming medium content speed is played
CN108366299A (en) * 2018-03-29 2018-08-03 上海七牛信息技术有限公司 A kind of media playing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596586A (en) * 2021-08-18 2021-11-02 三星电子(中国)研发中心 Method and device for starting streaming media double-speed playing
WO2023036092A1 (en) * 2021-09-13 2023-03-16 北京字跳网络技术有限公司 Audio playback method and device

Similar Documents

Publication Publication Date Title
US7860996B2 (en) Media streaming with seamless ad insertion
WO2017063399A1 (en) Video playback method and device
US10225613B2 (en) Method and apparatus for video playing processing and television
US20160269803A1 (en) Smart tv media player and playback progress adjustment method thereof, and smart tv
US11140462B2 (en) Method, apparatus, and device for generating an essence video and storage medium
EP2830322A1 (en) Method, terminal and server for implementing trickplay
CN108174280B (en) Audio and video online playing method and system
CN109891896A (en) Anchor for live stream
EP2924998A1 (en) Method, apparatus and system for acquiring playback data stream of real-time video communication
CN109714622B (en) Video data processing method and device and electronic equipment
CN111601136B (en) Video data processing method and device, computer equipment and storage medium
CN107517400B (en) Streaming media playing method and streaming media player
CN101232611B (en) Image process apparatus and method thereof
CN109905749B (en) Video playing method and device, storage medium and electronic device
CN102123281A (en) Fast forward and fast backward treatment method and device during video playing and mobile terminal
US20150268808A1 (en) Method, Device and System for Multi-Speed Playing
CN105786441A (en) Audio processing method, server, user equipment and system
CN113014981A (en) Video playing method and device, electronic equipment and readable storage medium
WO2017186036A1 (en) Playing processing method, terminal device, and computer storage medium
CN108259998B (en) Player, play control method and device, electronic equipment and play system
CN112104909A (en) Interactive video playing method and device, computer equipment and readable storage medium
CN108174242A (en) Live data multiplexing method, device, storage medium and equipment
CN112601127A (en) Video display method and device, electronic equipment and computer readable storage medium
US20150304714A1 (en) Server device and client device for providing vod service and service providing methods thereof
US10674188B2 (en) Playback apparatus, method of controlling playback apparatus, playback method and server apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination