CN115103146A - Video playback method, device, equipment and storage medium - Google Patents
Video playback method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115103146A CN115103146A CN202210679376.4A CN202210679376A CN115103146A CN 115103146 A CN115103146 A CN 115103146A CN 202210679376 A CN202210679376 A CN 202210679376A CN 115103146 A CN115103146 A CN 115103146A
- Authority
- CN
- China
- Prior art keywords
- video playback
- video
- client
- determining
- instruction
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
- H04N5/93—Regeneration of the television signal or of selected parts thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/262—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
- H04N21/26258—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-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/47217—End-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 controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/482—End-user interface for program selection
- H04N21/4825—End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8455—Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a video playback method, a device, equipment and a storage medium, wherein the method comprises the following steps: when the establishment of a video playback channel with a client is completed, acquiring a video playback instruction sent by a signaling server; determining a plug flow parameter according to the video playback instruction, and determining a plug flow strategy according to the plug flow parameter; and pushing the media data to the media server according to the pushing strategy so that the media server forwards the media data to the client. According to the method and the device, when the establishment of the video playback channel with the client is completed, the stream pushing strategy is determined according to the stream pushing parameters determined by the video playback instruction, and the media data is pushed to the media server according to the stream pushing strategy, so that the media server sends the media data to the client, the problems that the existing video playback scheme has higher requirements on network quality and the video quality is low are solved, and the video quality of the played back video is improved.
Description
Technical Field
The present invention relates to the field of audio and video technologies, and in particular, to a method, an apparatus, a device, and a storage medium for video playback.
Background
The network camera generally has a local storage function to locally store the acquired audio/video data. In a monitoring system, a network camera may be connected with a special cloud storage server to store audio and video data, and the local storage is significant in that the local storage can be used as a standby channel for video data storage when the cloud storage server fails, is powered off or has an abnormal transmission channel network, and the like, and the locally stored video data can be played back subsequently.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a video playback method, a video playback device, video playback equipment and a storage medium, and aims to solve the technical problem that the video quality of the played back video is low in the prior art.
To achieve the above object, the present invention provides a video playback method, comprising the steps of:
when the establishment of a video playback channel with a client is completed, acquiring a video playback instruction sent by a signaling server;
determining a plug flow parameter according to the video playback instruction, and determining a plug flow strategy according to the plug flow parameter;
and pushing the media data to a media server according to the pushing strategy so that the media server forwards the media data to the client.
Optionally, the streaming media data to a media server according to the streaming policy so that the media server forwards the media data to the client includes:
inserting a supplemental enhancement information frame into the media data according to a preset duration in the process of pushing the media data to a media server according to the push flow strategy to obtain supplemental information media data;
and pushing the supplementary information media data to a media server so that the media server forwards the supplementary information media data to the client.
Optionally, before the obtaining the video playback instruction sent by the signaling server when the video playback channel with the client is completely established, the method further includes:
receiving a flow pushing address sent by a signaling server, wherein the flow pushing address is determined according to equipment information;
establishing a stream pushing connection with a media server according to the stream pushing address;
and when the client starts pull stream from the media server according to the pull stream address fed back by the signaling server, judging that the establishment of a video playback channel between the client and the client is finished.
Optionally, the obtaining a video playback instruction sent by the signaling server when the establishment of the video playback channel with the client is completed includes:
acquiring video playback parameters sent by a signaling server;
determining video segment set information according to the video playback parameters;
and sending the video clip set information to a client so that the client determines a video list according to the video clip set information.
Optionally, the determining a push flow parameter according to the video playback instruction and determining a push flow policy according to the push flow parameter include:
when the video playback instruction is a playback instruction at a specified moment, determining that the plug-flow parameter is a target video recording position according to the playback instruction at the specified moment;
and determining the push flow strategy as a redirection push flow according to the target video position.
Optionally, the determining a push flow parameter according to the video playback instruction and determining a push flow policy according to the push flow parameter include:
when the video playback instruction is a playback speed control instruction, determining a plug flow parameter as a playback frame rate according to the playback speed control instruction;
and determining the push flow strategy as the variable frame rate push flow according to the playback frame rate.
Optionally, the determining a push flow parameter according to the video playback instruction and determining a push flow policy according to the push flow parameter include:
when the video playback instruction is a playing stopping instruction, determining a plug flow parameter as a channel disconnection parameter according to the playing stopping instruction;
and determining the push flow strategy as ending push flow according to the parameters of the disconnected channel.
Further, to achieve the above object, the present invention also provides a video playback apparatus, comprising:
the acquisition module is used for acquiring a video playback instruction sent by the signaling server when the establishment of a video playback channel with the client is completed;
the determining module is used for determining a plug flow parameter according to the video playback instruction and determining a plug flow strategy according to the plug flow parameter;
and the stream pushing module is used for pushing the media data to a media server according to the stream pushing strategy so as to enable the media server to forward the media data to the client.
Furthermore, to achieve the above object, the present invention also provides a video playback device, including: a memory, a processor and a video playback program stored on the memory and executable on the processor, the video playback program configured to implement the steps of the video playback method as described above.
Furthermore, to achieve the above object, the present invention also proposes a storage medium having stored thereon a video playback program which, when executed by a processor, implements the steps of the video playback method as described above.
When the establishment of a video playback channel with a client is completed, a video playback instruction sent by a signaling server is obtained; determining a plug flow parameter according to the video playback instruction, and determining a plug flow strategy according to the plug flow parameter; and pushing the media data to a media server according to the pushing strategy so that the media server forwards the media data to the client. According to the method and the device, when the establishment of the video playback channel with the client is completed, the stream pushing strategy is determined according to the stream pushing parameters determined by the video playback instruction, and the media data is pushed to the media server according to the stream pushing strategy, so that the media server sends the media data to the client, the problems that the existing video playback scheme has higher requirements on network quality and the video quality is low are solved, and the video quality of the played back video is improved.
Drawings
FIG. 1 is a schematic diagram of a video playback device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a video playback method according to the present invention;
FIG. 3 is a flowchart illustrating the process of adding SEI frames to media data according to an embodiment of the video playback method of the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of a video playback method according to the present invention;
fig. 5 is a schematic flowchart illustrating the establishment of a video playback channel between a playback device and a client according to an embodiment of the video playback method of the present invention;
FIG. 6 is a flowchart illustrating a video playback method according to a third embodiment of the present invention;
fig. 7 is a schematic flowchart illustrating a play mode control performed by a client according to an embodiment of the video playback method of the present invention;
fig. 8 is a block diagram of the first embodiment of the video playback apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a video playback device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the video playback device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (WI-FI) interface). The Memory 1005 may be a high-speed Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the video playback device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a video playback program.
In the video playback device shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the video playback device of the present invention may be provided in a video playback device that calls a video playback program stored in the memory 1005 through the processor 1001 and executes a video playback method provided by an embodiment of the present invention.
An embodiment of the present invention provides a video playback method, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the video playback method according to the present invention.
In this embodiment, the video playback method includes the following steps:
step S10: and when the establishment of the video playback channel with the client is completed, acquiring a video playback instruction sent by the signaling server.
It should be noted that the execution subject of the embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a video playback device, etc., capable of implementing the above functions. The present embodiment and the following embodiments are exemplified below by taking a video playback device (simply referred to as a playback device) as an example.
It is understood that the client may be a terminal for video playback, for example, the client includes a personal computer, a tablet computer, a mobile phone, and the like; the video playback channel may be a channel for transmitting media data; the signaling server may be a server for forwarding playback signaling; the video playback instruction may be an instruction that a user triggers the client to send to the signaling server for controlling video playback.
It should be understood that when the playback device completes establishment of a video playback channel with the client, a user triggers a video playback instruction through the client, the client sends the video playback instruction triggered by the user to the signaling server, and the playback device acquires the video playback instruction forwarded by the signaling server.
In specific implementation, a video playback channel between the playback device and the client may be established based on a Secure Reliable Transport protocol (SRT), when the establishment of the video playback channel between the playback device and the client based on the SRT protocol is completed, the client sends a video playback instruction triggered by a user to the signaling server, and the playback device obtains the video playback instruction forwarded by the signaling server.
Step S20: and determining a push flow parameter according to the video playback instruction, and determining a push flow strategy according to the push flow parameter.
It is understood that the streaming parameters may be parameters for pushing the media data to the media server, for example, the streaming parameters include parameters such as a speed for pushing the media data, a time for pushing the media data, and the like; the push policy may be a policy for pushing media data to the media server, for example, the push policy includes accelerating push flow, decelerating push flow, directing push flow, and the like.
In a specific implementation, the playback device determines a push stream parameter for pushing media data to the media server according to a video playback instruction forwarded by the signaling server, and determines a push stream policy for pushing the media data to the media server according to the push stream parameter.
Step S30: and pushing the media data to a media server according to the pushing strategy so that the media server forwards the media data to the client.
It is understood that the media server may be a server that forwards media data streamed by the playback device to the client for playing.
In the specific implementation, a playback device establishes a video playback channel with a client based on an SRT protocol, when the establishment of the video playback channel is completed, the client detects the operation of a user, when the client detects that the user triggers a video playback instruction, the video playback instruction is sent to a signaling server, the playback device obtains the video playback instruction forwarded by the signaling server, determines a push streaming parameter for pushing streaming media data to the media server according to the video playback instruction, determines a push streaming policy for pushing the streaming media data to the media server according to the push streaming parameter, pushes the media data corresponding to the video playback instruction to the media server according to the push streaming policy, and sends the received media data to the client for video playback.
Further, since a large amount of media data is stored in the local storage space of the playback device, but the user may only need to play back a specific video, in order to save network resources and make the client obtain the required playback video, the step S10 includes: acquiring video playback parameters sent by a signaling server; determining video segment set information according to the video playback parameters; and sending the video clip set information to a client so that the client determines a video list according to the video clip set information.
It can be understood that the video playback parameters may be parameters of a query target playback video set by a user through a client, the video playback parameters include parameters such as video acquisition time and video acquisition area, and the user may set the parameters according to actual requirements; the video clip set information may be information of a number of playback video clip sets corresponding to the video playback parameters; the video list may be a list of several playback video clips obtained by rendering the video clip set information.
In this embodiment, the video playback parameters include video capture time, which may be input by a user at the client or selected by the user based on a plurality of video capture times provided by the client, for example, if the user selects two video capture times, one being video start time and the other being video end time, based on the plurality of video capture times provided by the client, the video clip set information is video information between the video start time and the video end time; the video playback parameters may also include parameters such as a video capture area and a camera number, which may be set according to specific requirements, and this embodiment is not limited herein.
It should be understood that sending the video segment aggregation information to the client, so that the client determines the video list according to the video segment aggregation information may be: and sending the video clip set information to a client so that the client renders the video clip set to obtain a corresponding video list and displays the video list.
In the specific implementation, a user sets video playback parameters based on a client to be a video acquisition area, an acquisition camera number and video acquisition time, the client sends the video playback parameters to a signaling server, playback equipment acquires the video playback parameters forwarded by the signaling server, searches video clips according to the video playback parameters to obtain video clip set information, forwards the video clip set information to the client through the signaling server, and the client renders the received video clip set information to obtain a video list.
For example, the video playback parameters set by the user through the client are: the method comprises the following steps that a video acquisition area A, a video acquisition camera number A01, a video start time B and a video end time C are obtained, a client side sends video playback parameters to a signaling server, playback equipment obtains the video playback parameters forwarded by the signaling server, video clips acquired by an A01 camera in a period from B to C are searched in the area A according to the video playback parameters, and the obtained video clip set information is assumed as follows: the video information processing method includes the steps of (C1 video clip, video size 100 million, video start time D1), (C2 video clip, video size 502 million, video start time D2) and (C3 video clip, video size 305 million, video start time D3), and sending the video clip set information to a client, where a video list obtained by the client through rendering the video clip set information may refer to table 1 — a video list, and video playback parameters may be set as other parameters according to actual needs, which is not limited herein.
TABLE 1 video List
Video clip name | Size and breadth | Starting time |
C1 | 100 million | D1 |
C2 | 502 million | D2 |
C3 | 305 million of | D3 |
Further, in the prior art, generally, the relative timestamp in the code stream is used to render and control the time axis offset in the playback video valid time list, so as to achieve complexity and low accuracy, and in order to improve the accuracy of time axis offset control while reducing complexity, the step S30 includes: inserting a supplemental enhancement information frame into the media data according to a preset duration in the process of pushing the media data to a media server according to the push flow strategy to obtain supplemental information media data; and pushing the supplementary information media data to a media server so that the media server forwards the supplementary information media data to the client.
It can be understood that the preset duration may be a preset interval duration between two adjacent frames of supplemental enhancement information frames; supplemental Enhancement Information (SEI) frames may be video frames to which absolute timestamps are added in a video bitstream; the supplemental information media data may be media data into which a supplemental enhancement information frame is inserted.
In specific implementation, referring to fig. 3, fig. 3 is a schematic flow diagram illustrating an SEI frame being added to media data, a playback device provides an absolute timestamp in a process of pushing streaming media data to a media server, inserts the SEI frame into the media data at intervals of a preset duration to obtain supplemental information media data, and sends the supplemental information media data to the media server, the media server sends the supplemental information media data to a client, the client analyzes the SEI frame in the supplemental information media data to obtain an absolute timestamp corresponding to the SEI frame, and a video playing application of the client controls movement of a time axis through the absolute timestamp.
In the embodiment, when the establishment of a video playback channel with a client is completed, a video playback instruction sent by a signaling server is obtained; determining a plug flow parameter according to the video playback instruction, and determining a plug flow strategy according to the plug flow parameter; and pushing the media data to a media server according to the pushing strategy so that the media server forwards the media data to the client. In the embodiment, when the establishment of the video playback channel with the client is completed, the stream pushing strategy is determined according to the stream pushing parameters determined by the video playback instruction, and the media data is pushed to the media server according to the stream pushing strategy, so that the media server sends the media data to the client, the problems that the existing video playback scheme has higher requirements on network quality and the video quality is low are solved, and the video quality of the played back video is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a video playback method according to a second embodiment of the present invention.
Based on the first embodiment, in this embodiment, before the step S10, the method further includes:
step S01: and receiving a push flow address sent by the signaling server, wherein the push flow address is determined according to the equipment information.
It is to be understood that the push flow address may be an SRT push flow address; the device information may be information of the playback device, and the device information includes information such as a Media Access Control Address (MAC Address), a device identification code, and a device model.
In a specific implementation, a client initiates a stream pulling address request to a signaling server, the signaling server generates a stream pushing address request according to the stream pulling address request, and forwards the stream pushing address request to an address maintenance module, the address maintenance module generates a stream pushing address according to device information of playback equipment and sends the stream pushing address to the signaling server, and the playback equipment receives the stream pushing address sent by the signaling server, where the address maintenance module may be a sub-module in a media server or a separately set module, and may be set according to a specific scenario, and this embodiment is not limited herein.
Step S02: and establishing a stream pushing connection with a media server according to the stream pushing address.
Step S03: and when the client starts pull stream from the media server according to the pull stream address fed back by the signaling server, judging that the establishment of a video playback channel between the client and the client is completed.
In the specific implementation, the playback device establishes a push-stream connection with the media server according to the push-stream address, the media server feeds the server state back to the address maintenance module, meanwhile, the signaling server forwards a pull-stream address request to the address maintenance module in a polling manner, the address maintenance module generates a pull-stream address and returns the pull-stream address to the client, the client starts a pull stream from the media server according to the pull-stream address, and at this time, the establishment of a video playback channel between the client and the client is determined to be completed.
In a specific implementation, for example, referring to fig. 5, fig. 5 is a schematic flowchart of a flow for establishing a video playback channel between a playback device and a client, where a user triggers a request for playback pull stream at the client, the client sends a generated SRT pull stream address request to a signaling server, the signaling server forwards the generated SRT pull stream address request to an address maintenance module, the address maintenance module generates an SRT pull stream address according to device information and returns the SRT pull stream address to the signaling server, the signaling server issues the SRT pull stream address to the playback device, the playback device establishes a pull stream connection with a media server based on the SRT pull stream address, the media server performs state feedback to the address maintenance module, the signaling server forwards the pull stream address request to the address maintenance module by way of polling, the address maintenance module generates a pull stream address based on the pull stream address request and sends the pull stream address to the signaling server, the signaling server returns the pull stream address to the client, the client starts the pull stream from the media server based on the pull stream address, and at the moment, the playback equipment judges that the establishment of a video playback channel between the playback equipment and the client is finished.
The embodiment receives a flow pushing address sent by a signaling server, wherein the flow pushing address is determined according to equipment information; establishing a stream pushing connection with a media server according to the stream pushing address; and when the client starts pull stream from the media server according to the pull stream address fed back by the signaling server, judging that the establishment of a video playback channel between the client and the client is finished. In this embodiment, a push stream connection is established with the media server according to the push stream address sent by the signaling server, and when the client starts a pull stream from the media server according to the pull stream address forwarded by the signaling server, the establishment of a video playback channel is completed, and video playback is performed based on the video playback channel, so that the quality of video playback is improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a video playback method according to a third embodiment of the present invention.
Based on the foregoing embodiments, in this embodiment, the step S20 includes:
step S201: and when the video playback instruction is the playback instruction at the specified moment, determining that the plug-flow parameter is the target video recording position according to the playback instruction at the specified moment.
It is to be understood that the specified time playback instruction may be an instruction to control the video to start playing from the specified time; the target video recording position may be a video recording position corresponding to the playback instruction at the specified time in the streaming media data to be pushed.
Step S202: and determining the push flow strategy as a redirection push flow according to the target video position.
It can be understood that redirecting the stream pushing may be to reposition the streaming media data to be pushed and to position the current video frame of the streaming media data to the target video position for stream pushing.
In specific implementation, referring to fig. 7, fig. 7 is a schematic flow diagram of play mode control performed by a client, where a user drags a time axis at the client, the client sends a video request at a corresponding time to a signaling server, the signaling server forwards a generated playback instruction at a specified time to a playback device, the playback device redirects media data according to the playback instruction at the specified time, determines a target video recording position corresponding to the playback instruction at the specified time, the playback device locates streaming media data to be pushed to the target video recording position and starts to push streaming to a media server, the media server sends the media data to the client, the client matches a timestamp, discards old media data, and plays newly received media data through an installed player.
Further, some users may have a fast playing or slow playing requirement, and in order to meet the user requirement to enhance the user experience, the step S20 further includes: when the video playback instruction is a playback speed control instruction, determining a plug flow parameter as a playback frame rate according to the playback speed control instruction; and determining the push flow strategy as the variable frame rate push flow according to the playback frame rate.
It will be appreciated that the playback speed control instructions may be instructions to control the speed at which the media data is played; the playback frame rate may be a play rate of the video frame determined according to the playback rate control instruction; the frame rate conversion push flow can adjust the push flow frame rate to the frame rate corresponding to the playback speed control instruction for push flow.
It should be understood that the playback speed control instruction includes an acceleration control instruction and a deceleration control instruction, and several playback speed control instructions may be further set at the client for selection by the user, and the embodiment is not limited herein.
Further, in order to enhance the user experience, the step S20 further includes: when the video playback instruction is a playing stopping instruction, determining a plug flow parameter as a channel disconnection parameter according to the playing stopping instruction; and determining the push flow strategy as ending push flow according to the parameters of the disconnected channel.
In the specific implementation, a user triggers a play stop button, a client sends a play stop instruction to a signaling server, playback equipment acquires the play stop instruction forwarded by the signaling server, determines a push stream parameter as a disconnection channel parameter according to the play stop instruction, and the playback equipment disconnects the push stream connection with a media server according to the disconnection channel parameter.
In this embodiment, with reference to fig. 7, to improve user experience, the embodiment has a pause and replay function, if a user triggers a pause button, the client sends a pause stream pushing request to the signaling server, the signaling server forwards the request to the playback device, and the playback device stops pushing streams to the media server; when a client starts a play button, the client sends a play request to the signaling server, the signaling server forwards a stream pushing request to the playback equipment according to the play request, the playback equipment pushes streams to the media server again, and a player of the client continues to play videos.
In this embodiment, when the video playback instruction is a playback instruction at a specified time, determining that a plug-flow parameter is a target video recording position according to the playback instruction at the specified time; and determining the push flow strategy as a redirection push flow according to the target video position. According to the embodiment, the corresponding stream pushing strategy is determined according to the received video playback instruction, different playback requirements of the user can be met, and the user experience is improved.
Furthermore, an embodiment of the present invention further provides a storage medium, where a video playback program is stored on the storage medium, and the video playback program, when executed by a processor, implements the steps of the video playback method as described above.
Referring to fig. 8, fig. 8 is a block diagram of a first embodiment of the video playback apparatus according to the present invention.
As shown in fig. 8, a video playback apparatus according to an embodiment of the present invention includes: an acquisition module 10, a determination module 20 and a plug flow module 30.
The obtaining module 10 is configured to obtain a video playback instruction sent by the signaling server when the establishment of the video playback channel with the client is completed;
the determining module 20 is configured to determine a push flow parameter according to the video playback instruction, and determine a push flow policy according to the push flow parameter;
the push streaming module 30 is configured to push streaming media data to a media server according to the push streaming policy, so that the media server forwards the media data to the client.
In the embodiment, when the establishment of a video playback channel with a client is completed, a video playback instruction sent by a signaling server is obtained; determining a plug flow parameter according to the video playback instruction, and determining a plug flow strategy according to the plug flow parameter; and pushing the media data to a media server according to the pushing strategy so that the media server forwards the media data to the client. In the embodiment, when the establishment of the video playback channel with the client is completed, the stream pushing strategy is determined according to the stream pushing parameters determined by the video playback instruction, and the media data is pushed to the media server according to the stream pushing strategy, so that the media server sends the media data to the client, the problems that the existing video playback scheme has higher requirements on network quality and the video quality is low are solved, and the video quality of the played back video is improved.
A second embodiment of the video playback apparatus of the present invention is proposed based on the above-described first embodiment of the video playback apparatus of the present invention.
In this embodiment, the stream pushing module 30 is further configured to insert a supplemental enhancement information frame into the media data according to a preset duration in a process of pushing the media data to the media server according to the stream pushing policy, so as to obtain supplemental information media data; and pushing the supplementary information media data to a media server so that the media server forwards the supplementary information media data to the client.
The obtaining module 10 is further configured to receive a push flow address sent by a signaling server, where the push flow address is determined according to device information; establishing a stream pushing connection with a media server according to the stream pushing address; and when the client starts pull stream from the media server according to the pull stream address fed back by the signaling server, judging that the establishment of a video playback channel between the client and the client is finished.
The obtaining module 10 is further configured to obtain a video playback parameter sent by the signaling server; determining video segment set information according to the video playback parameters; and sending the video clip set information to a client so that the client determines a video list according to the video clip set information.
The determining module 20 is further configured to determine, when the video playback instruction is a playback instruction at a specified time, a stream pushing parameter as a target video recording position according to the playback instruction at the specified time; and determining the push flow strategy as a redirection push flow according to the target video position.
The determining module 20 is further configured to determine, when the video playback instruction is a playback speed control instruction, a stream pushing parameter as a playback frame rate according to the playback speed control instruction; and determining the push flow strategy as the variable frame rate push flow according to the playback frame rate.
The determining module 20 is further configured to determine, when the video playback instruction is a stop playing instruction, a push stream parameter as a disconnection channel parameter according to the stop playing instruction; and determining the push flow strategy as ending push flow according to the parameters of the disconnected channel.
Other embodiments or specific implementations of the video playback apparatus of the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., a rom/ram, a magnetic disk, an optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A method of video playback, the method comprising:
when the establishment of a video playback channel with a client is completed, acquiring a video playback instruction sent by a signaling server;
determining a plug flow parameter according to the video playback instruction, and determining a plug flow strategy according to the plug flow parameter;
and pushing the media data to a media server according to the pushing strategy so that the media server forwards the media data to the client.
2. The method of claim 1, wherein said streaming media data to a media server according to the streaming policy to cause the media server to forward the media data to the client comprises:
inserting a supplemental enhancement information frame into the media data according to a preset duration in the process of pushing the media data to a media server according to the push flow strategy to obtain supplemental information media data;
and pushing the supplementary information media data to a media server so that the media server forwards the supplementary information media data to the client.
3. The method of claim 1, wherein before obtaining the video playback instruction sent by the signaling server when the video playback channel establishment with the client is completed, the method further comprises:
receiving a flow pushing address sent by a signaling server, wherein the flow pushing address is determined according to equipment information;
establishing a stream pushing connection with a media server according to the stream pushing address;
and when the client starts pull stream from the media server according to the pull stream address fed back by the signaling server, judging that the establishment of a video playback channel between the client and the client is finished.
4. The method according to any one of claims 1 to 3, wherein the obtaining of the video playback instruction sent by the signaling server when the establishment of the video playback channel with the client is completed comprises:
acquiring video playback parameters sent by a signaling server;
determining video segment set information according to the video playback parameters;
and sending the video clip set information to a client so that the client determines a video list according to the video clip set information.
5. The method of any of claims 1-3, wherein determining a push flow parameter based on the video playback instruction and determining a push flow policy based on the push flow parameter comprises:
when the video playback instruction is a playback instruction at a specified moment, determining that the plug-flow parameter is a target video recording position according to the playback instruction at the specified moment;
and determining the push flow strategy as a redirection push flow according to the target video position.
6. The method of any of claims 1-3, wherein determining a push flow parameter based on the video playback instruction and determining a push flow policy based on the push flow parameter comprises:
when the video playback instruction is a playback speed control instruction, determining that the stream pushing parameter is a playback frame rate according to the playback speed control instruction;
and determining the push flow strategy as the variable frame rate push flow according to the playback frame rate.
7. The method of any of claims 1-3, wherein the determining a push flow parameter based on the video playback instruction and determining a push flow policy based on the push flow parameter comprises:
when the video playback instruction is a playing stopping instruction, determining a plug flow parameter as a channel disconnection parameter according to the playing stopping instruction;
and determining the push flow strategy as ending push flow according to the parameters of the disconnected channel.
8. A video playback apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a video playback instruction sent by the signaling server when the establishment of a video playback channel with the client is completed;
the determining module is used for determining a plug flow parameter according to the video playback instruction and determining a plug flow strategy according to the plug flow parameter;
and the stream pushing module is used for pushing the media data to a media server according to the stream pushing strategy so as to enable the media server to forward the media data to the client.
9. A video playback device, characterized in that the device comprises: memory, a processor and a video playback program stored on the memory and executable on the processor, the video playback program being configured to implement the steps of the video playback method as claimed in any one of claims 1 to 7.
10. A storage medium having stored thereon a video playback program which, when executed by a processor, implements the steps of the video playback method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210679376.4A CN115103146A (en) | 2022-06-15 | 2022-06-15 | Video playback method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210679376.4A CN115103146A (en) | 2022-06-15 | 2022-06-15 | Video playback method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115103146A true CN115103146A (en) | 2022-09-23 |
Family
ID=83291357
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210679376.4A Pending CN115103146A (en) | 2022-06-15 | 2022-06-15 | Video playback method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115103146A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115955593A (en) * | 2022-12-15 | 2023-04-11 | 九识(苏州)智能科技有限公司 | Monitoring video playback system and method for unmanned vehicle and storage medium |
CN116896546A (en) * | 2023-09-06 | 2023-10-17 | 中移(杭州)信息技术有限公司 | Visual intercom method, system and storage medium based on SRT communication protocol |
-
2022
- 2022-06-15 CN CN202210679376.4A patent/CN115103146A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115955593A (en) * | 2022-12-15 | 2023-04-11 | 九识(苏州)智能科技有限公司 | Monitoring video playback system and method for unmanned vehicle and storage medium |
CN116896546A (en) * | 2023-09-06 | 2023-10-17 | 中移(杭州)信息技术有限公司 | Visual intercom method, system and storage medium based on SRT communication protocol |
CN116896546B (en) * | 2023-09-06 | 2023-12-26 | 中移(杭州)信息技术有限公司 | Visual intercom method, system and storage medium based on SRT communication protocol |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200107050A1 (en) | Live Broadcast Method and System, and Related Device | |
CN110166788B (en) | Information synchronous playing method, device and storage medium | |
US10412460B2 (en) | Hybrid network system, channel content playback method, and hybrid set top box | |
CN115103146A (en) | Video playback method, device, equipment and storage medium | |
CN112399190B (en) | Audio and video data acquisition method and device | |
CN112839238B (en) | Screen projection playing method and device and storage medium | |
CN111343477B (en) | Data transmission method and device, electronic equipment and storage medium | |
CN113741762A (en) | Multimedia playing method, device, electronic equipment and storage medium | |
CN111866526B (en) | Live broadcast service processing method and device | |
CN106658065B (en) | Audio and video synchronization method, device and system | |
US8386632B2 (en) | Method, device, and system for controlling streaming media play | |
EP3316593B1 (en) | Method and device for implementing synchronous playing | |
CN109819278B (en) | Optimization method of live video | |
CN105791987A (en) | Media data playing method and terminal | |
CN110049360B (en) | Cross-platform content control method, device, terminal, server and storage medium | |
CN109729402B (en) | Media content synchronization method, device and storage medium | |
CN113852866B (en) | Media stream processing method, device and system | |
CN111200562B (en) | Flow guiding method, static father node, edge node and CDN (content delivery network) | |
CN111901634B (en) | Stream media on-demand method, device and computer readable storage medium | |
CN110691256B (en) | Video associated information processing method and device, server and storage medium | |
CN101552684B (en) | Method, device and system for controlling real time streaming media protocol conversation state | |
CN108449611B (en) | Media transmission method and system | |
CN111464989A (en) | Audio data processing method, control device and readable storage medium | |
CN111277868B (en) | Audio and video on demand service opening method and device | |
CN110351570A (en) | Net cast method and system under 5G network |
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 |