WO2020043104A1 - 视频投屏方法、装置、计算机设备及存储介质 - Google Patents

视频投屏方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020043104A1
WO2020043104A1 PCT/CN2019/102896 CN2019102896W WO2020043104A1 WO 2020043104 A1 WO2020043104 A1 WO 2020043104A1 CN 2019102896 W CN2019102896 W CN 2019102896W WO 2020043104 A1 WO2020043104 A1 WO 2020043104A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
terminal
video stream
stream
request message
Prior art date
Application number
PCT/CN2019/102896
Other languages
English (en)
French (fr)
Inventor
金临一
陈�光
陈龙
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19853317.6A priority Critical patent/EP3840394A4/en
Priority to KR1020217008935A priority patent/KR102387161B1/ko
Publication of WO2020043104A1 publication Critical patent/WO2020043104A1/zh

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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1083In-session procedures
    • H04L65/1094Inter-user-equipment sessions transfer or sharing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • 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/21Server components or server architectures
    • H04N21/222Secondary servers, e.g. proxy server, cable television Head-end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4122Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
    • 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
    • H04N21/43076Synchronising 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 of the same content streams on multiple devices, e.g. when family members are watching the same movie on different devices
    • 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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • 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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • 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
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Definitions

  • the present invention relates to the field of video technology, and in particular, to a method, a device, a computer device, and a storage medium for video projection.
  • VR terminals are widely used in life as personal wearable devices. Due to the limitation of volume, VR terminals cannot meet the needs of multiple people to watch videos at the same time, so they need to cast screens. Technology, the video image of the VR terminal is placed on other screens that enable multiple people to watch the video at the same time.
  • the current screen projection technology can use a set-top box as the video publisher to perform screen projection.
  • the screen projection process can be as follows: the VR terminal sends a video data request to the video server, and the video request carries the network protocol address and video of the VR terminal. Uniform resource locator (URL) information, the network protocol address of the video server; the video server sends a video stream to the VR terminal according to the information carried by the video request; the VR terminal plays the video stream after receiving the video stream The indicated video; the VR terminal sends a screen casting request to the set-top box, which carries the video stream, playback progress and head rotation information; the set-top box plays the video being played by the VR terminal according to the information carried by the received screen casting request .
  • URL Uniform resource locator
  • the VR terminal not only needs to receive the video stream, but also needs to send the video stream to the STB, which increases the network pressure and power consumption of the VR terminal.
  • the VR terminal When the network pressure of the VR terminal is too high, the VR terminal The video that is played will be frozen, so the video that is played on the set-top box will also be frozen, which reduces the screen quality.
  • Embodiments of the present invention provide a method, a device, a computer device, and a storage medium for video screen projection, which can solve the problems of screen freeze of the first terminal and excessive network pressure and power consumption of the first terminal.
  • the technical scheme is as follows:
  • a video screen projection method is provided, which is applied to a proxy server, where the proxy server is in the same local area network as the first terminal and the second terminal, and the method includes:
  • the first video stream is a real-time transport protocol (RTP) stream
  • the stream information of the first video stream includes a five-tuple.
  • the first terminal can support multiple streaming media transmission protocols, which improves the applicable performance of the first terminal, and the first terminal is universal.
  • the projection agent request message further includes a network protocol address of the video server, and the method further includes:
  • the proxy server can avoid the phenomenon that the screen is not synchronized due to being unable to match the video stream being played by the first terminal, which improves the synchronization effect.
  • the stream information of the first video stream further includes a network protocol address of the first terminal.
  • the proxy server can provide proxy screen-casting services to multiple first terminals at the same time, which improves the use efficiency of the proxy server.
  • the method before matching the data stream sent by the video server to the first terminal according to the stream information of the first video stream, the method further includes:
  • the target streaming media transmission protocol is determined according to the protocol type field in the screen casting proxy request message.
  • the target streaming media transmission protocol is the streaming media transmission protocol adopted by the first terminal. Different values of the protocol type field correspond to different values. Streaming media transmission protocol;
  • the step of matching the data stream sent by the video server to the first terminal according to the stream information of the first video stream is performed.
  • the proxy server may implement adaptive and differentiated processing for videos of different streaming media transmission protocols according to the protocol type field in the request information of the screen-casting proxy.
  • the method further includes:
  • Video synchronization message periodically sent by the first terminal, and forward the video synchronization message to the second terminal, where the video synchronization message includes stream information of the first video stream, and the video synchronization message further includes a playback progress and the first At least one item of head rotation information of a terminal.
  • the video synchronization information is periodically sent, so that the second terminal can adjust the played video picture in real time according to the video synchronization information, so that the video picture played by the second terminal is synchronized with the video picture played by the first terminal, thereby Improved synchronization.
  • the method further includes:
  • a video projection method is provided, which is applied to a second terminal.
  • the second terminal is in the same local area network as the proxy server and the first terminal.
  • the method includes:
  • the video synchronization message includes stream information of the first video stream, and the video synchronization message further includes any one of playback progress and head rotation information of the first terminal;
  • Video playback is performed based on the video synchronization message and the second video stream.
  • the method further includes:
  • a screen casting proxy end request message is sent to the proxy server, and the screen casting proxy end request message is used to request the proxy server to end the matching process for the first video stream.
  • a video screen projection device which is used to execute the video screen projection method.
  • the video screen projection device includes a functional module for executing the video screen projection method provided in the first aspect or any one of the foregoing optional manners, wherein the above aspect is a method applied to a proxy server.
  • the above aspect is a method applied to a proxy server.
  • a video projection device which is used to execute the video projection method described above.
  • the video screen projection device includes a function module for executing the video projection screen method provided in the second aspect or any one of the foregoing optional manners, wherein the above aspect is applied to a second terminal.
  • a corresponding aspect of a video projection method is provided, which is used to execute the video projection method described above.
  • a computer device in one aspect, includes a processor and a memory, and the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the operations performed by the video projection method described above.
  • a computer-readable storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the operations performed by the video screen projection method.
  • the proxy server matches the video stream being played by the first terminal from the received video stream according to the network protocol address of the first terminal and the stream information of the video stream, and will correspond to the video being played by the first terminal.
  • the video stream is sent to the second terminal, so that the second terminal can play the video indicated by the video stream, achieving the purpose of the first terminal and the second terminal to play synchronously, avoiding the first terminal sending the video stream to the second terminal, reducing the The network pressure and power consumption of a terminal can avoid stuttering, thereby improving the screen quality.
  • FIG. 1 is a schematic diagram of a video projection screen implementation environment provided by an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a first terminal according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a second terminal according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a device for a proxy server according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a video projection method according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a video projection method according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of a video projection method according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of a video projection method according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a video projection device according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a video projection device according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a video projection screen implementation environment provided by an embodiment of the present invention.
  • the implementation environment includes a first terminal 101, a second terminal 102, a proxy server 103, and a video server 104.
  • the first terminal 101, the second terminal 102, and the proxy server 103 are in the same local area network.
  • the first terminal 101 is connected to the second terminal 102, the proxy server 103, and the video server 104 through a wireless network.
  • the proxy server 103 may be connected to the first terminal through a network cable. Two terminals.
  • the first terminal 101 is a terminal for playing a video, and can play a video provided by a video server of an operator.
  • the video may be a movie, a TV series, a game video, or a real-time chat video.
  • the first terminal may serve as the initiator of the screen projection, and the video played by the first terminal may serve as the screen projection target.
  • the first terminal may be a VR terminal for playing a VR video, and the VR video mainly provides a panoramic image centered on the human eye and seamlessly connects 180 degrees up and down and 360 degrees horizontally.
  • the video server 104 sends the first terminal 101 to the first terminal 101.
  • the video server 104 pushes all 360-degree surround pictures to the first terminal 101, and the first terminal 101 is responsible for tracking changes in the user's perspective and completing screen projection and display in real time. Therefore, during the VR video viewing process, The perspective will change at any time, which means that the first terminal 101 needs to periodically send a video synchronization message to the proxy server 103, so that the second terminal 102 can play the video screen being played by the first terminal 101 according to the video synchronization message forwarded by the proxy server 103.
  • the first terminal may also be another terminal that can play videos, which is not specifically limited in this embodiment of the present invention.
  • the first terminal 101 may be an all-in-one machine, and may be a user terminal of an operator's cloud VR service. Alternatively, the first terminal 101 may be VR glasses.
  • the second terminal 102 is a terminal having a video playing capability, and can play a video indicated by the video stream according to the received video stream.
  • the second terminal 102 may be used for screen projection display.
  • the second terminal 102 may send a screen casting proxy request to the proxy server 103, and according to the video synchronization message periodically forwarded by the proxy server 103, and the video stream sent by the proxy server 103, play the video screen being played by the first terminal 101, and complete the projection. Screen display.
  • the second terminal may also be another terminal for playing videos, as long as it can complete the screen projection display, which is not specifically limited in this embodiment of the present invention.
  • the second terminal 102 may be a user terminal of an operator's broadband television service, such as a set-top box.
  • the proxy server 103 is the unified network exit of the local area network. It can be used as a proxy server for the second terminal 102 and is responsible for forwarding the information sent by the first terminal 101 to the second terminal 102 and matching the video stream being played by the first terminal 101. Send to the second terminal 102, so that the second terminal 102 can play the video screen being played by the first terminal 101 according to the information sent by the second terminal 102.
  • the video server 104 may store a video file for sending a video stream to the first terminal 101 so that the first terminal 101 can play a video indicated by the video stream.
  • the video server 104 may be a video server in a video server cluster of an operator that performs video streaming interaction with the first terminal.
  • the operator's video server cluster consists of one or more scheduled video servers and multiple non-scheduled servers, and multiple non-scheduled servers can store the same video file.
  • the dispatch server receives the video stream request message from the first terminal 101, according to the information carried in the video stream request message, it dispatches an unscheduled non-scheduled video server that stores the target video file and is relatively idle.
  • the terminal 101 sends a video stream.
  • the video server receiving the video stream request message may also be a non-scheduled server, and the non-scheduled server sends a video stream to the first terminal 101.
  • the implementation of the present invention does not specifically limit which video server receives the video stream request message.
  • the first terminal 101 performs information interaction with the video server 104, it needs to be completed through the network exit of the proxy server. That is, when the devices in the local area network interact with the servers or devices in the external network, they need to use the network exit of the proxy server 103 to complete the information.
  • the network connection of the proxy server 103 is transmitted.
  • the first terminal 101 and the video server 104 support a streaming media transmission protocol.
  • the streaming media transmission protocol may be a hypertext streaming protocol (HLS), or a real-time streaming protocol RTP. It may be other streaming media transmission protocols, which are not specifically limited in this embodiment of the present invention.
  • the first terminal, the second terminal, and the proxy server are configured in the same local area network, and the proxy server serves as a medium for transmitting information between the first terminal and the second terminal, and may transmit information to the second
  • the terminal periodically forwards the video synchronization message of the first terminal so that the second terminal can play the same video picture synchronously with the first terminal.
  • FIG. 2 is a schematic structural diagram of a first terminal according to an embodiment of the present invention.
  • the first terminal 200 may have a large difference due to different configurations or performance, and may include one or more video codecs 201, one Or one or more processors (central processing units, CPUs) 202, one or more memories 203, one or more sensors 204, and transceivers 205, where the video codec 201 can perform digital video storage on the memory 203
  • the memory 203 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 202 to implement the methods performed by the first terminal side of each of the following method embodiments, and the sensor 204 may obtain the user ’s Head rotation information.
  • the transceiver may be a wired or wireless network interface, a keyboard, and an input / output interface for input and output.
  • the first terminal may further include other components for implementing device functions, and details are not described herein.
  • the first terminal has a display component, such as a display screen, for displaying a picture output by the video codec 201.
  • a computer-readable storage medium such as a memory including instructions, and the foregoing instructions may be executed by a processor in a first terminal to complete a video screen projection method in the following embodiments.
  • the computer-readable storage medium may be a read-only memory image (ROM), a random access memory (RAM), or a compact disc (read-only memory) (CD-ROM). , Tapes, floppy disks, and optical data storage devices.
  • FIG. 3 is a schematic structural diagram of a second terminal according to an embodiment of the present invention.
  • the second terminal 300 may have a large difference due to different configurations or performance, and may include one or more video codecs 301, one Or more than one processor 302 and one or more memory 303, wherein the video codec 301 can compress or decompress the digital video stored in the memory 303, and the memory 303 stores at least one instruction, The at least one instruction is loaded and executed by the processor 302 to implement the methods provided by the foregoing method embodiments.
  • the second terminal may also have components such as a wired or wireless network interface, a keyboard, and an input-output interface for input and output.
  • the second terminal may further include other components for implementing device functions, and details are not described herein.
  • the first terminal has a display component, such as a display screen, for displaying a picture output by the video codec 301.
  • a computer-readable storage medium such as a memory including instructions, and the foregoing instructions may be executed by a processor in the second terminal to complete the video screen projection method in the following embodiments.
  • the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
  • FIG. 4 is a schematic structural diagram of a proxy server according to an embodiment of the present invention.
  • the server 400 may have a large difference due to different configurations or performance, and may include one or more processors 401 and one or more memories 402.
  • the memory 402 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 401 to implement the methods provided by the foregoing method embodiments.
  • the server may also have components such as a wired or wireless network interface, a keyboard, and an input-output interface for input and output.
  • the server may also include other components for implementing device functions, and details are not described herein.
  • a computer-readable storage medium such as a memory including instructions, and the foregoing instructions may be executed by a processor in a proxy server to complete the video screen projection method in the following embodiments.
  • the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
  • the first terminal and the proxy server may support the same streaming media transmission protocol by default.
  • the proxy server may directly receive the video stream from the video server during the parsing process.
  • the HLS protocol is used to parse and match the video stream.
  • the following uses the first terminal and the proxy server to support the HLS protocol as an example to introduce the video projection method provided by the embodiment of the present invention.
  • FIG. 5 is a A flowchart of a video projection method. This embodiment may be performed based on the implementation environment shown in FIG. 1. Referring to FIG. 5, this embodiment includes:
  • a first terminal When a first terminal receives a video playback instruction, it sends a video stream request message to a proxy server, where the video stream request message carries video URL information.
  • the video playback instruction may be triggered by a user's video playback operation on the first terminal, and the playback operation may refer to a start operation of a game and a start playback operation of a video, which is not limited in this embodiment of the present invention.
  • the video stream request message is used to request a video stream corresponding to the video URL information from a video server, and return the video stream to the first terminal.
  • the value of the message type field of the video stream request message may be a first string, and the first string is used to indicate that the message is a video stream request message. It should be noted that the attributives such as "first" and "second" involved in the embodiments of the present invention are not used to distinguish the content of specific fields or character strings, but only to distinguish the fields or character strings of different requests.
  • the proxy server After the proxy server receives the video stream request message, send the video stream request message to the video server.
  • the proxy server is only used to forward the received message, and the received message may be a message sent by the first terminal or a message sent by the video server.
  • the video server sends a video stream to the proxy server based on the video stream request message.
  • the video server may obtain the video stream corresponding to the video URL information according to the video URL information in the video stream request message.
  • the proxy server After the proxy server receives the video stream, send the video stream to the first terminal.
  • the first terminal plays based on the received video stream based on the received video stream.
  • the above steps 501 to 505 describe the message interaction between the first terminal and the video server.
  • the messages exchanged by the first terminal and the proxy server are all forwarded by the proxy server.
  • the user can initiate a screen casting operation on the first terminal, so as to synchronize the currently playing video to another terminal for playback, thereby realizing screen casting.
  • the first terminal When the first terminal receives a screen casting instruction, it sends a screen casting request message to the proxy server, where the screen casting request message carries at least video URL information.
  • the screen projection request message may also carry information about the second terminal, such as the network protocol address of the second terminal or the identifier of the second terminal, so as to determine the target device for screen projection.
  • the value of the message type field of the screen request message may be a second character string, which is used to indicate that the message is a screen request message, and the screen request message is used to request that the first terminal be The played video stream is cast to the second terminal.
  • the first terminal is a VR terminal as an example for description
  • the screen projection request message may also carry head rotation information.
  • the head rotation information is used to indicate the current head rotation of the user of the first terminal, so that the second terminal plays the video screen synchronized with the first terminal according to the head rotation information, see steps 512 and 515.
  • the first terminal does not need to carry the head rotation information.
  • the proxy server After receiving the screen projection request message, the proxy server sends the screen projection request message to the second terminal.
  • the above steps 505 and 507 are implemented by the local forwarding function provided by the proxy server for the devices in the local area network, which is not described in this embodiment of the present invention.
  • the proxy server is only used to forward the received message, and the received message may be a message sent by the first terminal or a message sent by the video server.
  • the second terminal sends a screen casting proxy request message to the proxy server according to the received screen casting request message, where the screen casting proxy request message carries at least video URL information.
  • the stream information may include video URL information.
  • the stream information may also include the network protocol address of the first terminal, so that the proxy server may use the video URL information and the network protocol address of the first terminal. To match.
  • the value of the message type field of the screen proxy request message may be a third character string, which is used to indicate that the message is a screen proxy request message, and the screen proxy request message is used to request a proxy server. Project the video stream being played by the first terminal to the second terminal.
  • the first terminal does not need to send a video stream to the second terminal, but instead transfers the process of acquiring the video stream to a proxy server, which reduces the first terminal ’s Network pressure and power consumption.
  • the proxy server matches the video stream sent by the video server according to the network protocol address of the first terminal and the video URL information of the first video stream, and the video server is used to provide the first video stream.
  • the proxy server can receive the video stream sent by the video server, when the proxy server receives the screen proxy request message, the proxy server can parse the received video stream to obtain the target device of the video stream.
  • the network protocol address and video URL information are compared with the network protocol address of the first terminal and the video URL information of the first video stream and the parsed network protocol address and video URL information. When the network protocol address of the first terminal and When the video URL information of the first video stream is the same as the parsed network protocol address and video URL information, it indicates that the first video stream is matched.
  • the proxy server when the proxy server starts to monitor the data interaction between the first terminal and the video server, the proxy server can store the video stream sent by the video server to the first terminal, because the video URL information of the video stream and the video The data packets of the streams have a mapping relationship. Therefore, the proxy server can obtain the video stream indicated by the video URL information according to the video URL information.
  • the proxy server copies the first video stream, that is, the proxy server copies the video stream indicated by the video URL information according to the mapping relationship.
  • the second video stream is a video stream copied by a proxy server.
  • the attributive terms such as "first” and “second” involved in the embodiment of the present invention are not used to distinguish the content of the video stream, but only Distinguish between the original video stream and the copied video stream.
  • the proxy server sends the second video stream to the second terminal.
  • the second video stream is used for video playback on the second terminal.
  • the copying and forwarding of steps 510 and 511 may be real-time copying and forwarding, so as to ensure a small delay, so that the entire screen casting process can be performed smoothly.
  • the second terminal After the second terminal receives the second video stream, play it based on the second video stream.
  • the head rotation information when the second terminal plays a video based on the second video stream, the head rotation information also needs to be considered to ensure that the video picture played by the second terminal and the first terminal are playing.
  • the video picture is consistent. Therefore, after the first terminal initiates a screen casting, the video synchronization message of the first terminal can be sent to the second terminal, so that when the second terminal starts playing, it can directly perform synchronous playback based on the video synchronization message.
  • the video synchronization message includes stream information of the first video stream, playback progress, and head rotation information of the first terminal.
  • the first terminal periodically sends a video synchronization message to the proxy server.
  • the video synchronization message includes stream information of the first video stream.
  • the video synchronization message further includes playback progress and head rotation information of the first terminal. At least one.
  • the video synchronization message may include the following information contents: (1) playback progress and head rotation information of the first terminal, (2) including only playback progress, (3) only Including head rotation information of the first terminal.
  • this embodiment of the present invention does not limit this.
  • the first terminal may periodically send a video synchronization message to the second terminal.
  • the terminal can adjust the playback picture at any time based on the received video stream according to the content in the synchronization information forwarded by the proxy service, thereby synchronizing the video played by the second terminal with the video played by the first terminal.
  • the period in which the first terminal sends a synchronization message to the proxy server may be very short, and the period may be in the order of ms.
  • the proxy server After the proxy server receives the video synchronization message, send the video synchronization message to the second terminal.
  • the second terminal performs video playback based on the video synchronization message and the received video stream.
  • the second terminal may determine the picture being played by the first terminal according to the information carried in the video synchronization message (such as head rotation information and playback progress) and the received video stream, so that the second terminal synchronously plays the first terminal being played. Video, and then the second terminal and the first terminal play synchronously to achieve the purpose of casting a screen.
  • the information carried in the video synchronization message such as head rotation information and playback progress
  • the second terminal periodically adjusts the playback video picture according to the received video synchronization message to maintain synchronization with the video picture played by the first terminal.
  • the changed playback status may be carried in the video synchronization message.
  • the changed playback status may be carried in the playback progress field.
  • the second terminal may send a screen casting proxy request message to the proxy server again, so that the proxy server can rematch the video stream being played by the first terminal.
  • the matched video stream is copied, and the copied video stream is sent to the second terminal, so that the video played by the second terminal is synchronized with the video played by the first terminal, that is, the process of step 508 to step 515 is performed again. .
  • the screen casting end instruction may be triggered by a user's end operation, for example, when the user exits a video playback or a game application, the embodiment of the present invention does not limit how to trigger specifically.
  • the screen casting end request message is used to instruct the second terminal to stop screen casting.
  • the value of the message type field of the screen casting request message may be a fourth string, which is used to indicate that the message is a screen casting request message, and the screen casting request message is used to request a proxy server. End the screen.
  • the proxy server After receiving the screen projection end request message, the proxy server sends the screen projection end request message to the second terminal.
  • steps 516 to 517 are processes in which the proxy server forwards messages for the devices in the local area network, and details are not described herein.
  • the second terminal sends a screen projection proxy end request message to the proxy server based on the screen projection end request message, and the screen projection proxy end request message is used to request the proxy server to end the matching process for the first video stream.
  • the screen casting agent end request message carries the network protocol address of the first terminal.
  • the value of the message type field of the screen projection agent end request message may be a fifth string, which is used to indicate that the message is a screen projection agent end request message, and the screen projection agent end request message is used to request an agent The server ends casting.
  • the proxy server stops receiving the video stream matching request after receiving the screen casting proxy end request message.
  • the proxy server When the proxy server receives the screen casting proxy end request message, it can stop parsing the video stream sent by the video server, so that no video stream matching will be performed, so the proxy server no longer sends a second to the second terminal. The video stream, and then the screen casting of the first terminal on the second terminal ends.
  • the proxy server matches the video stream being played by the first terminal from the received video stream according to the network protocol address of the first terminal and the video URL information, and compares the video stream being played by the first terminal with the first server.
  • the video stream corresponding to the video being played by one terminal is sent to the second terminal, so that the second terminal can play the video indicated by the video stream.
  • the terminal sends a video stream, which reduces the network pressure and power consumption of the first terminal, avoids stuttering, and improves the screen projection quality.
  • the first terminal periodically sends a video synchronization message, so that the second terminal can play the video being played by the first terminal according to the video synchronization message, thereby improving the synchronization effect.
  • the first terminal and the proxy server support the HLS protocol as an example, and the proxy server can match the first video stream.
  • the proxy server may not be able to match.
  • the present invention provides a video projection method, as shown in FIG. 6.
  • FIG. 6 is a flowchart of a video projection method according to an embodiment of the present invention. This embodiment may be performed based on the implementation environment shown in FIG. 1. Referring to FIG. 6, this embodiment includes:
  • the first terminal When the first terminal receives a video playback instruction, it sends a video stream request message to the proxy server, where the video stream request message carries video URL information.
  • the proxy server After the proxy server receives the video stream request message, send the video stream request message to a video server.
  • the video server sends a video stream to the proxy server based on the video stream request message.
  • the proxy server After the proxy server receives the video stream, send the video stream to the first terminal.
  • the first terminal plays based on the received video stream based on the received video stream.
  • the first terminal When the first terminal receives the screen casting instruction, it sends a screen casting request message to the proxy server, where the screen casting request message carries at least video URL information.
  • the proxy server After receiving the screen projection request message, the proxy server sends the screen projection request message to the second terminal.
  • the second terminal sends a screen projection proxy request message to the proxy server according to the received screen projection request message, where the screen projection proxy request message carries at least video URL information.
  • the proxy server matches the video stream sent by the video server according to the network protocol address of the first terminal and the video URL information of the first video stream, and the video server is used to provide the first video stream.
  • the proxy server does not match the first video stream according to the screen projection request message, send a video stream request message to the video server, where the video stream request message carries video URL information,
  • the value of the message type field of the video stream request message may be a third string, which is used to indicate that the message is a video stream request message, and the video stream request message is used to request a video stream from a video server. .
  • the proxy server cannot match the first video stream. Since the first terminal uses the HLS protocol, it is likely that some video fragments are already stored on the first terminal, and the video URL information is constantly changing. Therefore, based on the video URL information carried in the current screen proxy request message, the above video fragments may not be found in the data received by the proxy server after the proxy is started. Therefore, the proxy server needs to download the corresponding video fragment from the video server. Video streaming data.
  • the proxy server can also store any received video stream during the work process, so that when receiving the screen proxy request message, it can be matched based on the pre-stored data.
  • every time Only the video streams within a preset duration are stored for example, only the video streams received within the last 5 seconds are stored, and the video stream beyond 5 minutes is deleted using the first-in-first-out principle.
  • the video server receives the video stream request message.
  • the video server After receiving the video stream request message, the video server sends a third video stream to the proxy server.
  • the third video stream is a video stream obtained by the video server based on the video URL information sent by the proxy server. And, the third video stream is a video stream being played by the first terminal.
  • the proxy server After the proxy server receives the third video stream, it sends the third video stream to the second terminal, and the third video stream is used for video playback on the second terminal.
  • the third video stream may be stored in the proxy server based on a mapping relationship between the video URL information and the video stream data packet.
  • Steps 609 to 613 are steps performed by the proxy server based on the stored video URL information that cannot be matched to the first video stream. Through these steps, the proxy server can obtain part of the video fragments that have been downloaded by the first terminal, avoiding data due to The lack of synchronization of the projection screen caused by the absence improves the projection effect and the quality of the projection screen.
  • the first terminal periodically sends a video synchronization message to the proxy server.
  • the video synchronization message includes stream information of the first video stream.
  • the video synchronization message further includes playback progress and head rotation information of the first terminal. Either.
  • the proxy server After the proxy server receives the video synchronization message, send the video synchronization message to the second terminal.
  • the second terminal performs video playback based on the video synchronization message and the received video stream.
  • the proxy server After receiving the screen projection end request message, the proxy server sends the screen projection end request message to the second terminal.
  • the second terminal sends a screen projection proxy end request message to the proxy server based on the screen projection end request message, and the screen projection proxy end request message is used to request the proxy server to end the matching process for the first video stream.
  • the proxy server stops matching the video stream after receiving the screen casting proxy end request message.
  • the proxy server may request the video server for the video stream being played by the first terminal based on the video URL information and the network protocol address of the video server, and send the video stream obtained based on the request To the second terminal, so that the second terminal can play the video indicated by the video stream, so as to achieve the purpose of synchronously playing the first terminal and the second terminal, and can avoid the proxy server being unable to match the video stream being played by the first terminal, resulting in
  • the screen is not synchronized, and the first terminal is prevented from sending a video stream to the second terminal, which reduces the network pressure and power consumption of the first terminal, avoids stuttering, and improves the quality of the screen.
  • the first terminal periodically sends a video synchronization message, so that the second terminal can play the video being played by the first terminal according to the video synchronization message, thereby improving the synchronization effect.
  • FIG. 7 is a flowchart of a video projection method provided by an embodiment of the present invention. This embodiment may be performed based on the implementation environment shown in FIG. 1. Referring to FIG. 7, this embodiment includes:
  • the first terminal When the first terminal receives a video playback instruction, it sends a video stream request message to the proxy server, where the video stream request message carries video URL information.
  • the proxy server After the proxy server receives the video stream request message, send the video stream request message to a video server.
  • the video server sends a video stream to the proxy server based on the video stream request message.
  • the proxy server After the proxy server receives the video stream, send the video stream to the first terminal.
  • the first terminal plays based on the received video stream based on the received video stream.
  • the first terminal When the first terminal receives a screen projection instruction, it sends a screen projection request message to the proxy server, where the screen projection request message carries a quintuple of the first video stream.
  • the proxy server After receiving the screen projection request message, the proxy server sends the screen projection request message to the second terminal.
  • the second terminal receives the screen projection request.
  • the second terminal sends a screen projection proxy request message to the proxy server according to the received screen projection request message, where the screen projection proxy request message carries a quintuple of the first video stream.
  • the proxy server receives the projection proxy request.
  • the proxy server matches the data stream sent by the video server according to the quintuple of the first video stream, and the video server is used to provide the first video stream.
  • the proxy server can receive the video stream sent by the video server, when the proxy server receives the screen proxy request message, the proxy server can parse the received video stream to obtain the quintuple of the video stream. , Comparing the quintuple of the first video stream in the projection proxy request message with the parsed quintuple. When they are the same, it means that the first video stream is matched.
  • the proxy server sends the second video stream to the second terminal.
  • the second terminal receives the second video stream.
  • the first terminal periodically sends a video synchronization message to the proxy server.
  • the video synchronization message includes stream information of the first video stream.
  • the video synchronization message further includes playback progress and head rotation information of the first terminal. Either.
  • the proxy server After the proxy server receives the video synchronization message, send the video synchronization message to the second terminal.
  • the second terminal receives the video synchronization message.
  • the second terminal performs video playback based on the video synchronization message and the received video stream.
  • the second terminal receives the screen casting end request message.
  • the second terminal sends a screen projection proxy end request message to the proxy server based on the screen projection end request message, and the screen projection proxy end request message is used to request the proxy server to end the matching process for the first video stream.
  • the proxy server receives the screen casting end request message.
  • the proxy server receives the screen casting proxy end request message, it stops matching the video stream.
  • steps 701 to 725 are the same as steps 601 to 621.
  • the difference is that the information carried in the interactive message to indicate that the first terminal is playing a video is a 5-tuple, and the other steps are not limited. .
  • the proxy server matches the video stream being played by the first terminal from the received video streams according to the quintuple, and will correspond to the video being played by the first terminal.
  • the video stream is sent to the second terminal, so that the second terminal can play the video indicated by the video stream, achieving the purpose of the first terminal and the second terminal to play synchronously, avoiding the first terminal sending the video stream to the second terminal, reducing the The network pressure and power consumption of a terminal can avoid stuttering, thereby improving the screen quality.
  • the first terminal periodically sends a video synchronization message, so that the second terminal can play the video being played by the first terminal according to the video synchronization message, thereby improving the synchronization effect.
  • FIG. 8 is an embodiment of the present invention A flowchart of a video projection method is provided. This embodiment may be performed based on the implementation environment shown in FIG. 1. Referring to FIG. 8, this embodiment includes:
  • the first terminal When the first terminal receives a video playback instruction, it sends a video stream request message to the proxy server, where the video stream request message carries video URL information.
  • the proxy server After the proxy server receives the video stream request message, send the video stream request message to the video server.
  • the video server sends a video stream to the proxy server based on the video stream request message.
  • the proxy server After the proxy server receives the video stream, send the video stream to the first terminal.
  • the first terminal plays based on the received video stream based on the received video stream.
  • the first terminal When the first terminal receives a screen casting instruction, send a screen casting request message to the proxy server, where the screen casting request message carries at least stream information and a protocol type field of the first video stream being played by the first terminal.
  • the protocol type field is used to indicate a streaming media transmission protocol adopted by the first terminal.
  • the first terminal may determine a value of a protocol type field according to a streaming media transmission protocol supported by the first terminal, and different values of the protocol type field correspond to different streaming media transmission protocols.
  • the protocol type field when the value of the protocol type field is 0, it indicates that the streaming media transmission protocol used by the first terminal is the HLS protocol. When the value of the protocol type field is 1, it indicates the streaming media used by the first terminal.
  • the transmission protocol is the RTP protocol.
  • the protocol type field may also be represented by other numerical values or character strings, which is not specifically limited in the embodiment of the present invention.
  • the proxy server After receiving the screen projection request message, the proxy server sends the screen projection request message to the second terminal.
  • the second terminal sends a screencasting proxy request message to the proxy server according to the received screencasting request message.
  • the screencasting proxy request message carries at least stream information and a protocol type field of the first video stream being played by the first terminal.
  • the proxy server determines a target streaming media transmission protocol according to a protocol type field in the projection agent request message.
  • the target streaming media transmission protocol is a streaming media transmission protocol used by the first terminal.
  • the protocol type field is different. The value corresponds to different streaming media transmission protocols.
  • the protocol type field may indicate a streaming media transmission protocol supported by the first terminal.
  • the streaming media transmission protocol adopted by the first terminal is an HLS protocol.
  • the streaming media transmission protocol adopted by the first terminal is an RTP protocol.
  • the proxy server matches the video stream sent by the video server based on the target streaming media transmission protocol, and the video server is used to provide the first video stream.
  • step 810 when the target streaming media transmission protocol is determined, the streaming information corresponding to the target streaming media transmission protocol can be extracted from the screen proxy request message, and the target streaming media transmission protocol is used.
  • the received video stream is parsed, and the parsed stream information is compared with the extracted stream information to perform the above matching process.
  • the proxy server when the protocol type field is 0, it means that the streaming media transmission protocol adopted by the first terminal is the HLS protocol, and the stream information of the first video stream is the first The network protocol address and video URL information of the terminal.
  • the proxy server may parse the received video stream, obtain the network protocol address and video URL information of the target device of the video stream, and obtain the network protocol address of the first terminal and the first URL.
  • the video URL information of a video stream is compared with the parsed network protocol address and video URL information.
  • the network protocol address of the first terminal and the video URL information of the first video stream are parsed with the parsed network protocol address and video URL, When the information is the same, it means that the first video stream is matched.
  • the proxy server When the proxy server receives the screen proxy request message, when the protocol type field is 1, it indicates that the streaming media transmission protocol used by the first terminal is the RTP protocol, which means that the streaming information of the first video stream is five yuan. Group, the proxy server can parse the received video stream to get the quintuple of the video stream, and compare the quintuple in the screen proxy request message with the parsed quintuple. When the same, It means that the first video stream is matched.
  • the proxy server sends the second video stream to the second terminal.
  • the first terminal periodically sends a video synchronization message to the proxy server.
  • the video synchronization message includes stream information of the first video stream.
  • the video synchronization message further includes playback progress and head rotation information of the first terminal. Either.
  • the proxy server After the proxy server receives the video synchronization message, it periodically sends the video synchronization message to the second terminal.
  • the second terminal performs video playback based on the video synchronization message and the received video stream.
  • the proxy server After receiving the screen projection end request message, the proxy server sends the screen projection end request message to the second terminal.
  • the second terminal sends a screen projection proxy end request message to the proxy server based on the screen projection end request message, and the screen projection proxy end request message is used to request the proxy server to end the matching process for the first video stream.
  • the proxy server When the proxy server receives the screen casting proxy end request message, it stops matching the video stream.
  • the proxy server may not be able to match the first video because the video fragments already stored by the first terminal are not downloaded at the initial stage of the proxy. flow.
  • steps 610 to 612 need to be performed so that the second terminal can play the third video stream.
  • the proxy server matches the video stream being played by the first terminal from the received video stream according to the network protocol address of the first terminal and the video stream information, and will match
  • the video stream corresponding to the video being played by the first terminal is sent to the second terminal, so that the second terminal can play the video indicated by the video stream.
  • the two terminals send video streams, which reduces the network pressure and power consumption of the first terminal, avoids stutters, and improves the quality of the screen.
  • the first terminal periodically sends a video synchronization message, so that the second terminal can play the video being played by the first terminal according to the video synchronization message, thereby improving the synchronization effect.
  • the proxy server may use different parsing strategies according to the protocol type field in the request information of the screen-casting proxy to implement adaptive and differentiated processing for different streaming media transmission protocols.
  • FIG. 9 is a schematic structural diagram of a video projection device according to an embodiment of the present invention.
  • the device includes a first receiving module 901, a matching module 902, an obtaining module 903, and a first sending module 904.
  • the obtaining module 903 is configured to perform the foregoing step 712;
  • the first sending module 904 is configured to perform the foregoing step 713.
  • the first video stream is an RTP stream
  • the stream information of the first video stream includes a five-tuple, see step 706.
  • the stream information of the first video stream includes video URL information, see step 606.
  • the device further includes:
  • a second sending module configured to execute the foregoing step 610
  • a second receiving module configured to execute the above step 611;
  • the third sending module is configured to perform the foregoing step 612.
  • the stream information of the first video stream further includes a network protocol address of the first terminal.
  • the device further includes:
  • a determining module configured to execute the foregoing step 809;
  • the execution module is configured to execute the above step 810.
  • the device further includes:
  • the third receiving module is configured to perform the foregoing step 717.
  • the device further includes:
  • a fourth receiving module configured to execute the foregoing step 724
  • the stopping module is configured to perform the above step 725.
  • FIG. 10 is a schematic structural diagram of a video projection device according to an embodiment of the present invention.
  • the device includes a first receiving module 1001, a first sending module 1002, a second receiving module 1003, a third receiving module 1004, and a playback module 1005.
  • the playing module 1005 is configured to perform the foregoing step 719.
  • the first video stream is an RTP stream
  • the stream information of the first video stream includes a five-tuple. See step 706.
  • the stream information of the first video stream includes video URL information, see step 606.
  • the stream information of the first video stream further includes a network protocol address of the first terminal.
  • the protocol type field of the screen casting proxy request message is used to indicate the streaming media transmission protocol used by the first terminal, see step 809.
  • the device further includes:
  • a fourth receiving module configured to perform the foregoing step 722;
  • the second sending module is configured to perform the foregoing step 723.
  • the video screen projection device provided in the foregoing embodiment performs screen projection on a video
  • only the division of the foregoing functional modules is used as an example.
  • the above functions may be allocated by different functions according to needs.
  • the module is completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the video projection device and the video projection method embodiment provided by the foregoing embodiments belong to the same concept. For specific implementation processes, refer to the method embodiment, and details are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种视频投屏方法、装置、计算机设备及存储介质,属于视频技术领域。该方法包括:代理服务器接收第二终端的投屏代理请求消息,该投屏代理请求消息至少携带该第一终端正在播放的第一视频流的流信息;从已接收到的视频流中匹配视频服务器向该第一终端发送的数据流;当匹配到该第一视频流时,对该第一视频流进行复制;将复制的视频流发送至第二终端。本发明通过代理服务器从已接收到的视频流中匹配到该第一终端正在播放的视频流,并将与第一终端正在播放的视频对应的视频流发送至第二终端,使得第一终端与第二终端同步播放,避免了第一终端向第二终端发送视频流,降低了第一终端的网络压力及功耗,避免了卡顿,从而提高了投屏质量。

Description

视频投屏方法、装置、计算机设备及存储介质 技术领域
本发明涉及视频技术领域,特别涉及一种视频投屏方法、设备、计算机设备及存储介质。
背景技术
随着科技的进步,虚拟现实(virtual reality,VR)终端作为一种个人佩戴设备,被广泛应用在生活中,由于体积的限制,VR终端无法满足多人同时观看视频的需求,因此需要投屏技术,将VR终端的视频影像投放至其他能够实现多人同时观看视频的屏幕上。
现在的投屏技术可以是以机顶盒作为视频投放方来进行投屏的,其投屏过程可以是如下过程:VR终端向视频服务器发送视频数据请求,该视频请求携带VR终端的网络协议地址、视频统一资源定位符(uniform resource locator,URL)信息、视频服务器的网络协议地址;视频服务器根据视频请求携带的信息,向该VR终端发送视频流;该VR终端接收该视频流后,播放该视频流指示的视频;该VR终端向机顶盒发送投屏请求,该投屏请求携带视频流、播放进度以及头部转动信息;该机顶盒根据接收的投屏请求携带的信息,播放该VR终端正在播放的视频。
但是在上述投屏过程中,该VR终端不仅需要接收视频流,还需要向机顶盒发送视频流,增加了该VR终端的网络压力以及功耗,当该VR终端的网络压力过高时,VR终端播放的视频会出现卡顿的情况,那么在机顶盒上播放的视频也会出现卡顿的情况,从而降低了投屏质量。
发明内容
本发明实施例提供了一种视频投屏方法、设备、计算机设备及存储介质,能够解决第一终端投屏卡顿以及第一终端的网络压力和功耗过大的问题。该技术方案如下:
第一方面,提供了一种视频投屏方法,应用于代理服务器,该代理服务器与第一终端和第二终端处于同一个局域网中,该方法包括:
接收第二终端的投屏代理请求消息,该投屏代理请求消息至少携带该第一终端正在播放的第一视频流的流信息;
根据该第一视频流的流信息,匹配视频服务器向该第一终端发送的数据流,该视频服务器用于提供该第一视频流;
当匹配到该第一视频流时,对该第一视频流进行复制,以获取该第二视频流;
将该第二视频流发送至该第二终端,该第二视频流用于在该第二终端进行视频播放。
在一种可能实现方式中,该第一视频流为实时传输协议(real-time transport protocol,RTP)流,该第一视频流的流信息包括五元组。
在一种可能实现方式中,该第一视频流的URL信息。
基于以上两种可能实现方式,说明该第一终端可以支持多种流媒体传输协议,提高了第一终端的适用性能,该第一终端具有普适性。
在一种可能实现方式中,该投屏代理请求消息还包括该视频服务器的网络协议地址,该方法还包括:
当未匹配到该第一视频流时,根据该第二终端的投屏代理请求消息,向视频服务器发送视频流请求消息,该视频流请求消息携带视频URL信息;
接收第三视频流,该第三视频流为该视频URL信息对应的视频流;
将该第三视频流发送至该第二终端。
基于上述可能的实现方式,可以避免代理服务器因为无法匹配到第一终端正在播放的视频流,而造成在投屏不同步现象,提高了同步效果。
在一种可能实现方式中,该第一视频流的流信息还包括该第一终端的网络协议地址。
基于上述可能实现方式,代理服务器可以同时为多个第一终端提供代理投屏服务,提高了代理服务器的使用效率。
在一种可能实现方式中,该根据该第一视频流的流信息,匹配视频服务器向该第一终端发送的数据流之前,该方法还包括:
根据该投屏代理请求消息中的协议类型字段,确定目标流媒体传输协议,该目标流媒体传输协议为该第一终端所采用的流媒体传输协议,该协议类型字段的不同取值对应于不同的流媒体传输协议;
基于该目标流媒体传输协议,执行根据该第一视频流的流信息,匹配视频服务器向该第一终端发送的数据流的步骤。
基于上述可能的实现方式,代理服务器可以根据投屏代理请求信息中的协议类型字段,来实现针对不同流媒体传输协议视频的自适应、差异化处理。
在一种可能实现方式中,该方法还包括:
接收该第一终端周期性发送的视频同步消息,将该视频同步消息转发至该第二终端,该视频同步消息包括该第一视频流的流信息,该视频同步消息还包括播放进度和该第一终端的头部转动信息中至少一项。
基于上述可能实现方式,周期性发送视频同步信息,使得第二终端可以根据该视频同步信息,实时调整播放的视频画面,以便第二终端播放的视频画面与第一终端播放的视频画面同步,从而提高了同步效果。
在一种可能实现方式中,该方法还包括:
接收该第二终端的投屏代理结束请求消息,该投屏代理结束请求消息用于请求该代理服务器结束对该第一视频流的匹配过程;
停止对该视频服务器向该第一终端发送的数据流进行匹配。
基于上述可能实现方式,以便该投屏过程可以随时结束,从而避免不必要的持续投屏,例如,在无人观看投屏画面时。
第二方面,提供了一种视频投屏方法,应用于第二终端,该第二终端与代理服务器以及第一终端处于同一个局域网中,该方法包括:
接收该第一终端的投屏请求消息,该投屏请求消息至少携带该第一终端正在播放的第一视频流的流信息;
向该代理服务器发送投屏代理请求消息,该投屏代理请求消息至少携带该第一终端正在播放的第一视频流的流信息;
接收该代理服务器发送的第二视频流,该第二视频流为对该代理服务器所接收到的该第一视频流复制得到;
接收该第一终端发送的视频同步消息,该视频同步消息包括该第一视频流的流信息,该视频同步消息还包括播放进度和该第一终端的头部转动信息中任一项;
基于该视频同步消息和该第二视频流进行视频播放。
在一种可能实现方式中,该方法还包括:
接收该第一终端的投屏结束请求消息;
向该代理服务器发送投屏代理结束请求消息,该投屏代理结束请求消息用于请求该代理服务器结束对该第一视频流的匹配过程。
基于上述可能实现方式,以便该投屏过程可以随时结束,从而避免不必要的持续投屏,例如,在无人观看投屏画面时。
第三方面,提供了一种视频投屏装置,用于执行上述视频投屏方法。具体地,该视频投屏装置包括用于执行上述第一方面或上述第一方面的任一种可选方式提供的视频投屏方法的功能模块,其中,该上述方面为应用于代理服务器的一种视频投屏方法所对应的方面。
第四方面,提供了一种视频投屏装置,用于执行上述视频投屏方法。具体地,该视频投屏装置包括用于执行上述第二方面或上述第二方面的任一种可选方式提供的视频投屏方法的功能模块,其中,该上述方面为应用于第二终端的一种视频投屏方法所对应的方面。
一方面,提供一种计算机设备,该计算机设备包括处理器和存储器,该存储器中存储有至少一条指令,该指令由该处理器加载并执行以实现如上述视频投屏方法所执行的操作。
一方面,提供一种计算机可读存储介质,该存储介质中存储有至少一条指令,该指令由处理器加载并执行以实现如上述视频投屏方法所执行的操作。
本发明实施例提供的技术方案带来的有益效果是:
通过代理服务器根据第一终端的网络协议地址以及视频流的流信息,从已接收到的视频流中匹配到该第一终端正在播放的视频流,并将与第一终端正在播放的视频对应的视频流发送至第二终端,以便第二终端可以播放该视频流指示的视频,达到第一终端与第二终端同步播放的目的,避免了第一终端向第二终端发送视频流,降低了第一终端的网络压力以及功耗,避免了卡顿,从而提高了投屏质量。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种视频投屏实施环境的示意图;
图2是本发明实施例提供的第一终端的结构示意图;
图3是本发明实施例提供的一种第二终端的结构示意图;
图4是本发明实施例提供的一种代理服务器的装置结构示意图;
图5是本发明实施例提供的一种视频投屏方法流程图;
图6是本发明实施例提供的一种视频投屏方法流程图;
图7是本发明实施例提供的一种视频投屏方法流程图;
图8是本发明实施例提供的一种视频投屏方法流程图;
图9是本发明实施例提供的一种视频投屏装置的结构示意图;
图10是本发明实施例提供的一种视频投屏装置的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
图1是本发明实施例提供的一种视频投屏实施环境的示意图。参见图1,该实施环境中包括:第一终端101、第二终端102、代理服务器103以及视频服务器104。其中,第一终端101、第二终端102以及代理服务器103在同一个局域网内,第一终端101通过无线网连接第二终端102、代理服务器103以及视频服务器104,代理服务器103可以通过网线连接第二终端。
第一终端101,是用于播放视频的终端,可以播放运营商的视频服务器所提供的视频,该视频可以是电影、电视剧、游戏视频或者实时聊天视频等。在本发明实施例中,第一终端可以作为投屏的发起者,其播放的视频可以作为投屏目标。该第一终端可以是VR终端,用于播放VR视频,而VR视频主要提供以人眼为中心点,围绕上下180度、水平360度无缝衔接的全景影像,视频服务器104向第一终端101传输视频流时,视频服务器104会将360度环绕画面全部都推送给第一终端101,再由第一终端101负责跟踪用户视角的变化、即时完成画面投影和显示工作,所以VR视频观看过程中会随时变换视角,也就需要第一终端101向代理服务器103周期性发送视频同步消息,以便第二终端102根据代理服务器103转发的该视频同步消息,来播放第一终端101正在播放的视频画面,以达到同步的目的。当然,第一终端也可以是其他可以播放视频的终端,对此本发明实施例不做具体限定。该第一终端101可以为一体机,可以是运营商云VR业务的用户终端,可选地,该第一终端101可以为VR眼镜。
第二终端102,是具有视频播放能力的终端,可以根据接收的视频流,播放该视频流指示的视频。在本发明实施例中,第二终端102可以用于投屏显示。第二终端102可以向代理服务器103发送投屏代理请求,并根据代理服务器103周期性转发的视频同步消息,以及代理服务器103发送的视频流,播放第一终端101正在播放的视频画面,完成投屏显示。当然,该第二终端也可以是其他用于播放视频的终端,只要能完成投屏显示即可,本发明实施例不 做具体限定。该第二终端102可以是运营商宽带电视业务的用户终端,例如机顶盒。
代理服务器103,是局域网的统一网络出口,可以作为第二终端102的代理服务器,负责向第二终端102转发第一终端101发送的信息,以及将匹配到的第一终端101正在播放的视频流,发送至第二终端102,以便第二终端102可以根据其发送的信息,播放第一终端101正在播放的视频画面。
视频服务器104,可以存储视频文件,用于向第一终端101发送视频流,以便第一终端101可以播放该视频流指示的视频。视频服务器104可以是运营商的视频服务器集群中,与第一终端进行视频流交互的视频服务器。运营商的视频服务器集群,由一个或多个调度视频服务器以及多个非调度服务器组成,并且多个非调度服务器可以存储同一份视频文件。当调度服务器接收到第一终端101的视频流请求消息时,根据视频流请求消息中携带的信息,调度出存储目标视频文件且较为空闲的非调度视频服务器,由该非调度视频服务器向第一终端101发送视频流。当然,接收视频流请求消息的视频服务器也可以是非调度服务器,由该非调度服务器向第一终端101发送视频流。本发明实施对哪个视频服务器接收视频流请求消息,不作具体限定。
需要说明的是,当第一终端101与视频服务器104进行信息交互时,需要通过代理服务器的网络出口来完成。也即是,局域网内的设备与外网中的服务器或者设备,进行信息交互时,需要借助代理服务器103的网络出口来完成,例如,视频服务器104向第一终端101推送视频流时,需要通过代理服务器103的网络连接来传输。
另外,第一终端101与视频服务器104支持流媒体传输协议,该流媒体传输协议可以是超文本流媒体传输协议(hypertext transfer protocol live streaming,HLS),也可以是实时流媒体传输协议RTP,也可以是其他流媒体传输协议,本发明实施例对此不进行具体限定。
本发明实施例所提供的实施环境中,上述第一终端、第二终端以及代理服务器配置在同一个局域网内,代理服务器作为第一终端与第二终端之间的信息传递媒介,可以向第二终端周期性转发第一终端的视频同步消息,以便第二终端可以与第一终端,同步播放同一个视频画面。
以上是对本发明提出的视频投屏方法的实施环境和各个参与设备的简单描述,对于图1中所涉及的终端以及代理服务器的硬件实现,做如下描述:
图2是本发明实施例提供的一种第一终端的结构示意图,该第一终端200可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的视频编解码器201,一个或一个以上处理器(central processing units,CPU)202,一个或一个以上的存储器203、一个或一个以上的传感器204以及收发器205,其中,该视频编码解码器201可以对存储器203存储的数字视频,进行解码,该存储器203中存储有至少一条指令,该至少一条指令由该处理器202加载并执行以实现下述各个方法实施例第一终端侧所执行的方法,该传感器204可以获取用户的头部转动信息。该收发器可以为有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该第一终端还可以包括其他用于实现设备功能的部件,在此不做赘述。当然,该第一终端具有显示部件,例如显示屏等,用以对视频编解码器201所输出的画面进行显示。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,上述指令可由第一终端中的处理器执行以完成下述实施例中视频投屏方法。例如,该计算机可读存储介质可以是只读存储器镜像(read only memory image,ROM)、随机存取存储器(random access memory,RAM)、只读光盘(compact disc read-only memory,CD-ROM)、磁带、软盘和光数据存储设备等。
图3是本发明实施例提供的一种第二终端的结构示意图,该第二终端300可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的视频编解码器301,一个或一个以上处理器302,以及一个或一个以上的存储器303,其中,该视频编码解码器301,可以对存储器303存储的数字视频,进行压缩或者解压缩,该存储器303中存储有至少一条指令,该至少一条指令由该处理器302加载并执行以实现上述各个方法实施例提供的方法。当然,该第二终端还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该第二终端还可以包括其他用于实现设备功能的部件,在此不做赘述。当然,该第一终端具有显示部件,例如显示屏等,用以对视频编解码器301所输出的画面进行显示。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,上述指令可由该第二终端中的处理器执行以完成下述实施例中视频投屏方法。例如,该计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
图4是本发明实施例提供的一种代理服务器的结构示意图,该服务器400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器401和一个或一个以上的存储器402,其中,该存储器402中存储有至少一条指令,该至少一条指令由该处理器401加载并执行以实现上述各个方法实施例提供的方法。当然,该服务器还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器还可以包括其他用于实现设备功能的部件,在此不做赘述。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,上述指令可由代理服务器中的处理器执行以完成下述实施例中视频投屏方法。例如,该计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
第一终端、代理服务器可以默认支持同一种流媒体传输协议,例如,当第一终端、代理服务器均支持HLS协议时,则代理服务器在接收到视频服务器的视频流时,在解析过程中可以直接采用HLS协议对视频流进行解析和匹配,下面就以第一终端、代理服务器均支持HLS协议为例,对本发明实施例提供的视频投屏方法进行介绍,图5是本发明实施例提供的一种视频投屏方法流程图,该实施例可以基于图1所示的实施环境进行。参见图5,该实施例包括:
501、当第一终端接收到视频播放指令时,向代理服务器发送视频流请求消息,该视频流请求消息携带视频URL信息。
该视频播放指令可以由用户在该第一终端上对视频的播放操作触发,该播放操作可以是指对游戏的启动操作以及对视频的开始播放操作,本发明实施例对此不做限定。该视频流请求消息用于向视频服务器请求该视频URL信息对应的视频流,并将该视频流返回给第一终端。
其中,该视频流请求消息的消息类型字段的取值可以为第一字符串,该第一字符串用于 指示该消息为视频流请求消息。需要说明的是,本发明实施例所涉及的“第一”“第二”等定语均不用于对具体字段或是字符串的内容进行区分,而仅仅是区分不同请求的字段或字符串。
502、当该代理服务器接收到该视频流请求消息后,向视频服务器发送该视频流请求消息。
需要说明的是,在当前阶段,该代理服务器仅用于转发接收的消息,该接收的消息可以是第一终端发送的消息,也可以是视频服务器发送的消息。
503、该视频服务器基于该视频流请求消息,向该代理服务器发送视频流。
在本发明实施例中,该视频服务器可以根据视频流请求消息中的视频URL信息,获取该视频URL信息对应的视频流。
504、当该代理服务器接收到该视频流后,向该第一终端发送该视频流。
505、该第一终端根据接收的视频流,基于该视频流进行播放。
上述步骤501-505是对第一终端和视频服务器之间的报文交互的描述,在该过程中,第一终端和代理服务器所交互的报文均通过代理服务器进行转发。而在第一终端基于该视频流播放视频时,用户可以在第一终端上发起投屏操作,以便将当前播放视频同步到另一终端上进行播放,实现投屏。
506、当该第一终端接收到投屏指令时,向该代理服务器发送投屏请求消息,该投屏请求消息至少携带视频URL信息。
当然,该投屏请求消息中还可以携带第二终端的信息,例如第二终端的网络协议地址或第二终端的标识,以便确定投屏的目标设备。
其中,该投屏请求消息的消息类型字段的取值可以为第二字符串,该第二字符串用于指示该消息为投屏请求消息,该投屏请求消息用于请求将第一终端正在播放的视频流投屏至第二终端。
需要注意的是,本发明实施例以第一终端是VR终端为例进行说明,那么该投屏请求消息还可以携带头部转动信息。该头部转动信息用于表示当前第一终端用户的头部转动情况,以便第二终端根据该头部转动信息,播放与第一终端同步的视频画面,见步骤512与515。当然,该第一终端也可以不必携带头部转动信息。
507、该代理服务器在接收到投屏请求消息后,向第二终端发送该投屏请求消息。
上述步骤505和步骤507均为代理服务器为局域网内的设备所提供的本地转发功能来实现,本发明实施例对此不做赘述。
需要说明的是,在当前阶段,该代理服务器仅用于转发接收的消息,该接收的消息可以是第一终端发送的消息,也可以是视频服务器发送的消息。
508、第二终端根据接收的投屏请求消息,向代理服务器发送投屏代理请求消息,该投屏代理请求消息至少携带视频URL信息。
对于视频流的流信息来说,该流信息可以包括视频URL信息,当然,该流信息还可以包括第一终端的网络协议地址,以使得代理服务器根据视频URL信息以及第一终端的网络协议地址来进行匹配。
其中,该投屏代理请求消息的消息类型字段的取值可以为第三字符串,该第三字符串用于指示该消息为投屏代理请求消息,该投屏代理请求消息用于请求代理服务器将第一终端正在播放的视频流投屏至第二终端。
由步骤505至508,可以知道,在本次投屏过程中第一终端不需要向第二终端发送视频流,而是将视频流获取的过程转移到代理服务器上来进行,降低了第一终端的网络压力以及功耗。
509、该代理服务器根据该第一终端的网络协议地址以及该第一视频流的视频URL信息,对视频服务器发送的视频流进行匹配,该视频服务器用于提供该第一视频流。
由于代理服务器能够接收到视频服务器所发送的视频流,因此,当该代理服务器接收到投屏代理请求消息后,代理服务器可以对所接收到的视频流进行解析,得到该视频流的目标设备的网络协议地址以及视频URL信息,将第一终端的网络协议地址以及该第一视频流的视频URL信息与解析得到的网络协议地址和视频URL信息进行比对,当第一终端的网络协议地址以及该第一视频流的视频URL信息与解析得到的网络协议地址和视频URL信息相同时,则说明匹配到了第一视频流。
510、当该代理服务器匹配到该第一视频流时,对该第一视频流进行复制,以获取第二视频流。
需要说明的是,当代理服务器开始监控第一终端与视频服务器之间的数据交互时,该代理服务器可以存储视频服务器向第一终端发送的视频流,由于该视频流的视频URL信息与该视频流的数据包存在映射关系,因此,代理服务器可以根据该视频URL信息,获取该视频URL信息指示的视频流。
所以该代理服务器对该第一视频流进行复制,也即是,代理服务器根据上述映射关系,对该视频URL信息所指示的视频流进行复制。
需要注意的是,该第二视频流为代理服务器复制得到的视频流,本发明实施例所涉及的“第一”“第二”等定语均不用于对视频流的内容进行区分,而仅仅是区分原视频流和复制得到的视频流。
511、该代理服务器将该第二视频流发送至该第二终端。
其中,该第二视频流用于在该第二终端进行视频播放。
上述步骤510和步骤511的复制和转发可以是实时复制实时转发,以保证较小的延时,使得整个投屏过程能够顺畅进行。
512、当该第二终端接收到该第二视频流后,基于该第二视频流进行播放。
需要注意的是,对于本发明实施例而言,第二终端基于第二视频流播放视频时,还需要考虑头部转动信息,以保证该第二终端播放的视频画面,与第一终端正在播放的视频画面一致。因此,第一终端在发起投屏后,可以将第一终端的视频同步消息发送给第二终端,从而在第二终端开始播放时,可以直接基于该视频同步消息进行同步播放。该视频同步消息包括该第一视频流的流信息、播放进度以及该第一终端的头部转动信息。
513、该第一终端向该代理服务器周期性发送视频同步消息,该视频同步消息包括该第一视频流的流信息,该视频同步消息还包括播放进度和该第一终端的头部转动信息中至少一项。
其中,该视频同步消息除了流信息以外,还可以包括的信息内容有以下几种:(1)播放进度和该第一终端的头部转动信息,(2)仅包括播放进度,(3)仅包括第一终端的头部转动信息。对于上述任一种信息内容,本发明实施例对此不做限定。
由于VR视频在播放过程头部转动消息会随时发生变化,以及第一终端播放视频时可能会出现暂停、快进、快退等情况,所以第一终端可以周期性发送视频同步消息,以便第二终端 根据代理服务转发的同步信息中的内容,可以基于接收到的视频流来随时调节播放画面,进而使第二终端播放的视频与第一终端播放的视频同步。为了达到视频同步播放的效果,第一终端向代理服务器发送同步消息的周期可以非常短,该周期可以是ms级。
514、当该代理服务器接收到该视频同步消息后,向第二终端发送该视频同步消息。
515、第二终端基于该视频同步消息和接收到的视频流进行视频播放。
第二终端可以根据视频同步消息中所携带的信息(例如头部转动信息和播放进度)以及接收的视频流,来确定第一终端正在播放的画面,使第二终端同步播放第一终端正在播放的视频,进而实现第二终端与第一终端的同步播放,达到投屏的目的。
需要注意的是,当第二终端周期性接收到该的视频同步消息后,第二终端根据接收的该视频同步消息,周期性调整播放视频画面,以保持与第一终端播放的视频画面同步。
当第一终端的播放状态切换至快进、快退或者暂停时,可以在视频同步消息携带改变后的播放状态,例如,可以在播放进度字段中携带改变后的播放状态,当第二终端根据该视频同步消息,获知第一终端的播放状态改变时,该第二终端可以再次向代理服务器发送投屏代理请求消息,以便代理服务器可以重新匹配到该第一终端正在播放的视频流,对该匹配到的视频流进行复制,将复制的视频流发送至该第二终端,以便第二终端播放的视频与该第一终端播放的视频同步,也即是,再次进行步骤508至步骤515的过程。
516、当该第一终端接收到投屏结束指令时,向代理服务器发送投屏结束请求消息。
该投屏结束指令可以由用户的结束操作触发,例如,当用户退出视频播放或者游戏应用时触发,本发明实施例对具体如何触发不做限定。其中,该投屏结束请求消息用于指示第二终端停止投屏。
其中,该投屏结束请求消息的消息类型字段的取值可以为第四字符串,该第四字符串用于指示该消息为投屏结束请求消息,该投屏结束请求消息用于请求代理服务器结束投屏。
517、该代理服务器接收到该投屏结束请求消息后,向该第二终端发送该投屏结束请求消息。
上述步骤516至517为代理服务器为局域网内的设备进行消息转发的过程,在此对该过程不做赘述。
518、该第二终端基于该投屏结束请求消息,向该代理服务器发送投屏代理结束请求消息,该投屏代理结束请求消息用于请求该代理服务器结束对该第一视频流的匹配过程。
其中,该投屏代理结束请求消息携带该第一终端的网络协议地址。该投屏代理结束请求消息的消息类型字段的取值可以为第五字符串,该第五字符串用于指示该消息为投屏代理结束请求消息,该投屏代理结束请求消息用于请求代理服务器结束投屏。
519、该代理服务器接收到该投屏代理结束请求消息,停止进行视频流的匹配。
该代理服务器接收到该投屏代理结束请求消息时,可以停止对该视频服务器发送的视频流进行解析,也就不会进行视频流的匹配,从而该代理服务器不再向第二终端发送第二视频流,进而第一终端在第二终端上的投屏结束。
本申请实施例提供的投屏方法,通过代理服务器根据第一终端的网络协议地址以及视频URL信息,从已接收到的视频流中匹配到该第一终端正在播放的视频流,并将与第一终端正在播放的视频对应的视频流发送至第二终端,以便第二终端可以播放该视频流指示的视频,达到第一终端与第二终端同步播放的目的,避免了第一终端向第二终端发送视频流,降低了 第一终端的网络压力以及功耗,避免了卡顿,从而提高了投屏质量。进一步地,第一终端周期性发送视频同步消息,以便第二终端可以根据视频同步消息来播放第一终端正在播放的视频,进而提高了同步效果。
上述实施例为以第一终端、代理服务器均支持HLS协议为例,且代理服务器可以匹配到第一视频流进行介绍的,但是当第一终端、代理服务器均支持HLS协议,代理服务器可能无法匹配到第一视频流,针对此种情况,本发明提供一种视频投屏方法,如图6所示。
图6是本发明实施例提供的一种视频投屏方法流程图,该实施例可以基于图1所示的实施环境进行。参见图6,该实施例包括:
601、当第一终端接收到视频播放指令时,向代理服务器发送视频流请求消息,该视频流请求消息携带视频URL信息。
602、当该代理服务器接收到该视频流请求消息后,向视频服务器发送该视频流请求消息。
603、该视频服务器基于该视频流请求消息,向该代理服务器发送视频流。
604、当该代理服务器接收到该视频流后,向该第一终端发送该视频流。
605、该第一终端根据接收的视频流,基于该视频流进行播放。
606、当该第一终端接收到投屏指令时,向该代理服务器发送投屏请求消息,该投屏请求消息至少携带视频URL信息。
607、该代理服务器在接收到投屏请求消息后,向第二终端发送该投屏请求消息。
608、第二终端根据接收的投屏请求消息,向代理服务器发送投屏代理请求消息,该投屏代理请求消息至少携带视频URL信息。
609、该代理服务器根据该第一终端的网络协议地址以及该第一视频流的视频URL信息,对视频服务器发送的视频流进行匹配,该视频服务器用于提供该第一视频流。
610、当该代理服务器根据该投屏请求消息,未匹配到第一视频流时,向该视频服务器发送视频流请求消息,该视频流请求消息携带视频URL信息,
其中,该视频流请求消息的消息类型字段的取值可以为第三字符串,该第三字符串用于指示该消息为视频流请求消息,该视频流请求消息用于向视频服务器请求视频流。
基于步骤609的匹配,该代理服务器无法匹配到第一视频流,由于第一终端采用了HLS协议,因此,第一终端上很可能已经存储有一些视频分片,而由于视频URL信息是不断变化的,因此,基于当前投屏代理请求消息中所携带的视频URL信息,可能无法在代理服务器开始代理后所接收到的数据中找到上述视频分片,因此,需要代理服务器从视频服务器下载对应的视频流数据。
需要说明的是,代理服务器还可以在工作过程中,对任一个接收到的视频流均进行存储,以便在接收到投屏代理请求消息时能够基于预先存储的数据来进行匹配,当然,可以每次仅存储预设时长内的视频流,例如,仅存储近5秒内所接收的视频流,采用先进先出的原则,将5分钟以外的视频流进行删除。
611、该视频服务器接收该视频流请求消息。
612、当该视屏服务器接收到该视频流请求消息后,向该代理服务器发送第三视频流。
其中,该第三视频流为视频服务器基于该代理服务器发送的视频URL信息所获取的视频流。并且,该第三视频流为第一终端正在播放的视频流。
613、当该代理服务器接收到该第三视频流后,将该第三视频流发送至该第二终端,该第 三视频流用于在该第二终端进行视频播放。
需要说明的是,该第三视频流可以基于视频URL信息与视频流数据包之间的映射关系,被存储在该代理服务器中。
步骤609至613为代理服务器基于存储的视频URL信息无法匹配到第一视频流所执行的步骤,通过这些步骤,使得代理服务器可以获取到第一终端已经下载的部分视频分片,避免了由于数据缺失而造成的投屏不同步现象,提高了投屏效果与投屏质量。
614、当该第二终端接收到该第三视频流后,基于该第三视频流进行播放。
615、该第一终端向该代理服务器周期性发送视频同步消息,该视频同步消息包括该第一视频流的流信息,该视频同步消息还包括播放进度和该第一终端的头部转动信息中的任一项。
616、当该代理服务器接收到该视频同步消息后,向第二终端发送该视频同步消息。
617、第二终端基于该视频同步消息和接收到的视频流进行视频播放。
618、当该第一终端接收到投屏结束指令时,向代理服务器发送投屏结束请求消息。
619、该代理服务器接收到该投屏结束请求消息后,向该第二终端发送该投屏结束请求消息。
620、该第二终端基于该投屏结束请求消息,向该代理服务器发送投屏代理结束请求消息,该投屏代理结束请求消息用于请求该代理服务器结束对该第一视频流的匹配过程。
621、该代理服务器接收到该投屏代理结束请求消息,停止进行视频流的匹配。
本申请实施例提供的投屏方法,通过代理服务器可以基于视频URL信息以及视频服务器的网络协议地址,向视频服务器请求第一终端正在播放的视频流,并将基于该请求得到的视频流从发送至第二终端,以便第二终端可以播放该视频流指示的视频,达到第一终端与第二终端同步播放的目的,可以避免代理服务器因为无法匹配到第一终端正在播放的视频流,而造成在投屏不同步现象,并且避免了第一终端向第二终端发送视频流,降低了第一终端的网络压力以及功耗,避免了卡顿,从而提高了投屏质量。进一步地,第一终端周期性发送视频同步消息,以便第二终端可以根据视频同步消息来播放第一终端正在播放的视频,进而提高了同步效果。
以上实施例为局域网内的第一终端、代理服务器默认支持HLS协议为例进行说明,而在一些实施例中,例如,当第一终端、代理服务器默认均支持RTP协议,下面就以第一终端、代理服务器均支持RTP协议为例,对本发明实施例提供的视频投屏方法进行介绍,与图5所示实施例的不同之处主要在于,在交互的消息中所携带的用于指示第一终端正在播放的视频的信息为五元组,图7是本发明实施例提供的一种视频投屏方法流程图,该实施例可以基于图1所示的实施环境进行。参见图7,该实施例包括:
701、当第一终端接收到视频播放指令时,向代理服务器发送视频流请求消息,该视频流请求消息携带视频URL信息。
702、当该代理服务器接收到该视频流请求消息后,向视频服务器发送该视频流请求消息。
703、视频服务器基于该视频流请求消息,向该代理服务器发送视频流。
704、当该代理服务器接收到该视频流后,向该第一终端发送该视频流。
705、该第一终端根据接收的视频流,基于该视频流进行播放。
706、当该第一终端接收到投屏指令时,向该代理服务器发送投屏请求消息,该投屏请求 消息携带该第一视频流的五元组。
707、该代理服务器在接收到投屏请求消息后,向第二终端发送该投屏请求消息。
708、该第二终端接收该投屏请求。
709、该第二终端根据接收的投屏请求消息,向代理服务器发送投屏代理请求消息,该投屏代理请求消息携带该第一视频流的五元组。
710、该代理服务器接收该投屏代理请求。
711、该代理服务器根据该第一视频流的五元组,对视频服务器发送的数据流进行匹配,该视频服务器用于提供该第一视频流。
由于代理服务器能够接收到视频服务器所发送的视频流,因此,当该代理服务器接收到投屏代理请求消息后,代理服务器可以对所接收到的视频流进行解析,得到该视频流的五元组,将投屏代理请求消息中的该第一视频流的五元组与解析得到的五元组进行比对,当相同时,则说明匹配到了第一视频流。
712、当该代理服务器匹配到该第一视频流时,对该第一视频流进行复制,以获取该第二视频流。
713、该代理服务器将该第二视频流发送至该第二终端。
714、该第二终端接收该第二视频流。
715、当该第二终端接收到该第二视频流后,基于该第二视频流进行播放。
716、该第一终端向该代理服务器周期性发送视频同步消息,该视频同步消息包括该第一视频流的流信息,该视频同步消息还包括播放进度和该第一终端的头部转动信息中的任一项。
717、当该代理服务器接收到该视频同步消息后,向第二终端发送该视频同步消息。
718、该第二终端接收该视频同步消息。
719、第二终端基于该视频同步消息和接收到的视频流进行视频播放。
720、当该第一终端接收到投屏结束指令时,向代理服务器发送投屏结束请求消息。
721、当该代理服务器接收到该投屏结束请求消息后,向该第二终端发送该投屏结束请求消息。
722、该第二终端接收该投屏结束请求消息。
723、该第二终端基于该投屏结束请求消息,向该代理服务器发送投屏代理结束请求消息,该投屏代理结束请求消息用于请求该代理服务器结束对该第一视频流的匹配过程。
724,、该代理服务器接收该投屏结束请求消息。
725、当该代理服务器接收到该投屏代理结束请求消息后,停止进行视频流的匹配。
上述步骤701至725与步骤601至621同理,其不同之处主要在于在交互的消息中所携带的用于指示第一终端正在播放的视频的信息为五元组,对其他步骤不做限定。
本申请实施例提供的投屏方法,通过代理服务器根据五元组,从已接收到的视频流中匹配到该第一终端正在播放的视频流,并将与第一终端正在播放的视频对应的视频流发送至第二终端,以便第二终端可以播放该视频流指示的视频,达到第一终端与第二终端同步播放的目的,避免了第一终端向第二终端发送视频流,降低了第一终端的网络压力以及功耗,避免了卡顿,从而提高了投屏质量。进一步地,第一终端周期性发送视频同步消息,以便第二终端可以根据视频同步消息来播放第一终端正在播放的视频,进而提高了同步效果。
以上实施例为局域网内的第一终端、代理服务器默认支持HLS协议或RTP协议为例进行说明,而在一些实施例中,第一终端可能既支持HLS协议又支持RTP协议,而在与视频服务器进行数据交互时,可能采取了上述任一种协议,因此,代理服务器可以通过第一终端所发送的消息对所支持的协议进行识别,从而实现对视频流的匹配,图8是本发明实施例提供的一种视频投屏方法流程图,该实施例可以基于图1所示的实施环境进行。参见图8,该实施例包括:
801、当第一终端接收到视频播放指令时,向代理服务器发送视频流请求消息,该视频流请求消息携带视频URL信息。
802、当该代理服务器接收到该视频流请求消息后,向视频服务器发送该视频流请求消息。
803、视频服务器基于该视频流请求消息,向该代理服务器发送视频流。
804、当该代理服务器接收到该视频流后,向该第一终端发送该视频流。
805、该第一终端根据接收的视频流,基于该视频流进行播放。
806、当该第一终端接收到投屏指令时,向该代理服务器发送投屏请求消息,该投屏请求消息至少携带该第一终端正在播放的第一视频流的流信息以及协议类型字段,该协议类型字段用于指示该第一终端采用的流媒体传输协议。
第一终端可以根据自身支持的流媒体传输协议,确定协议类型字段的取值,该协议类型字段的不同取值对应于不同的流媒体传输协议。
例如,当该协议类型字段的取值为0时,说明该第一终端采用的流媒体传输协议为HLS协议,当该协议类型字段的取值为1时,说明该第一终端采用的流媒体传输协议为RTP协议。当然,该协议类型字段也可以是采用其他数值或字符串等形式进行表示,本发明实施例对此不进行具体限定。
807、该代理服务器在接收到投屏请求消息后,向第二终端发送该投屏请求消息。
808、第二终端根据接收的投屏请求消息,向代理服务器发送投屏代理请求消息,该投屏代理请求消息至少携带该第一终端正在播放的第一视频流的流信息以及协议类型字段。
809、该代理服务器根据该投屏代理请求消息中的协议类型字段,确定目标流媒体传输协议,该目标流媒体传输协议为该第一终端所采用的流媒体传输协议,该协议类型字段的不同取值对应于不同的流媒体传输协议。
由步骤806可知,该协议类型字段可以指示该第一终端所支持的流媒体传输协议。例如,当该协议类型字段为0时,该第一终端采用的流媒体传输协议为HLS协议。当该协议类型字段为1时,该第一终端采用的流媒体传输协议为RTP协议。
810、该代理服务器基于该目标流媒体传输协议,对视频服务器发送的视频流进行匹配,该视频服务器用于提供该第一视频流。
需要说明的是,该步骤810中,当确定目标流媒体传输协议时,可以从该投屏代理请求消息中提取该目标流媒体传输协议对应的流信息,并采用该目标流媒体传输协议,对接收到的视频流进行解析,并将解析得到的流信息与提取到的流信息进行比对,以进行上述匹配过程。
例如,当该代理服务器接收到投屏代理请求消息后,当该协议类型字段为0时,说明该第一终端采用的流媒体传输协议为HLS协议,该第一视频流的流信息为第一终端的网络协议地址以及视频URL信息,代理服务器可以对所接收到的视频流进行解析,得到该视频流的目 标设备的网络协议地址以及视频URL信息,将第一终端的网络协议地址以及该第一视频流的视频URL信息与解析得到的网络协议地址和视频URL信息进行比对,当第一终端的网络协议地址以及该第一视频流的视频URL信息与解析得到的网络协议地址和视频URL信息相同时,则说明匹配到了第一视频流。
当该代理服务器接收到投屏代理请求消息后,当该协议类型字段为1时,说明该第一终端采用的流媒体传输协议为RTP协议,即表示该第一视频流的流信息为五元组,代理服务器可以对所接收到的视频流进行解析,得到该视频流的五元组,将投屏代理请求消息中的五元组与解析得到的五元组进行比对,当相同时,则说明匹配到了第一视频流。
811、当该代理服务器匹配到该第一视频流时,对该第一视频流进行复制,以获取该第二视频流。
812、该代理服务器将该第二视频流发送至该第二终端。
813、当该第二终端接收到该第二视频流后,基于该第二视频流进行播放。
814、该第一终端向该代理服务器周期性发送视频同步消息,该视频同步消息包括该第一视频流的流信息,该视频同步消息还包括播放进度和该第一终端的头部转动信息中的任一项。
815、当该代理服务器接收到该视频同步消息后,向第二终端周期性发送该视频同步消息。
816、第二终端基于该视频同步消息和接收到的视频流进行视频播放。
817、当该第一终端接收到投屏结束指令时,向代理服务器发送投屏结束请求消息。
818、该代理服务器接收到该投屏结束请求消息后,向该第二终端发送该投屏结束请求消息。
819、该第二终端基于该投屏结束请求消息,向该代理服务器发送投屏代理结束请求消息,该投屏代理结束请求消息用于请求该代理服务器结束对该第一视频流的匹配过程。
820、当该代理服务器接收到该投屏代理结束请求消息后,停止进行视频流的匹配。
需要注意的是,当该第一终端采用的流媒体传输协议为HLS协议时,该代理服务器在开始代理初期,因为未下载第一终端已经存储的视频分片,可能无法匹配到该第一视频流。为了避免了由于数据缺失而造成的投屏不同步现象,需要进行步骤610至612,以便第二终端可以播放第三视频流。
本申请实施例提供的投屏方法,通过代理服务器根据第一终端的网络协议地址以及视频流的信息,从已接收到的视频流中匹配到该第一终端正在播放的视频流,并将与第一终端正在播放的视频对应的视频流发送至第二终端,以便第二终端可以播放该视频流指示的视频,达到第一终端与第二终端同步播放的目的,避免了第一终端向第二终端发送视频流,降低了第一终端的网络压力以及功耗,避免了卡顿,从而提高了投屏质量。进一步地,第一终端周期性发送视频同步消息,以便第二终端可以根据视频同步消息来播放第一终端正在播放的视频,进而提高了同步效果。另外,代理服务器可以根据投屏代理请求信息中的协议类型字段,采用不同的解析策略,来实现针对不同流媒体传输协议视频的自适应、差异化处理。
图9是本发明实施例提供的一种视频投屏装置的结构示意图,该装置包括:第一接收模块901、匹配模块902、获取模块903以及第一发送模块904
第一接收模块901,用于执行上述步骤710;
匹配模块902,用于执行上述步骤711;
获取模块903,用于执行上述步骤712;
第一发送模块904,用于执行上述步骤713。
可选地,该第一视频流为RTP流,该第一视频流的流信息包括五元组,见步骤706。
可选地,该第一视频流的流信息包括视频URL信息,见步骤606。
可选地,该装置还包括:
第二发送模块,用于执行上述步骤610;
第二接收模块,用于执行上述步骤611;
第三发送模块,用于执行上述步骤612。
可选地,该第一视频流的流信息还包括该第一终端的网络协议地址。
可选地,该装置还包括:
确定模块,用于执行上述步骤809;
执行模块,用于执行上述步骤810。
可选地,该装置还包括:
第三接收模块,用于执行上述步骤717。
可选地,该装置还包括:
第四接收模块,用于执行上述步骤724;
停止模块,用于执行上述步骤725。
图10是本发明实施例提供的一种视频投屏装置的结构示意图,该装置包括:第一接收模块1001、第一发送模块1002、第二接收模块1003、第三接收模块1004以及播放模块1005
第一接收模块1001,用于执行上述步骤708;
第一发送模块1002,用于执行上述步骤709;
第二接收模块1003,用于执行上述步骤714;
第三接收模块1004,用于执行上述步骤718;
播放模块1005,用于执行上述步骤719。
可选地,该第一视频流为RTP流,,该第一视频流的流信息包括五元组,见步骤706。
可选地,该第一视频流的流信息包括视频URL信息,见步骤606。
可选地,该第一视频流的流信息还包括该第一终端的网络协议地址。
可选地,该投屏代理请求消息的协议类型字段用于指示该第一终端所采用的流媒体传输协议,见步骤809。
可选地,该装置还包括:
第四接收模块,用于执行上述步骤722;
第二发送模块,用于执行上述步骤723。
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。
需要说明的是:上述实施例提供的视频投屏装置在对视频进行投屏时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的视频投屏的装置与视频投屏的方法实施例属于同一构思,其具体实 现过程详见方法实施例,这里不再赘述。
以上仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (30)

  1. 一种视频投屏方法,其特征在于,应用于代理服务器,所述代理服务器与第一终端和第二终端处于同一个局域网中,所述方法包括:
    接收第二终端的投屏代理请求消息,所述投屏代理请求消息至少携带所述第一终端正在播放的第一视频流的流信息;
    根据所述第一视频流的流信息,匹配视频服务器向所述第一终端发送的数据流,所述视频服务器用于提供所述第一视频流;
    当匹配到所述第一视频流时,对所述第一视频流进行复制,以获取第二视频流;
    将所述第二视频流发送至所述第二终端,所述第二视频流用于在所述第二终端进行视频播放。
  2. 根据权利要求1所述的方法,其特征在于,所述第一视频流为实时流媒体传输协议RTP流,所述第一视频流的流信息包括五元组。
  3. 根据权利要求1所述的方法,其特征在于,所述第一视频流的流信息包括视频统一资源定位符URL信息。
  4. 根据权利要求3所述的方法,其特征在于,所述投屏代理请求消息还包括所述视频服务器的网络协议地址,所述方法还包括:
    当未匹配到所述第一视频流时,根据所述第二终端的投屏代理请求消息,向视频服务器发送视频流请求消息,所述视频流请求消息携带视频URL信息;
    接收第三视频流,所述第三视频流为所述视频URL信息对应的视频流;
    将所述第三视频流发送至所述第二终端。
  5. 根据权利要求3或4所述的方法,其特征在于,所述第一视频流的流信息还包括所述第一终端的网络协议地址。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述根据所述第一视频流的流信息,匹配视频服务器向所述第一终端发送的数据流之前,所述方法还包括:
    根据所述投屏代理请求消息中的协议类型字段,确定目标流媒体传输协议,所述目标流媒体传输协议为所述第一终端所采用的流媒体传输协议,所述协议类型字段的不同取值对应于不同的流媒体传输协议;
    基于所述目标流媒体传输协议,执行根据所述第一视频流的流信息,匹配视频服务器向所述第一终端发送的数据流的步骤。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:
    接收所述第一终端周期性发送的视频同步消息,将所述视频同步消息转发至所述第二终 端,所述视频同步消息包括所述第一视频流的流信息,所述视频同步消息还包括播放进度和所述第一终端的头部转动信息中至少一项。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:
    接收所述第二终端的投屏代理结束请求消息,所述投屏代理结束请求消息用于请求所述代理服务器结束对所述第一视频流的匹配过程;
    停止对所述视频服务器向所述第一终端发送的数据流进行匹配。
  9. 一种视频投屏方法,其特征在于,应用于第二终端,所述第二终端与代理服务器以及第一终端处于同一个局域网中,所述方法包括:
    接收所述第一终端的投屏请求消息,所述投屏请求消息至少携带所述第一终端正在播放的第一视频流的流信息;
    向所述代理服务器发送投屏代理请求消息,所述投屏代理请求消息至少携带所述第一终端正在播放的第一视频流的流信息;
    接收所述代理服务器发送的第二视频流,所述第二视频流为对所述代理服务器所接收到的所述第一视频流复制得到;
    接收所述第一终端发送的视频同步消息,所述视频同步消息包括所述第一视频流的流信息,所述视频同步消息还包括播放进度和所述第一终端的头部转动信息中的任一项;
    基于所述视频同步消息和所述第二视频流进行视频播放。
  10. 根据权利要求9所述的方法,其特征在于,所述第一视频流为RTP流,所述第一视频流的流信息包括五元组。
  11. 根据权利要求9所述的方法,其特征在于,所述第一视频流的流信息包括视频URL信息。
  12. 根据权利要求11所述的方法,其特征在于,所述第一视频流的流信息还包括所述第一终端的网络协议地址。
  13. 根据权利要求9至12任一项所述的方法,其特征在于,所述投屏代理请求消息的协议类型字段用于指示所述第一终端所采用的流媒体传输协议。
  14. 根据权利要求9至13任一项所述的方法,其特征在于,所述方法还包括:
    接收所述第一终端的投屏结束请求消息;
    向所述代理服务器发送投屏代理结束请求消息,所述投屏代理结束请求消息用于请求所述代理服务器结束对所述第一视频流的匹配过程。
  15. 一种视频投屏装置,其特征在于,应用于代理服务器,所述代理服务器与第一终端和第二终端处于同一个局域网中,所述装置包括:
    第一接收模块,用于接收第二终端的投屏代理请求消息,所述投屏代理请求消息至少携带所述第一终端正在播放的第一视频流的流信息;
    匹配模块,用于根据所述第一视频流的流信息,匹配视频服务器向所述第一终端发送的数据流,所述视频服务器用于提供所述第一视频流;
    获取模块,用于当匹配到所述第一视频流时,对所述第一视频流进行复制,以获取所述第二视频流;
    第一发送模块,用于将所述第二视频流发送至所述第二终端,所述第二视频流用于在所述第二终端进行视频播放。
  16. 根据权利要求15所述的装置,其特征在于,所述第一视频流为RTP流,所述第一视频流的流信息包括五元组。
  17. 根据权利要求15所述的装置,其特征在于,所述第一视频流的流信息包括视频URL信息。
  18. 根据权利要求17所述的装置,其特征在于,所述投屏代理请求消息还包括所述视频服务器的网络协议地址,所述装置还包括:
    第二发送模块,用于当未匹配到所述第一视频流时,根据所述第二终端的投屏代理请求消息,向视频服务器发送视频流请求消息,所述视频流请求消息携带视频URL信息;
    第二接收模块,用于接收第三视频流,所述第三视频流为视频URL信息对应的视频流;
    第三发送模块,用于将所述第三视频流发送至所述第二终端。
  19. 根据权利要求17或18所述的装置,其特征在于,所述第一视频流的流信息还包括所述第一终端的网络协议地址。
  20. 根据权利要求15至19任一项所述的装置,其特征在于,所述装置还包括:
    确定模块,用于根据所述投屏代理请求消息中的协议类型字段,确定目标流媒体传输协议,所述目标流媒体传输协议为所述第一终端所采用的流媒体传输协议,所述协议类型字段的不同取值对应于不同的流媒体传输协议;
    执行模块,用于基于所述目标流媒体传输协议,执行根据所述第一视频流的流信息,匹配视频服务器向所述第一终端发送的数据流的步骤。
  21. 根据权利要求15至20任一项所述的装置,其特征在于,所述装置还包括:
    第三接收模块,用于接收所述第一终端周期性发送的视频同步消息,将所述视频同步消息转发至所述第二终端,所述视频同步消息包括所述第一视频流的流信息,所述视频同步消息还包括播放进度和所述第一终端的头部转动信息中至少一项。
  22. 根据权利要求15至21任一项所述的装置,其特征在于,所述装置还包括:
    第四接收模块,用于接收所述第二终端的投屏代理结束请求消息,所述投屏代理结束请 求消息携带所述第一终端的网络协议地址,所述投屏代理结束请求消息用于请求所述代理服务器结束对所述第一视频流的匹配过程;
    停止模块,用于停止对所述视频服务器向所述第一终端发送的数据流进行匹配。
  23. 一种视频投屏装置,其特征在于,应用于第二终端,所述第二终端与代理服务器以及第一终端处于同一个局域网中,所述装置包括:
    第一接收模块,用于接收所述第一终端的投屏请求消息,所述投屏请求消息至少携带所述第一终端正在播放的第一视频流的流信息;
    第一发送模块,用于向所述代理服务器发送投屏代理请求消息,所述投屏代理请求消息至少携带所述第一终端正在播放的第一视频流的流信息;
    第二接收模块,用于接收所述代理服务器发送的第二视频流,所述第二视频流为对所述代理服务器所接收到的所述第一视频流复制得到;
    第三接收模块,用于接收所述第一终端发送的视频同步消息,所述视频同步消息包括所述第一视频流的流信息,所述视频同步消息还包括播放进度和所述第一终端的头部转动信息中任一项;
    播放模块,用于基于所述视频同步消息和所述第二视频流进行视频播放。
  24. 根据权利要求23所述的装置,其特征在于,所述第一视频流为RTP流,所述第一视频流的流信息包括五元组。
  25. 根据权利要求23所述的装置,其特征在于,所述第一视频流的流信息包括视频URL信息。
  26. 根据权利要求25所述的装置,其特征在于,所述第一视频流的流信息还包括所述第一终端的网络协议地址。
  27. 根据权利要求23至26任一项所述的装置,其特征在于,所述投屏代理请求消息的协议类型字段用于指示所述第一终端所采用的流媒体传输协议。
  28. 根据权利要求23至27任一项所述的装置,其特征在于,所述装置还包括:
    第四接收模块,用于接收所述第一终端的投屏结束请求消息;
    第二发送模块,用于向所述代理服务器发送投屏代理结束请求消息,所述投屏代理结束请求消息用于请求所述代理服务器结束对所述第一视频流的匹配过程。
  29. 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如权利要求1至权利要求14任一项所述的视频投屏方法所执行的操作。
  30. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如权利要求1至权利要求14任一项所述的视频投屏方法所执行的操作。
PCT/CN2019/102896 2018-08-30 2019-08-27 视频投屏方法、装置、计算机设备及存储介质 WO2020043104A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19853317.6A EP3840394A4 (en) 2018-08-30 2019-08-27 VIDEO SCREEN PROJECTION PROCESS, DEVICE, COMPUTER EQUIPMENT AND MEMORY SUPPORT
KR1020217008935A KR102387161B1 (ko) 2018-08-30 2019-08-27 비디오 스크린 프로젝션 방법과 장치, 컴퓨터 장비, 및 저장 매체

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811005325.3 2018-08-30
CN201811005325.3A CN110876080B (zh) 2018-08-30 2018-08-30 视频投屏方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020043104A1 true WO2020043104A1 (zh) 2020-03-05

Family

ID=69643965

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102896 WO2020043104A1 (zh) 2018-08-30 2019-08-27 视频投屏方法、装置、计算机设备及存储介质

Country Status (4)

Country Link
EP (1) EP3840394A4 (zh)
KR (1) KR102387161B1 (zh)
CN (2) CN113727143A (zh)
WO (1) WO2020043104A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726458A (zh) * 2020-06-05 2020-09-29 北方工业大学 在干扰消失后手机控制回放视频流完整且按时播放的方法
CN112153401A (zh) * 2020-09-22 2020-12-29 咪咕视讯科技有限公司 视频处理方法、通信设备及可读存储介质
CN113163261A (zh) * 2021-03-17 2021-07-23 深圳乐播科技有限公司 加密视频的解密推送方法、装置、设备及存储介质
CN114143371A (zh) * 2021-11-17 2022-03-04 深圳Tcl新技术有限公司 投屏方法、装置、存储介质及电子设备
CN114697736A (zh) * 2020-12-29 2022-07-01 深圳Tcl新技术有限公司 无线投屏方法、***、智能设备及计算机可读存储介质
WO2022160612A1 (zh) * 2021-01-29 2022-08-04 博泰车联网科技(上海)股份有限公司 与车辆的车载***交互方法、存储介质和移动终端

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988660A (zh) * 2020-08-06 2020-11-24 锐捷网络股份有限公司 一种dlna设备投屏方法、网关、终端和***
WO2022111421A1 (zh) * 2020-11-25 2022-06-02 华为技术有限公司 应用界面投屏方法、装置、设备以及存储介质
CN115119034A (zh) * 2021-03-17 2022-09-27 浙江宇视科技有限公司 一种视频窗口漫游方法、装置、设备及存储介质
CN115407951A (zh) * 2021-05-26 2022-11-29 华为云计算技术有限公司 一种投屏方法及投屏装置
TWI828091B (zh) * 2022-03-23 2024-01-01 中華電信股份有限公司 全景影像傳輸系統、方法以及電腦程式產品
CN115278348B (zh) * 2022-07-05 2023-11-17 深圳乐播科技有限公司 一种投屏方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012030734A1 (en) * 2010-08-30 2012-03-08 Mobitv, Inc. User and device authentication for media services
CN104519397A (zh) * 2013-09-29 2015-04-15 北大方正集团有限公司 音视频投屏播放方法、机顶盒和终端设备
CN105392048A (zh) * 2015-11-04 2016-03-09 合一网络技术(北京)有限公司 视频投放控制方法及***
CN106454497A (zh) * 2016-10-31 2017-02-22 乐视控股(北京)有限公司 一种投屏播放视频的方法及装置
CN106789453A (zh) * 2015-11-19 2017-05-31 ***通信集团公司 一种无线投屏方法及设备
CN107135417A (zh) * 2017-06-08 2017-09-05 深圳市耐飞科技有限公司 一种hls协议的投屏方法及***

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125200B (zh) * 2013-04-25 2017-09-12 ***通信集团公司 多屏互动方法、设备及***
CN103581707B (zh) * 2013-11-08 2017-06-20 华为软件技术有限公司 双屏互动处理方法和装置
US20160173937A1 (en) * 2014-12-11 2016-06-16 Mediatek Inc. Methods and devices for media casting management among multiple media casting devices supporting different media casting protocols
US9942343B2 (en) 2015-08-27 2018-04-10 Kiswe Mobile Inc. Efficient content streaming utilizing local proxy server implemented on client device
CN106534956B (zh) * 2015-09-11 2020-02-18 中兴通讯股份有限公司 屏幕投射的视频数据传输方法、装置及***
CN108156486A (zh) 2016-12-05 2018-06-12 中兴通讯股份有限公司 直播分享方法及装置、家庭媒体设备
CN107613338A (zh) 2017-09-25 2018-01-19 中兴通讯股份有限公司 视频传输方法、服务器、vr播放终端及计算机可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012030734A1 (en) * 2010-08-30 2012-03-08 Mobitv, Inc. User and device authentication for media services
CN104519397A (zh) * 2013-09-29 2015-04-15 北大方正集团有限公司 音视频投屏播放方法、机顶盒和终端设备
CN105392048A (zh) * 2015-11-04 2016-03-09 合一网络技术(北京)有限公司 视频投放控制方法及***
CN106789453A (zh) * 2015-11-19 2017-05-31 ***通信集团公司 一种无线投屏方法及设备
CN106454497A (zh) * 2016-10-31 2017-02-22 乐视控股(北京)有限公司 一种投屏播放视频的方法及装置
CN107135417A (zh) * 2017-06-08 2017-09-05 深圳市耐飞科技有限公司 一种hls协议的投屏方法及***

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726458A (zh) * 2020-06-05 2020-09-29 北方工业大学 在干扰消失后手机控制回放视频流完整且按时播放的方法
CN112153401A (zh) * 2020-09-22 2020-12-29 咪咕视讯科技有限公司 视频处理方法、通信设备及可读存储介质
CN112153401B (zh) * 2020-09-22 2022-09-06 咪咕视讯科技有限公司 视频处理方法、通信设备及可读存储介质
CN114697736A (zh) * 2020-12-29 2022-07-01 深圳Tcl新技术有限公司 无线投屏方法、***、智能设备及计算机可读存储介质
WO2022160612A1 (zh) * 2021-01-29 2022-08-04 博泰车联网科技(上海)股份有限公司 与车辆的车载***交互方法、存储介质和移动终端
CN113163261A (zh) * 2021-03-17 2021-07-23 深圳乐播科技有限公司 加密视频的解密推送方法、装置、设备及存储介质
CN114143371A (zh) * 2021-11-17 2022-03-04 深圳Tcl新技术有限公司 投屏方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN110876080A (zh) 2020-03-10
CN110876080B (zh) 2021-07-20
KR20210047933A (ko) 2021-04-30
CN113727143A (zh) 2021-11-30
KR102387161B1 (ko) 2022-04-14
EP3840394A1 (en) 2021-06-23
EP3840394A4 (en) 2021-09-15

Similar Documents

Publication Publication Date Title
WO2020043104A1 (zh) 视频投屏方法、装置、计算机设备及存储介质
US9112938B2 (en) Adaptive playback with look-ahead
US9608921B2 (en) Dynamic bit rate scaling
WO2020056877A1 (zh) 一种调整直播视频的时间戳的方法和装置
US10791366B2 (en) Fast channel change in a video delivery network
US11109092B2 (en) Synchronizing processing between streams
WO2017096935A1 (zh) 一种快速频道切换方法、服务器及iptv***
JP2006523979A (ja) データ要求送信装置及びプロセス並びに対応するプロダクツ
CN104918137A (zh) 一种拼接屏***播放视频的方法
CN113141522B (zh) 资源传输方法、装置、计算机设备及存储介质
US20210289255A1 (en) Synchronization of media content across multiple participant devices
CN112839238B (zh) 投屏播放方法、装置和存储介质
WO2021082642A1 (zh) 视频播放控制方法和***
KR20120011969A (ko) Rtsp 세션에 기초해 스트리밍 데이터를 송수신하는 방법 및 장치
WO2021031739A1 (zh) 云桌面视频播放方法、服务器、终端及存储介质
WO2013116975A1 (zh) 流媒体播放方法、设备及***
TW201424346A (zh) 多媒體串流的緩存輸出方法以及多媒體串流緩存模組
WO2017016266A1 (zh) 一种实现同步播放的方法和装置
JP2001242876A (ja) データ受信再生方法、データ受信再生装置、データ送信方法、およびデータ送信装置
CN103826158B (zh) 一种网络直播装置和方法
KR20120015037A (ko) 실시간 스트리밍 프로토콜을 기반으로 한 동영상 재생 서비스에서 동영상 재생 지연 보상 시스템 및 방법
JP2020174378A (ja) 異種ネットワーキング環境におけるメディアレンダリングの同期化
WO2010057391A1 (zh) 一种流媒体播放控制方法、设备及***
JP2004007172A (ja) 情報配信システム、情報配信装置および方法、情報端末装置および情報処理方法、記録媒体、並びにプログラム
JP2001285832A (ja) データ受信装置,データ受信方法,データ伝送方法,およびデータ記憶媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19853317

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019853317

Country of ref document: EP

Effective date: 20210316

ENP Entry into the national phase

Ref document number: 20217008935

Country of ref document: KR

Kind code of ref document: A