CN108574882A - A video transmission method and device - Google Patents
A video transmission method and device Download PDFInfo
- Publication number
- CN108574882A CN108574882A CN201710140922.6A CN201710140922A CN108574882A CN 108574882 A CN108574882 A CN 108574882A CN 201710140922 A CN201710140922 A CN 201710140922A CN 108574882 A CN108574882 A CN 108574882A
- Authority
- CN
- China
- Prior art keywords
- mainstream
- stream
- segment
- request
- fragmentation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
- H04N21/234363—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440263—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
技术领域technical field
本申请涉及传输技术领域,尤其涉及一种视频传输方法和装置。The present application relates to the technical field of transmission, and in particular to a video transmission method and device.
背景技术Background technique
HLS(HTTP live streaming)是基于超文本传输协议(hyper text transferprotocol,HTTP)的一种流媒体传输协议,可实现流媒体的直播和点播。在HLS点播场景中,服务器对视频内容进行编码,得到不同码率的多个视频文件,然后按照时间将该多个视频文件中的每个视频文件分为多个分片。终端需要播放视频时,按照播放时间和当前网络状况请求需要的分片,并对所请求到的分片进行缓存、解码和播放。HLS (HTTP live streaming) is a streaming media transmission protocol based on hypertext transfer protocol (HTTP), which can realize live broadcast and on-demand streaming media. In the HLS on-demand scenario, the server encodes the video content to obtain multiple video files with different bit rates, and then divides each of the multiple video files into multiple segments according to time. When the terminal needs to play the video, it requests the required fragments according to the playing time and current network conditions, and caches, decodes and plays the requested fragments.
在HLS技术中,终端所请求的分片从低码率切换为高码率时,已缓存但未播放的低码率分片会失去作用,从而造成传输资源和缓存资源的浪费。In HLS technology, when the segment requested by the terminal is switched from a low bit rate to a high bit rate, the cached but unplayed low bit rate segment will lose its function, resulting in a waste of transmission resources and cache resources.
发明内容Contents of the invention
本申请实施例提供一种视频传输方法和装置,用以节省传输资源和缓存资源。Embodiments of the present application provide a video transmission method and device to save transmission resources and cache resources.
第一方面,提供一种视频传输方法,该视频包括主编码流和辅编码流,辅编码流用于提高主编码流的码率,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。该方法包括:终端向服务器发送第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片;接收服务器发送的第一主流分片;若当前实时网络状况满足预设条件,则向服务器发送第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片;接收服务器发送的第一辅流分片。该技术方案中,终端请求主流分片,并按需请求辅流分片;其中,辅流分片用于提高主流分片的码率。由于在本申请实施例中,主编码流可以单独播放,或者,主编码流与辅编码流叠加重构后播放,因此已缓存的主编码流不会因缓存辅编码流而失去作用。与现有技术相比,能够节省传输资源和缓存资源。In the first aspect, a video transmission method is provided, the video includes a main coded stream and an auxiliary coded stream, the auxiliary coded stream is used to increase the code rate of the main coded stream, the main coded stream includes at least two main stream slices, and the auxiliary coded stream includes at least There are two auxiliary stream slices, and each main stream slice corresponds to an auxiliary stream slice. The method includes: the terminal sends a first mainstream fragmentation request to the server, wherein the first mainstream fragmentation request is used to request the first mainstream fragmentation, and the first mainstream fragmentation is a mainstream fragmentation of at least two mainstream fragments ;Receive the first mainstream segment sent by the server; if the current real-time network conditions meet the preset conditions, then send the first auxiliary stream segment request to the server, wherein the first auxiliary stream segment request is used to request the first mainstream segment The corresponding first auxiliary stream segment; receiving the first auxiliary stream segment sent by the server. In this technical solution, the terminal requests mainstream fragmentation, and requests auxiliary stream fragmentation as needed; wherein, the auxiliary stream fragmentation is used to increase the code rate of the mainstream fragmentation. In the embodiment of the present application, the main coded stream can be played alone, or the main coded stream and the auxiliary coded stream can be superimposed and reconstructed to be played, so the cached main coded stream will not lose its effect due to buffering the auxiliary coded stream. Compared with the prior art, transmission resources and cache resources can be saved.
可选的,终端和服务器之间通过HTTP/2协议通信。该服务器可以是支持HTTP/2协议的任一个服务器,例如可以是WEB服务器。Optionally, the terminal communicates with the server through the HTTP/2 protocol. The server may be any server supporting the HTTP/2 protocol, such as a WEB server.
在一种可能的实现方式中,该方法还可以包括:终端将第一主流分片和第一辅流分片叠加并重构,播放重构后生成的码流。这样,能够提高视频播放质量。In a possible implementation manner, the method may further include: the terminal superimposes and reconstructs the first main stream segment and the first auxiliary stream segment, and plays the code stream generated after reconstruction. In this way, video playback quality can be improved.
在一种可能的实现方式中,终端接收服务器发送的第一主流分片,可以包括:在一链路上接收服务器发送的第一主流分片,其中,该链路可以是终端与服务器之间的任一条链路。该情况下,上述接收服务器发送的第一辅流分片,包括:在链路上接收服务器发送的第一辅流分片。这样,终端和服务器均只需要维护一条链路即可,因此实现简单。In a possible implementation manner, receiving the first mainstream fragment sent by the server at the terminal may include: receiving the first mainstream fragment sent by the server on a link, where the link may be a link between the terminal and the server any of the links. In this case, receiving the first auxiliary stream segment sent by the server includes: receiving the first auxiliary stream segment sent by the server on the link. In this way, both the terminal and the server only need to maintain one link, so the implementation is simple.
在一种可能的实现方式中,该方法还可以包括:终端向服务器发送第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片;接收服务器发送的第二主流分片;若当前实时网络状况满足预设条件,则向服务器发送第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片;若在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,检测到当前实时网络状况不满足预设条件,则向服务器发送中断请求,其中,中断请求用于请求中断第二辅流分片的传输流程。这样,能够在一定程度上减少终端获取第二主流分片的下一个主流分片,从而有效较少终端播放视频的过程中出现卡顿的现象的发生。可以理解的,该可能的实现方式可以不依赖于上文提供的任一技术方案,而单独执行,这样,第二主流分片具有任性。In a possible implementation manner, the method may further include: the terminal sends a second mainstream fragmentation request to the server, where the second mainstream fragmentation request is used to request a second mainstream fragmentation, and the second mainstream fragmentation is at least One of the two mainstream fragments except the first mainstream fragment; receive the second mainstream fragment sent by the server; if the current real-time network conditions meet the preset conditions, send the second secondary stream fragment to the server slice request, wherein, the second auxiliary stream fragment request is used to request the second auxiliary stream fragment corresponding to the second main stream fragment; if the second auxiliary stream fragment request is sent to the server and the second auxiliary stream fragment is received Before the segment, if it is detected that the current real-time network condition does not meet the preset condition, an interrupt request is sent to the server, wherein the interrupt request is used to request to interrupt the transmission process of the second auxiliary stream segment. In this way, the acquisition of the next mainstream segment of the second mainstream segment by the terminal can be reduced to a certain extent, thereby effectively reducing the occurrence of stuttering during the video playback process of the terminal. It can be understood that this possible implementation manner may be implemented independently of any technical solution provided above, and thus, the second mainstream sharding is arbitrary.
第二方面,提供一种视频传输方法,该视频包括主编码流和辅编码流,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应;该方法可以包括:服务器接收终端发送的第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片;向终端发送第一主流分片;接收终端发送的第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片;第一辅流分片请求是终端在当前网络状况满足预设条件的情况下发送的;向终端发送第一辅流分片。In a second aspect, a video transmission method is provided, the video includes a main coded stream and an auxiliary coded stream, the main coded stream includes at least two main stream slices, the auxiliary coded stream includes at least two auxiliary stream slices, each main stream slice Corresponding to an auxiliary stream segment; the method may include: the server receives a first mainstream segment request sent by a terminal, wherein the first mainstream segment request is used to request a first mainstream segment, and the first mainstream segment is at least two One of the main stream fragments; sending the first mainstream fragment to the terminal; receiving the first auxiliary stream fragmentation request sent by the terminal, wherein the first auxiliary stream fragmentation request is used to request the corresponding first mainstream fragmentation The first auxiliary stream segment; the first auxiliary stream segment request is sent by the terminal when the current network condition meets the preset condition; the first auxiliary stream segment is sent to the terminal.
在一种可能的实现方式中,向终端发送第一主流分片,可以包括:在一链路上向终端发送第一主流分片。该情况下,向终端发送第一辅流分片,可以包括:在该链路上向终端发送第一辅流分片。In a possible implementation manner, sending the first mainstream fragment to the terminal may include: sending the first mainstream fragment to the terminal on a link. In this case, sending the first auxiliary stream segment to the terminal may include: sending the first auxiliary stream segment to the terminal on the link.
在一种可能的实现方式中,主流分片的优先级高于该主流分片对应的辅流分片的优先级。该情况下,向终端发送第一辅流分片,可以包括:若确定已向终端发送第一主流分片,则向终端发送第一辅流分片。这样,能够保证主流分片可以优先传输,从而保证主流分片的播放连续性。In a possible implementation manner, the priority of the mainstream segment is higher than the priority of the secondary stream segment corresponding to the mainstream segment. In this case, sending the first auxiliary stream segment to the terminal may include: if it is determined that the first main stream segment has been sent to the terminal, sending the first auxiliary stream segment to the terminal. In this way, it can be guaranteed that the mainstream segment can be transmitted preferentially, thereby ensuring the playback continuity of the mainstream segment.
在一种可能的实现方式中,该方法还可以包括:服务器接收终端发送的第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片;向终端发送第二主流分片;接收终端发送的第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片;若在向终端发送第二辅流分片请求之前,接收到终端发送的中断请求,则中断第二辅流分片的传输流程。可以理解的,该可能的实现方式可以不依赖于上文提供的任一技术方案,而是单独执行,这样,第二主流分片具有任性。In a possible implementation manner, the method may further include: the server receives a second mainstream fragmentation request sent by the terminal, where the second mainstream fragmentation request is used to request a second mainstream fragmentation, and the second mainstream fragmentation is One of the at least two mainstream fragments except the first mainstream fragment; sending the second mainstream fragment to the terminal; receiving the second secondary stream fragmentation request sent by the terminal, wherein the second secondary stream fragment The segment request is used to request the second auxiliary stream segment corresponding to the second main stream segment; if the interrupt request sent by the terminal is received before the second auxiliary stream segment request is sent to the terminal, the second auxiliary stream segment is interrupted. transfer process. It can be understood that this possible implementation manner may not depend on any technical solution provided above, but may be executed independently. In this way, the second mainstream sharding is arbitrary.
第二方面或第二方面的任一种可能的实现方式提供的技术方案的有益效果均可以参考上述第一方面或第一方面可能的实现方式,此处不再赘述。For the beneficial effects of the technical solutions provided by the second aspect or any possible implementation manner of the second aspect, reference may be made to the above-mentioned first aspect or possible implementation manners of the first aspect, and details are not repeated here.
第三方面,提供一种终端,视频包括主编码流和辅编码流,辅编码流用于提高主编码流的码率,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。该终端可以包括:发送单元和接收单元。其中,发送单元,用于向服务器发送第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片。接收单元,用于接收服务器发送的第一主流分片。发送单元还用于,若当前实时网络状况满足预设条件,则向服务器发送第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片。接收单元还用于,接收服务器发送的第一辅流分片。In a third aspect, a terminal is provided. The video includes a main coded stream and an auxiliary coded stream, and the auxiliary coded stream is used to increase the code rate of the main coded stream. The main coded stream includes at least two main stream slices, and the auxiliary coded stream includes at least two auxiliary coded streams. Stream shards, each mainstream shard corresponds to a secondary stream shard. The terminal may include: a sending unit and a receiving unit. Wherein, the sending unit is configured to send the first mainstream fragmentation request to the server, wherein the first mainstream fragmentation request is used to request the first mainstream fragmentation, and the first mainstream fragmentation is one mainstream among at least two mainstream fragments Fragmentation. The receiving unit is configured to receive the first main stream segment sent by the server. The sending unit is further configured to, if the current real-time network condition satisfies the preset condition, send a first auxiliary stream fragmentation request to the server, wherein the first auxiliary stream fragmentation request is used to request the first auxiliary stream fragmentation corresponding to the first main stream fragmentation. Flow fragmentation. The receiving unit is further configured to receive the first auxiliary stream segment sent by the server.
在一种可能的实现方式中,该终端还可以包括:重构单元和播放单元。其中,重构单元,用于将第一主流分片和第一辅流分片叠加并重构。播放单元,用于播放重构后生成的码流。In a possible implementation manner, the terminal may further include: a reconstruction unit and a playback unit. Wherein, the reconstruction unit is configured to superimpose and reconstruct the first main stream segment and the first auxiliary stream segment. The playback unit is used to play the code stream generated after reconstruction.
在一种可能的实现方式中,接收单元具体用于,在一链路上接收服务器发送的第一主流分片;在该链路上接收服务器发送的第一辅流分片。In a possible implementation manner, the receiving unit is specifically configured to receive, on a link, the first main stream segment sent by the server; and receive, on the link, the first auxiliary stream segment sent by the server.
在一种可能的实现方式中,发送单元还可以用于,向服务器发送第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片。接收单元还可以用于,接收服务器发送的第二主流分片。发送单元还可以用于,若当前实时网络状况满足预设条件,则向服务器发送第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片。发送单元还可以用于,若在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,检测到当前实时网络状况不满足预设条件,则向服务器发送中断请求,其中,中断请求用于请求中断第二辅流分片的传输流程。In a possible implementation manner, the sending unit may also be configured to send a second mainstream fragmentation request to the server, where the second mainstream fragmentation request is used to request a second mainstream fragmentation, and the second mainstream fragmentation is at least One of the two mainstream slices other than the first mainstream slice. The receiving unit may also be configured to receive the second main stream fragment sent by the server. The sending unit may also be configured to, if the current real-time network condition satisfies a preset condition, send a second auxiliary stream fragmentation request to the server, wherein the second auxiliary stream fragmentation request is used to request the second auxiliary stream fragmentation corresponding to the second main stream fragmentation. Content fragmentation. The sending unit may also be used to send an interruption request to the server if it detects that the current real-time network condition does not meet the preset condition after sending the second auxiliary stream segment request to the server and before receiving the second auxiliary stream segment, Wherein, the interrupt request is used to request to interrupt the transmission process of the second auxiliary stream segment.
第四方面,提供一种服务器,视频包括主编码流和辅编码流,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。该服务器可以包括:接收单元和发送单元。其中,接收单元,用于接收终端发送的第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片。发送单元,用于向终端发送第一主流分片。接收单元还用于,接收终端发送的第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片;第一辅流分片请求是终端在当前网络状况满足预设条件的情况下发送的。发送单元还用于,向终端发送第一辅流分片。In a fourth aspect, a server is provided. The video includes a main encoding stream and an auxiliary encoding stream. The main encoding stream includes at least two main stream fragments, and the auxiliary encoding stream includes at least two auxiliary stream fragments. Each main stream fragment is connected to an auxiliary stream. Stream sharding correspondence. The server may include: a receiving unit and a sending unit. Wherein, the receiving unit is configured to receive the first mainstream fragmentation request sent by the terminal, wherein the first mainstream fragmentation request is used to request the first mainstream fragmentation, and the first mainstream fragmentation is one of at least two mainstream fragments Mainstream sharding. A sending unit, configured to send the first main stream segment to the terminal. The receiving unit is also used to receive the first auxiliary stream fragmentation request sent by the terminal, wherein the first auxiliary stream fragmentation request is used to request the first auxiliary stream fragment corresponding to the first main stream fragment; the first auxiliary stream fragmentation The request is sent by the terminal when the current network condition meets the preset condition. The sending unit is further configured to send the first auxiliary stream segment to the terminal.
在一种可能的实现方式中,发送单元具体用于:在一链路上向终端发送第一主流分片;在该链路上向终端发送第一辅流分片。In a possible implementation manner, the sending unit is specifically configured to: send the first main stream segment to the terminal on a link; send the first auxiliary stream segment to the terminal on the link.
在一种可能的实现方式中,主流分片的优先级高于该主流分片对应的辅流分片的优先级;该情况下,发送单元具体用于:若确定已向终端发送第一主流分片,则向终端发送第一辅流分片。In a possible implementation manner, the priority of the mainstream segment is higher than the priority of the secondary stream segment corresponding to the mainstream segment; in this case, the sending unit is specifically configured to: if it is determined that the first mainstream segment has been sent to the terminal fragments, send the first auxiliary stream fragments to the terminal.
在一种可能的实现方式中,接收单元还用于,接收终端发送的第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片。发送单元还用于,向终端发送第二主流分片。接收单元还用于,接收终端发送的第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片。接收单元还用于,接收终端发送的中断请求。该服务器还可以包括:中断单元,用于若在发送单元向终端发送第二辅流分片请求之前,接收单元接收到终端发送的中断请求,则中断第二辅流分片的传输流程。In a possible implementation manner, the receiving unit is further configured to receive the second mainstream fragmentation request sent by the terminal, where the second mainstream fragmentation request is used to request the second mainstream fragmentation, and the second mainstream fragmentation is at least One of the two mainstream slices other than the first mainstream slice. The sending unit is further configured to send the second main stream segment to the terminal. The receiving unit is further configured to receive a second auxiliary stream fragmentation request sent by the terminal, where the second auxiliary stream fragmentation request is used to request a second auxiliary stream fragment corresponding to the second main stream fragment. The receiving unit is also used to receive an interrupt request sent by the terminal. The server may further include: an interrupt unit, configured to interrupt the transmission process of the second auxiliary stream segment if the receiving unit receives an interrupt request sent by the terminal before the sending unit sends the second auxiliary stream segment request to the terminal.
可选的,上文第一方面至第四方面中的中断请求可以包括:HTTP/2中的RST_STREM帧。另外,中断请求还可以是一种新设计的帧,或者可以复用现有技术中提供的其他帧,本申请实施例对此不进行限定。Optionally, the interrupt requests in the first aspect to the fourth aspect above may include: RST_STREM frame in HTTP/2. In addition, the interrupt request may also be a newly designed frame, or may reuse other frames provided in the prior art, which is not limited in this embodiment of the present application.
第五方面,提供一种终端,该终端具有实现上述方法实施例中终端行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In a fifth aspect, a terminal is provided, and the terminal has a function of implementing the terminal behavior in the foregoing method embodiments. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一种可能的实现方式中,该终端可以包括:处理器、存储器、通信总线和通信接口;其中,存储器用于存储计算机执行指令,处理器与存储器通过通信总线连接,当终端运行时,处理器执行存储器存储的计算机执行指令,以使终端执行上述第一方面或第一方面的任一种实现方式提供的视频传输方法。In a possible implementation, the terminal may include: a processor, a memory, a communication bus, and a communication interface; wherein, the memory is used to store computer-executed instructions, the processor and the memory are connected through the communication bus, and when the terminal is running, the processing The device executes the computer-executed instructions stored in the memory, so that the terminal executes the video transmission method provided by the first aspect or any implementation manner of the first aspect.
第六方面,提供一种计算机可读存储介质,用于储存为上述终端所用的计算机软件指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的视频传输方法。A sixth aspect provides a computer-readable storage medium for storing computer software instructions used by the above-mentioned terminal, and when it is run on a computer, the computer can execute the video transmission method in any one of the above-mentioned first aspects.
第七方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的视频传输方法。In a seventh aspect, there is provided a computer program product containing instructions, which, when run on a computer, enable the computer to execute the video transmission method in any one of the above first aspects.
另外,第三方面、第五方面和第六方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。In addition, for the technical effects brought about by any one of the design methods in the third aspect, the fifth aspect and the sixth aspect, please refer to the technical effects brought about by different design methods in the first aspect, which will not be repeated here.
第八方面,提供一种服务器,该服务器具有实现上述方法实施例中服务器行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In an eighth aspect, a server is provided, and the server has the function of implementing the server behavior in the above method embodiment. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一种可能的实现方式中,该服务器可以包括:处理器、存储器、通信总线和通信接口。其中,存储器用于存储计算机执行指令,处理器与存储器通过通信总线连接,当服务器运行时,处理器执行存储器存储的计算机执行指令,以使服务器执行上述第二方面或第二方面的任一种实现方式提供的视频传输方法。In a possible implementation manner, the server may include: a processor, a memory, a communication bus, and a communication interface. Wherein, the memory is used to store computer-executable instructions, and the processor and the memory are connected through a communication bus. When the server is running, the processor executes the computer-executable instructions stored in the memory, so that the server executes any one of the above-mentioned second aspect or the second aspect. The video transmission method provided by the implementation.
第九方面,提供一种计算机可读存储介质,用于储存为上述服务器所用的计算机软件指令,当其在计算机上运行时,使得计算机可以执行上述第二方面中任一项的视频传输方法。In a ninth aspect, a computer-readable storage medium is provided for storing computer software instructions used by the above-mentioned server, and when running on a computer, the computer can execute the video transmission method in any one of the above-mentioned second aspects.
第十方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第二方面中任一项的视频传输方法。In a tenth aspect, there is provided a computer program product containing instructions, which, when run on a computer, enable the computer to execute the video transmission method in any one of the above-mentioned second aspects.
另外,第四方面、第九方面和第十方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。In addition, for the technical effects brought by any one of the design methods in the fourth aspect, the ninth aspect and the tenth aspect, please refer to the technical effects brought about by different design methods in the first aspect, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的技术方案所适用的一种系统架构的示意图;FIG. 1 is a schematic diagram of a system architecture to which the technical solution provided by the embodiment of the present application is applicable;
图2为本申请实施例提供的一种编码服务器的结构示意图;FIG. 2 is a schematic structural diagram of an encoding server provided in an embodiment of the present application;
图3为本申请实施例提供的一种传输服务器的结构示意图;FIG. 3 is a schematic structural diagram of a transmission server provided by an embodiment of the present application;
图4为本申请实施例提供的一种终端的结构示意图;FIG. 4 is a schematic structural diagram of a terminal provided in an embodiment of the present application;
图5为本申请实施例提供的一种视频传输方法的交互示意图;FIG. 5 is an interactive schematic diagram of a video transmission method provided by an embodiment of the present application;
图6为本申请实施例提供的另一种视频传输方法的交互示意图;FIG. 6 is an interactive schematic diagram of another video transmission method provided by the embodiment of the present application;
图7为本申请实施例提供的一种视频传输方法的流程示意图;FIG. 7 is a schematic flowchart of a video transmission method provided by an embodiment of the present application;
图8为本申请实施例提供的一种播放视频的流程示意图;FIG. 8 is a schematic flow chart of playing a video provided in an embodiment of the present application;
图9为本申请实施例提供的另一种视频传输方法的交互示意图;FIG. 9 is an interactive schematic diagram of another video transmission method provided by the embodiment of the present application;
图10为本申请实施例提供的另一种终端的结构示意图;FIG. 10 is a schematic structural diagram of another terminal provided by an embodiment of the present application;
图11为本申请实施例提供的另一种服务器的结构示意图。FIG. 11 is a schematic structural diagram of another server provided by the embodiment of the present application.
具体实施方式Detailed ways
在HLS技术中,终端所请求的分片从低码率切换为高码率时,已缓存但未播放的低码率分片会失去作用,从而造成传输资源和缓存资源的浪费。例如,假设终端已请求并缓存了低码率分片1~10,且当前正在播放分片5;若终端在播放分片5时,检测到当前网络状况较好,则可以向服务器请求高码率的分片6,这样,已缓存但未播放的低码率的分片6会失去作用,从而造成传输资源和缓存资源的浪费。In HLS technology, when the segment requested by the terminal is switched from a low bit rate to a high bit rate, the cached but unplayed low bit rate segment will lose its function, resulting in a waste of transmission resources and cache resources. For example, assume that the terminal has requested and cached low-bit-rate segments 1-10, and is currently playing segment 5; In this way, the cached but unplayed low-bit-rate fragment 6 will be useless, thereby causing a waste of transmission resources and cache resources.
基于此,本申请实施例提供了一种视频传输方法和装置,其基本原理为:终端请求主流分片,并按需请求辅流分片;其中,辅流分片用于提高主流分片的码率。现有技术中,不同码率的同一内容的分片独立存在、独立传输、且择一播放。而本申请中,辅编码流的作用是为了提高主编码流的码率,即:主编码流可以单独播放,或者,主编码流与辅编码流叠加重构后播放,因此已缓存的主编码流不会因缓存辅编码流而失去作用。与现有技术相比,能够节省传输资源和缓存资源。Based on this, the embodiment of the present application provides a video transmission method and device, the basic principle of which is: the terminal requests the mainstream fragmentation, and requests the auxiliary stream fragmentation as needed; wherein, the auxiliary stream fragmentation is used to improve the efficiency of the mainstream fragmentation. code rate. In the prior art, fragments of the same content with different code rates exist independently, are transmitted independently, and one of them is played. In this application, the role of the auxiliary coded stream is to increase the code rate of the main coded stream, that is, the main coded stream can be played alone, or the main coded stream and the auxiliary coded stream can be superimposed and reconstructed to be played, so the cached main coded stream The stream will not be disabled by caching the sub-encoded stream. Compared with the prior art, transmission resources and cache resources can be saved.
本申请实施例中所涉及的主编码流和辅编码流可以是服务器根据重构视频编码(reconstructive video coding,RVC)技术等编码后得到的码流。其中,在RVC技术中,编码器可以同时生成两路流,其中一路为主编码流,一路为辅编码流。主编码流为分辨率较低的视频码流,播放器可以直接解码播放。辅编码流的作用是协助播放器对主编码流进行分辨率的提升。比如,主编码流的码率为720p,通过进行超分辨率操作,叠加辅编码流后进行重构,即可将该码率提升到1080p,从而提升视频的播放质量。当然,本申请实施例不限定于RVC技术这一种编码技术,还可以是其他的编码技术。The primary coded stream and the secondary coded stream involved in the embodiment of the present application may be coded streams obtained by the server after coding according to reconstructive video coding (reconstructive video coding, RVC) technology and the like. Wherein, in the RVC technology, the encoder can generate two streams at the same time, one of which is the main encoding stream and the other is the auxiliary encoding stream. The main encoded stream is a video stream with a lower resolution, which can be directly decoded and played by the player. The role of the auxiliary coded stream is to assist the player to improve the resolution of the main coded stream. For example, the bit rate of the main encoding stream is 720p. By performing super-resolution operations, superimposing the auxiliary encoding stream and then reconstructing, the bit rate can be increased to 1080p, thereby improving the playback quality of the video. Certainly, the embodiment of the present application is not limited to the encoding technique of the RVC technique, and may also be other encoding techniques.
本申请实施例提供的技术方案可以应用于如图1所示的系统架构中,图1所示的系统包:编码服务器11、传输服务器12和终端13。编码服务器11用于按照某种编码技术对视频内容进行编码,并将编码结果传输至传输服务器12。传输服务器12用于保存编码结果,并在接收到终端13发送的分片请求时,向终端13发送编码后的分片。终端13用于根据用户指示或者自身触发向传输服务器12发送分片请求,并对接收到传输服务器12发送的编码后的分片进行解码和播放。The technical solutions provided by the embodiments of the present application can be applied to the system architecture shown in FIG. 1 , and the system packages shown in FIG. 1 are: an encoding server 11 , a transmission server 12 and a terminal 13 . The encoding server 11 is used to encode video content according to a certain encoding technology, and transmit the encoding result to the transmission server 12 . The transmission server 12 is used to save the encoding result, and send the encoded segment to the terminal 13 when receiving the segment request sent by the terminal 13 . The terminal 13 is configured to send a fragmentation request to the transmission server 12 according to the user's instruction or its own trigger, and decode and play the coded fragmentation received from the transmission server 12 .
需要说明的是,图1仅为示例图,其中,本申请实施例对编码服务器11的个数、传输服务器12的个数和至少一个终端13的个数均不进行限定,在实际应用中,可以根据需要以不同于图1所示的个数进行网络部署。It should be noted that FIG. 1 is only an exemplary diagram, and the embodiment of the present application does not limit the number of encoding servers 11, the number of transmission servers 12, and the number of at least one terminal 13. In practical applications, Network deployment can be performed with a number different from that shown in FIG. 1 as required.
可选的,传输服务器12与终端13之间可以建立一条或多条链路,并在这些链路上传输分片请求和分片。其中,这里的链路可以是HTTP/2链路,该情况下,传输服务器12可以是支持HTTP/2的服务器。当然,具体实现时不限于此。Optionally, one or more links may be established between the transmission server 12 and the terminal 13, and the fragmentation request and the fragmentation are transmitted on these links. Wherein, the link here may be an HTTP/2 link, and in this case, the transmission server 12 may be a server supporting HTTP/2. Of course, the specific implementation is not limited to this.
为了实现本申请实施例提供的技术方案,如图2所示,图1中的编码服务器11可以包括:下采样模块1101、主流编码器1102、辅流生成模块1103、分片控制模块1104、主流封装分片模块1105和辅流封装分片模块1106。In order to realize the technical solution provided by the embodiment of the present application, as shown in FIG. 2, the encoding server 11 in FIG. Encapsulation and fragmentation module 1105 and auxiliary stream encapsulation and fragmentation module 1106 .
其中,下采样模块1101用于接收原始视频输入流,并对所输入的原始视频输入流进行降码率,并将降码率后得到的视频流输出至主流编码器1102。例如,接收4K的YUV格式的视频输入流,并对4K的YUV格式的视频输入流降码率,生成2K的YUV格式的视频流,然后将该2K的YUV格式的视频流输出至主流编码器1102。其中,YUV是一种色彩数据的编码格式。Wherein, the down-sampling module 1101 is used for receiving the original video input stream, and reducing the code rate of the input original video input stream, and outputting the video stream obtained after the code rate reduction to the mainstream encoder 1102 . For example, receive a 4K YUV format video input stream, and reduce the bit rate of the 4K YUV format video input stream to generate a 2K YUV format video stream, and then output the 2K YUV format video stream to the mainstream encoder 1102. Among them, YUV is a coding format of color data.
主流编码器1102用于接收下采样模块1101输入的视频流,并对该视频流进行编码,例如H.264编码等,生成主编码流,然后将主编码流输出至主流封装分片模块1105。The mainstream encoder 1102 is used to receive the video stream input by the down-sampling module 1101 , and encode the video stream, such as H.264 encoding, to generate a main encoded stream, and then output the main encoded stream to the mainstream encapsulation and fragmentation module 1105 .
辅流信息生成模块1103用于比较下采样模块1101输出的视频流与主流编码器1102输出的主编码流,生成辅编码流。其中,辅编码流包含重构用于提高视频质量的内容,例如对主编码流中的部分像素点进行修正的信息等。The auxiliary stream information generating module 1103 is used for comparing the video stream output by the down-sampling module 1101 with the main encoded stream output by the mainstream encoder 1102 to generate an auxiliary encoded stream. Wherein, the secondary coded stream includes reconstructed content for improving video quality, such as information for correcting some pixels in the main coded stream.
主流封装分片模块1105用于接收主流编码器1102输出的主编码流,并在分片控制模块1104的控制下,按照时间点对主编码流进行分片及封装,得到至少两个主流分片,例如TS(transport stream)分片或者mp4分片等,然后输出该至少两个主流分片。The mainstream encapsulation and fragmentation module 1105 is used to receive the main encoded stream output by the mainstream encoder 1102, and under the control of the fragmentation control module 1104, fragment and encapsulate the main encoded stream according to time points to obtain at least two mainstream fragments , such as TS (transport stream) fragments or mp4 fragments, etc., and then output the at least two mainstream fragments.
辅流封装切片模块1106用于接收辅流生成模块1103输出的辅编码流,并在分片控制模块1104的控制下,按照时间对辅编码流进行分片及封装,得到至少两个辅流分片,然后输出该至少两个辅流分片。其中,辅流分片的格式可以是自定义格式,每个辅流分片与一个主流分片对应,每个辅流分片的时间点与其对应的主流分片的时间点相同,每个辅流分片用于提高其所对应的主流分片的码率。The auxiliary stream encapsulation and slicing module 1106 is used to receive the auxiliary encoded stream output by the auxiliary stream generating module 1103, and under the control of the fragmentation control module 1104, fragment and encapsulate the auxiliary encoded stream according to time to obtain at least two auxiliary stream segments slice, and then output the at least two auxiliary stream slices. Among them, the format of the auxiliary stream segment can be a custom format, each auxiliary stream segment corresponds to a main stream segment, and the time point of each auxiliary stream segment is the same as that of the corresponding main stream segment, and each auxiliary stream Stream fragmentation is used to increase the code rate of its corresponding mainstream fragmentation.
分片控制模块1104用于对主流封装分片模块1105的执行过程和辅流封装分片模块1106的执行过程进行控制,并生成描述分片(包括主流分片和辅流分片)的仓单文件,然后输出该仓单文件。其中,仓单文件可以包括每个分片的时间点,每个主流分片与每个主流分片的对应关系等等。The fragmentation control module 1104 is used to control the execution process of the main stream encapsulation fragmentation module 1105 and the auxiliary stream encapsulation fragmentation module 1106, and generate a warehouse receipt describing fragmentation (including mainstream fragmentation and auxiliary stream fragmentation) file, and then output the warehouse receipt file. Wherein, the warehouse receipt file may include the time point of each fragment, the corresponding relationship between each mainstream fragment and each mainstream fragment, and so on.
另外,编码服务器11还可以包括通信接口,用于与外部设备(例如传输服务器2)进行通信。例如,用于接收主流封装分片模块1105输出的主流分片、辅流封装分片模块1106输出的辅流分片,以及分片控制模块1104输出的仓单文件;并将这些信息,发送至WEB服务器,其中,该WEB服务器可以是支持HTTP/2协议的WEB服务器,该服务器可以为上文中的传输服务器12。In addition, the encoding server 11 may also include a communication interface for communicating with external devices (such as the transmission server 2). For example, it is used to receive the main stream segment output by the mainstream encapsulation segment module 1105, the auxiliary stream segment output by the auxiliary stream encapsulation segment module 1106, and the warehouse receipt file output by the segment control module 1104; and send these information to A WEB server, wherein the WEB server may be a WEB server supporting the HTTP/2 protocol, and the server may be the transmission server 12 above.
在硬件实现上,通信接口1107可以是收发器,下采样模块1101、主流编码器1102、辅流信息生成模块1103、分片控制模块1104、主流封装分片模块1105和辅流封装分片模块1106均可以以硬件形式内嵌于或独立于编码服务器11的处理器中,也可以以软件的形式存储于编码服务器11的存储器中,以便于处理器调用执行以上各个模块对应的操作。另外,编码服务器11除了包含收发器、处理器和存储器之外,还可以包含通信总线,用于使收发器、处理器和存储器相互连接。In terms of hardware implementation, the communication interface 1107 can be a transceiver, down-sampling module 1101, mainstream encoder 1102, auxiliary stream information generation module 1103, fragmentation control module 1104, mainstream encapsulation fragmentation module 1105 and auxiliary stream encapsulation fragmentation module 1106 All can be embedded in or independent of the processor of the encoding server 11 in the form of hardware, and can also be stored in the memory of the encoding server 11 in the form of software, so that the processor can call and execute the corresponding operations of the above modules. In addition, besides the transceiver, the processor and the memory, the encoding server 11 may also include a communication bus for interconnecting the transceiver, the processor and the memory.
为了实现本申请实施例提供的技术方案,如图3所示,图1中的传输服务器12可以包括:通信接口1201、处理器1202、存储器1203和通信总线1204。其中,通信接口1201、处理器1202以及存储器1203通过通信总线1204相互连接。In order to implement the technical solution provided by the embodiment of the present application, as shown in FIG. 3 , the transmission server 12 in FIG. 1 may include: a communication interface 1201 , a processor 1202 , a memory 1203 and a communication bus 1204 . Wherein, the communication interface 1201 , the processor 1202 and the memory 1203 are connected to each other through a communication bus 1204 .
通信接口1201为传输服务器12与外部网元(如编码服务器11和终端13)之间进行业务数据流交互的单元。具体的,通信接口1201可以用于接收编码服务器11发送的各主流分片、各辅流分片以及仓单文件。或者,接收终端13发送的主流分片请求、辅流编码请求或者中断请求,或者,向终端13回复所请求的主流分片、辅流分片或者仓单文件等。存储器1203可以用于存储数据和/或代码,处理器1302可以通过运行或执行存储在存储器1203内的程序代码,以及调用存储在存储器1203内的数据,实现传输服务器12的各种功能。The communication interface 1201 is a unit for exchanging service data streams between the transmission server 12 and external network elements (such as the encoding server 11 and the terminal 13 ). Specifically, the communication interface 1201 may be used to receive the main stream segments, the auxiliary stream segments and the warehouse receipt file sent by the encoding server 11 . Or, receive the main stream fragmentation request, auxiliary stream encoding request or interrupt request sent by the terminal 13, or reply the requested main stream fragmentation, auxiliary stream fragmentation or warehouse receipt file to the terminal 13. The memory 1203 can be used to store data and/or codes, and the processor 1302 can implement various functions of the transmission server 12 by running or executing program codes stored in the memory 1203 and calling data stored in the memory 1203 .
可以理解的,图3中示出的传输服务器12并不构成对传输服务器12的限定,实际实现时,传输服务器12还可以包括比图示更多的部件,或者组合某些部件,或者不同的部件布置。例如传输服务器12还可以包含电源(power)、风扇(fan)、时钟(clock,CLK)等。It can be understood that the transmission server 12 shown in FIG. 3 does not constitute a limitation on the transmission server 12. In actual implementation, the transmission server 12 may also include more components than shown in the figure, or combine certain components, or use different Part placement. For example, the transmission server 12 may also include a power supply (power), a fan (fan), a clock (clock, CLK) and the like.
为了实现本申请实施例提供的技术方案,如图4所示,图1中的终端13可以包括:通信接口1301、处理器1302、存储器1303、通信总线1304、播放器1305和显示屏1306。其中,通信接口1301、处理器1302、存储器1303、播放器1305以及显示屏1306通过通信总线1304相互连接。In order to realize the technical solution provided by the embodiment of the present application, as shown in FIG. Wherein, the communication interface 1301 , the processor 1302 , the memory 1303 , the player 1305 and the display screen 1306 are connected to each other through a communication bus 1304 .
通信接口1303为终端13与外部网元(如传输服务器12)之间进行业务数据流交互的单元。具体的,通信接口1303可以用于向传输服务器12发送主流分片请求、辅流编码请求或者中断请求,或者,接收传输服务器发送的主流分片、辅流分片或者仓单文件等。存储器1303可以用于存储数据和/或代码,处理器1302可以通过运行或执行存储在存储器1303内的程序代码,以及调用存储在存储器1303内的数据,实现终端13的各种功能。The communication interface 1303 is a unit for exchanging service data flows between the terminal 13 and an external network element (such as the transmission server 12). Specifically, the communication interface 1303 may be used to send a main stream segment request, a secondary stream encoding request, or an interruption request to the transmission server 12, or receive a mainstream segment, secondary stream segment, or warehouse receipt file sent by the transport server. The memory 1303 can be used to store data and/or codes, and the processor 1302 can implement various functions of the terminal 13 by running or executing program codes stored in the memory 1303 and calling data stored in the memory 1303 .
可以理解的,图4中示出的终端13并不构成对终端13的限定,实际实现时,终端13还可以包括比图示更多的部件,或者组合某些部件,或者不同的部件布置。例如终端13还可以包含电源、风扇、时钟等。It can be understood that the terminal 13 shown in FIG. 4 does not constitute a limitation on the terminal 13. In actual implementation, the terminal 13 may include more components than shown in the figure, or combine certain components, or arrange different components. For example, the terminal 13 may also include a power supply, a fan, a clock, and the like.
另外,通信接口1201和通信接口1301均可以包括接收单元和发送单元,具体可以是收发器或者传输接口等。In addition, both the communication interface 1201 and the communication interface 1301 may include a receiving unit and a sending unit, which may specifically be a transceiver or a transmission interface.
处理器1202和处理器1302可以包含多个中央处理器(central processing unit,CPU)或者包含多个网络处理器(network processing unit,CPU),可以是特定集成电路(application specific integrated circuit,ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路,例如:一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA),也可以为多核系统级芯片(system on chip,SoC)。The processor 1202 and the processor 1302 may include multiple central processing units (central processing unit, CPU) or multiple network processors (network processing unit, CPU), and may be specific integrated circuits (application specific integrated circuit, ASIC), Or one or more integrated circuits configured to implement the embodiments of the present application, for example: one or more microprocessors (digital signal processor, DSP), or, one or more field programmable gate arrays (field programmable gate array, FPGA), or a multi-core system-on-chip (system on chip, SoC).
存储器1203和存储器1303均可以是易失性存储器(volatile memory),如:随机存取存储器(random-access memory,RAM);也可以是非易失性存储器(non-volatilememory),如:只读存储器(read-only memory,ROM)、快闪存储器(flash memory),硬盘(hard disk drive,HDD),还可以是固态硬盘(solid-state drive,SSD),或者上述种类的存储器的组合。通信总线1204和通信总线1304均可以分为地址总线、数据总线、控制总线等,可以是以太网总线、工业标准体系结构(industry standard architecture,ISA)总线、外部设备互连(peripheral component,PCI)总线或扩展工业标准体系结构(extendedindustry standard architecture,EISA)总线等。为便于表示,图3和图4中仅用一条粗线表示各个通信总线,但并不表示仅有一根总线或一种类型的总线。Both the memory 1203 and the memory 1303 can be volatile memory (volatile memory), such as: random-access memory (random-access memory, RAM); they can also be non-volatile memory (non-volatile memory), such as: read-only memory (read-only memory, ROM), flash memory (flash memory), hard disk (hard disk drive, HDD), solid-state drive (solid-state drive, SSD), or a combination of the above-mentioned types of memory. Both the communication bus 1204 and the communication bus 1304 can be divided into address bus, data bus, control bus, etc., and can be Ethernet bus, industry standard architecture (industry standard architecture, ISA) bus, peripheral component interconnection (peripheral component, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, and the like. For ease of representation, only one thick line is used to represent each communication bus in FIG. 3 and FIG. 4 , but it does not mean that there is only one bus or one type of bus.
需要说明的是,上文中均是是编码服务器11和传输服务器12为独立的设备进行描述的,具体实现时,这两个设备还可以是集成在一起的,另外,这两个设备中的任一个设备还可以与其他的网络侧设备集成在一起,本申请实施例对此不进行限定。It should be noted that, the encoding server 11 and the transmission server 12 are described above as independent devices. During specific implementation, these two devices can also be integrated together. In addition, any of the two devices A device may also be integrated with other network-side devices, which is not limited in this embodiment of the present application.
为了便于描述,以下实施例以步骤的形式示出并详细描述了本发明提供的视频传输方法,其中,示出的步骤也可以在除图3所示的传输服务器12和图4所示的终端13之外的其他任一计算机中执行。此外,虽然在方法流程图中示出了本申请实施例提供的视频传输方法的逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。For the convenience of description, the following embodiment shows and describes in detail the video transmission method provided by the present invention in the form of steps. Execute on any computer other than 13. In addition, although the logical order of the video transmission method provided by the embodiment of the present application is shown in the method flow chart, in some cases, the steps shown or described may be performed in a different order than here.
需要说明的是,下文中提供的实施例中所描述的“服务器”具体可以是上文中描述的传输服务器12。本文中的“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。本文中的“多个”是指两个或两个以上。It should be noted that the "server" described in the embodiments provided below may specifically be the transmission server 12 described above. "And/or" in this article is just a relationship describing the relationship between related objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship. "Plurality" herein means two or more.
如图5所示,为本申请实施例提供的一种视频传输方法的交互示意图。图5所示的方法可以包括以下步骤S101~S104:As shown in FIG. 5 , it is a schematic diagram of interaction of a video transmission method provided by the embodiment of the present application. The method shown in FIG. 5 may include the following steps S101-S104:
S101:终端向服务器获取待播放视频的仓单文件。S101: The terminal acquires the warehouse receipt file of the video to be played from the server.
待播放视频可以是终端向服务器请求的任意一段视频。该视频可以包括主编码流和辅编码流,辅编码流用于提高主编码流的码率,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。其中,主编码流和辅编码流的生成过程及其分片过程,可以参考上文,此处不再赘述。The video to be played may be any video requested by the terminal from the server. The video may include a main coded stream and an auxiliary coded stream. The auxiliary coded stream is used to increase the code rate of the main coded stream. The main coded stream includes at least two main stream slices, and the auxiliary encoded stream includes at least two auxiliary stream slices. A slice corresponds to a secondary stream slice. Wherein, the generation process of the main coded stream and the auxiliary coded stream and the fragmentation process can refer to the above, and will not be repeated here.
待播放视频的仓单文件可以包括但不限于:该至少两个主流分片中的每个主流分片的信息,以及该至少两个辅流分片中的每个辅流分片的信息。例如,每个分片(包括主流分片和辅流分片)的时间点,主流分片与辅流分片的对应关系等等。每个主流分片的时间点和与其对应的辅流分片的时间点相同。The warehouse receipt file of the video to be played may include, but is not limited to: information about each of the at least two main stream segments, and information about each of the at least two auxiliary stream segments. For example, the time point of each segment (including the mainstream segment and the auxiliary stream segment), the corresponding relationship between the mainstream segment and the auxiliary stream segment, and so on. The time point of each mainstream segment is the same as the time point of its corresponding auxiliary stream segment.
当用户需要播放一个视频时,可以向终端发送指示信息,例如通过触屏操作,文字输入,语音输入等方式发送指示信息;终端检测到该指示信息之后,若确定该终端已与服务器之间建立连接,则向该服务器请求待播放视频的仓单文件;若确定该终端没有与服务器之间建立连接,则先与该服务器之间建立连接,再向该服务器请求待播放时频的仓单文件。其中,关于终端与服务器之间建立连接的过程,以及终端向服务器请求仓单文件的具体实现过程可参考现有技术,此处不再赘述。When the user needs to play a video, he can send instruction information to the terminal, such as through touch screen operation, text input, voice input, etc.; after the terminal detects the instruction information, if it determines that the terminal has established a connection with the server connection, request the warehouse receipt file of the video to be played from the server; if it is determined that the terminal has not established a connection with the server, establish a connection with the server first, and then request the warehouse receipt file of the time-frequency to be played from the server . For the process of establishing a connection between the terminal and the server, and the specific implementation process of the terminal requesting the warehouse receipt file from the server, reference may be made to the prior art, which will not be repeated here.
S102:终端解析仓单文件,得到待播放视频的每个分片的时间点,每个主流分片与辅流分片的对应关系等。S102: The terminal parses the warehouse receipt file, and obtains the time point of each segment of the video to be played, the corresponding relationship between each mainstream segment and auxiliary stream segment, etc.
S103:终端向服务器获取待播放视频的主流分片,并在当前实时网络状况满足预设条件时,获取主流分片对应的辅流分片;以及缓存获取到的每个分片。S103: The terminal acquires the mainstream segment of the video to be played from the server, and when the current real-time network condition meets the preset condition, acquires the auxiliary stream segment corresponding to the mainstream segment; and caches each acquired segment.
终端可以根据检测到的用户发送的指示信息,确定向服务器请求待播放时频中的哪个主流分片,接着,终端可以在接收到服务器回复的该主流分片之后,向该服务器请求该主流分片的下一个主流分片,依次类推,直至终端向服务器请求到该待播放视频的最后一个分片为止。例如,假设待播放视频包括10个主流分片,那么,用户发送的指示信息所指示的播放起始时刻所对应的主流分片可以是第1个主流分片,也可以是第5个主流分片等。若所指示的播放起始时刻所对应的主流分片是第5个主流分片,则终端可以向服务器请求第5个主流分片,并在接收到服务器回复的第5个主流分片之后,向服务器请求第6个主流分片,依次类推,直至终端请求到第10个主流分片为止。The terminal can determine which mainstream segment in the time-frequency to be played is requested from the server according to the detected indication information sent by the user, and then, after receiving the mainstream segment returned by the server, the terminal can request the server for the mainstream segment. The next mainstream segment of the video, and so on, until the terminal requests the server for the last segment of the video to be played. For example, assuming that the video to be played includes 10 mainstream segments, then the mainstream segment corresponding to the playback start moment indicated by the indication information sent by the user may be the first mainstream segment or the fifth mainstream segment. film etc. If the mainstream segment corresponding to the indicated playback start time is the fifth mainstream segment, the terminal may request the server for the fifth mainstream segment, and after receiving the fifth mainstream segment replied by the server, Request the server for the 6th mainstream fragment, and so on until the terminal requests the 10th mainstream fragment.
当前网络状况不是一成不变的,其可以随着环境、负载等因素的变化而实时变化。终端可以周期性地检测当前网络状况,当检测周期较小时,可以认为是实时检测当前网络状况。其中,检测当前网络状况可以包括但不限于检测以下参数中的至少一种:网络时延,网络丢包率和网络波动系统。其具体检测过程可以参考现有技术,此处不再赘述。The current network status is not static, and may change in real time as factors such as environment and load change. The terminal can detect the current network status periodically, and when the detection period is short, it can be considered as real-time detection of the current network status. Wherein, detecting the current network status may include but not limited to detecting at least one of the following parameters: network delay, network packet loss rate and network fluctuation system. For the specific detection process, reference may be made to the prior art, which will not be repeated here.
需要说明的是,在本申请实施例提供的技术方案中,当前实时网络状况,是指终端执行检测网络状况这一动作时,所检测到的网络状况。也就是说,本申请实施例的不同步骤中涉及到的“当前实时网络状况”所代表的含义,需要根据实际实现或实际语境确定,而不能认为不同步骤中的同一个词“当前实时网络状况”表示同一时刻测量得到的网络状况。类似地,“当前播放时刻”是指终端正在播放的时刻。It should be noted that, in the technical solutions provided by the embodiments of the present application, the current real-time network status refers to the detected network status when the terminal executes the action of detecting the network status. That is to say, the meaning of the "current real-time network status" involved in the different steps of the embodiments of the present application needs to be determined according to the actual implementation or the actual context, and the same word "current real-time network status" in different steps cannot be considered "Status" indicates the network status measured at the same time. Similarly, the "current playing moment" refers to the moment when the terminal is playing.
当前实时网络状况满足预设条件,可以理解为,当前网络状况的质量较好,即通信质量较好。该情况下,终端可以向服务器请求辅流分片,以将该辅流分片与主流分片叠加并重构,从而提高该辅流分片对应的主流分片的码率,进而提高用户观看视频的体验。当前实时网络状况满足预设条件,可以包括以下至少一种:当前网络时延小于或等于第一阈值,当前网络丢包率小于或等于第二阈值,当前网络波动系数小于或等于第三阈值。本申请实施例对第一阈值、第二阈值和第三阈值的具体取值以及如何取值不进行限定。The current real-time network condition satisfies the preset condition, which can be understood as that the quality of the current network condition is relatively good, that is, the communication quality is relatively good. In this case, the terminal can request the auxiliary stream segment from the server to superimpose and reconstruct the auxiliary stream segment with the main stream segment, so as to increase the code rate of the mainstream segment corresponding to the auxiliary stream segment, thereby improving the viewing experience of the user. Video experience. The current real-time network condition satisfies the preset condition, which may include at least one of the following: the current network delay is less than or equal to the first threshold, the current network packet loss rate is less than or equal to the second threshold, and the current network fluctuation coefficient is less than or equal to the third threshold. The embodiment of the present application does not limit specific values and how to take the first threshold, the second threshold, and the third threshold.
在本申请实施例中,终端可以独立缓存主流分片和辅流分片,例如,在终端中开辟特定的两部分存储空间,其中一部分存储空间用于存储主流分片,另一部分存储空间用于存储辅流分片。或者,终端可以集成缓存主流分片和辅流分片,例如,在终端中开辟特定的存储空间,并在该存储空间中存储主流分片和辅流分片。In this embodiment of the present application, the terminal can independently cache the main stream slices and auxiliary stream slices, for example, open up two specific storage spaces in the terminal, one part of the storage space is used to store the main stream slices, and the other part of the storage space is used for Store content fragments. Alternatively, the terminal may cache the mainstream segment and the auxiliary stream segment integratedly, for example, open a specific storage space in the terminal, and store the mainstream segment and the auxiliary stream segment in the storage space.
下面说明终端获取一个主流分片和其对应的辅流分片的过程。如图6所示,该方法包括以下步骤S11~S16:The following describes the process for the terminal to obtain a mainstream segment and its corresponding auxiliary stream segment. As shown in Figure 6, the method includes the following steps S11-S16:
S11:终端向服务器发送第一主流分片请求,第一主流分片请求用于请求第一主流分片。S11: The terminal sends a first mainstream fragmentation request to the server, where the first mainstream fragmentation request is used to request the first mainstream fragmentation.
第一主流分片请求中可以包括第一主流分片的标识,例如第一主流分片的时间点,或者第一主流分片的索引等。第一主流分片,可以是该至少两个主流分片中的任意一个主流分片,具体可以是从指示信息所指示的播放起始时刻所对应的主流分片开始至待播放视频包括的最后一个主流分片中的任意一个主流分片。The first mainstream segment request may include an identifier of the first mainstream segment, for example, a time point of the first mainstream segment, or an index of the first mainstream segment. The first mainstream segment may be any one of the at least two mainstream segments, specifically, it may be from the mainstream segment corresponding to the playback start moment indicated by the indication information to the last segment included in the video to be played. Any mainstream shard in a mainstream shard.
S12:服务器接收终端发送的第一主流分片请求,并根据第一主流分片请求向终端发送第一主流分片。S12: The server receives the first mainstream fragmentation request sent by the terminal, and sends the first mainstream fragmentation to the terminal according to the first mainstream fragmentation request.
S13:终端接收服务器发送的第一主流分片,并缓存第一主流分片。S13: The terminal receives the first mainstream segment sent by the server, and caches the first mainstream segment.
S14:若当前实时网络状况满足预设条件,则终端向服务器发送第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片。S14: If the current real-time network condition satisfies the preset condition, the terminal sends a first auxiliary stream segment request to the server, wherein the first auxiliary stream segment request is used to request the first auxiliary stream segment corresponding to the first main stream segment .
第一辅流分片请求中可以包括第一辅流分片的标识,例如第一辅流分片的时间点,或者第一辅流分片的索引等。The first auxiliary stream segment request may include an identifier of the first auxiliary stream segment, for example, a time point of the first auxiliary stream segment, or an index of the first auxiliary stream segment.
S15:服务器接收终端发送的第一辅流分片请求,并向终端发送第一辅流分片。S15: The server receives the first auxiliary stream segment request sent by the terminal, and sends the first auxiliary stream segment to the terminal.
S16:终端接收服务器发送的第一辅流分片,并缓存第一辅流分片。S16: The terminal receives the first auxiliary stream segment sent by the server, and caches the first auxiliary stream segment.
S11~S13为获取第一主流分片的过程,S14~S16为获取第一辅流分片的过程;本申请实施例对S11~S13和S14~S16的执行顺序不进行限定,例如,可以先执行S11~S13再执行S14~S16,也可以先执行S14~S16再执行S11~S13,还可以在执行S11~S13的过程中执行S14~S16。也就是说,终端获取一个主流分片的过程和获取该主流分片对应的辅流分片的过程可以不分先后。S11-S13 is the process of obtaining the first mainstream segment, and S14-S16 is the process of obtaining the first auxiliary stream segment; the embodiment of the present application does not limit the execution order of S11-S13 and S14-S16, for example, you can first Execute S11-S13 and then execute S14-S16, or execute S14-S16 first and then execute S11-S13, or execute S14-S16 during the execution of S11-S13. That is to say, the process of the terminal acquiring a mainstream segment and the process of acquiring the auxiliary stream segment corresponding to the mainstream segment may not be sequenced.
下面说明终端获取多个主流分片和每个主流分片对应的辅流分片的过程。The following describes the process in which the terminal obtains multiple mainstream segments and the auxiliary stream segment corresponding to each mainstream segment.
对于终端来说,其一般是按照时间点区分请求各主流分片的先后顺序;并且,可以按照时间点区分请求各辅流分片的先后顺序,也可以不按照时间点区分请求各辅流分片的先后顺序。对于同一个时间点的主流分片和辅流分片(即主流分片和该主流分片对应的辅流分片)的请求顺序,可以不进行限定。For the terminal, it generally distinguishes the order of requesting the main stream fragments according to the time point; and, it can distinguish the order of requesting the auxiliary stream fragments according to the time point, or it can not distinguish the order of requesting the auxiliary stream fragments according to the time point. The sequence of the slices. There is no limitation on the request order of the main stream slice and the auxiliary stream slice (ie, the main stream slice and the auxiliary stream slice corresponding to the main stream slice) at the same time point.
对于服务器来说,其一般也是按照时间点向终端发送各主流分片,并按照时间向终端发送各辅流分片。对于同一个时间点的主流分片和辅流分片(即主流分片和该主流分片对应的辅流分片)的发送顺序,在本申请实施例中,可以通过设置优先级的方式确定。可选的,服务器和终端可以预先约定好,或者服务器和终端之间通过信令方式约定主流分片和该主流分片对应的辅流分片的优先级。例如,使用HTTP/2的PRIORITY帧设置优先级。例如,终端在向服务器发送主流分片请求和/或辅流分片请求时,携带所请求的主流分片和/或辅流分片的优先级。可选的,考虑到主流分片可以单独播放,而辅流分片需要与主流分片一起才可播放,可以设置主流分片的优先级高于该主流分片对应的辅流分片的优先级,从而保证主流分片可以优先传输,进而保证主流分片的播放连续性;也就是说,服务器在向终端发送一个主流分片之后,才会向其发送该主流分片对应的辅流分片。For the server, it generally also sends each main stream segment to the terminal according to the time point, and sends each auxiliary stream segment to the terminal according to the time point. For the sending order of the main stream slice and the auxiliary stream slice at the same time point (that is, the main stream slice and the auxiliary stream slice corresponding to the main stream slice), in the embodiment of this application, it can be determined by setting the priority . Optionally, the server and the terminal may agree in advance, or the server and the terminal may agree on the priorities of the main stream segment and the auxiliary stream segment corresponding to the main stream segment through signaling. For example, use HTTP/2's PRIORITY frame to set priorities. For example, when the terminal sends the request for the main stream segment and/or the auxiliary stream segment to the server, it carries the requested priority of the main stream segment and/or the auxiliary stream segment. Optionally, considering that the mainstream segment can be played alone, and the auxiliary stream segment needs to be played together with the mainstream segment, you can set the priority of the mainstream segment to be higher than that of the auxiliary stream segment corresponding to the mainstream segment level, so as to ensure that the mainstream segment can be transmitted first, and then ensure the continuity of the playback of the mainstream segment; that is, the server will send the auxiliary stream segment corresponding to the mainstream segment to the terminal after sending a mainstream segment piece.
基于此,终端获取多个主流分片和每个主流分片对应的辅流分片的过程,如图7所示,具体可以包括如下步骤S21~S24:Based on this, the process for the terminal to obtain multiple mainstream slices and auxiliary stream slices corresponding to each mainstream slice, as shown in FIG. 7 , may specifically include the following steps S21-S24:
S21:终端向服务器获取第i个主流分片,并缓存第i个主流分片。S21: The terminal acquires the i-th mainstream fragment from the server, and caches the i-th mainstream fragment.
其中,第i个主流分片是指待播放视频的第i个主流分片,i是大于等于1的整数,i的初始值为1,i的最大值为待播放视频中包含的主流分片的数量。Among them, the i-th mainstream segment refers to the i-th mainstream segment of the video to be played, i is an integer greater than or equal to 1, the initial value of i is 1, and the maximum value of i is the mainstream segment contained in the video to be played quantity.
S22:终端判断是否请求第i个主流分片对应的辅流分片。S22: The terminal judges whether to request the auxiliary stream segment corresponding to the i-th mainstream segment.
若是,则执行步骤S23,若否,则执行步骤S24。If yes, execute step S23; if not, execute step S24.
具体的,终端在检测到当前实时网络状况满足预设条件,且没有缓存第i个辅流分片的情况下,确定需要请求第i个辅流分片;在检测到当前实时网络状况不满足预设条件,或已缓存第i个辅流分片的情况下,确定不需要请求第i个辅流分片。Specifically, when the terminal detects that the current real-time network conditions meet the preset conditions and does not cache the i-th auxiliary stream segment, it determines that it needs to request the i-th auxiliary stream segment; when detecting that the current real-time network status does not meet the Under preset conditions, or when the i-th auxiliary stream segment has been cached, it is determined that there is no need to request the i-th auxiliary stream segment.
S23:终端获取第i个主流分片对应的辅流分片,并缓存该辅流分片。S23: The terminal acquires the auxiliary stream segment corresponding to the i-th mainstream segment, and caches the auxiliary stream segment.
执行步骤S23之后,执行步骤S24。After step S23 is executed, step S24 is executed.
S24:终端判断第i个主流分片是否是待播放的最后一个主流分片。S24: The terminal judges whether the i-th mainstream segment is the last mainstream segment to be played.
若是,则结束。若否,则执行i=i+1,并返回步骤S21。If so, end. If not, execute i=i+1, and return to step S21.
可以理解的,在终端获取最后一个主流分片之后,获取该主流分片对应的辅流分片之前,可以不判断当前实时网络状况是否满足预设条件。另外,在执行完上述S21~S24之后,终端已获取到待播放的每个主流分片,以及部分或全部主流分片对应的辅流分片。可选的,该方法还可以包括:终端获取未播放的主流分片对应的未缓存的辅流分片。例如,假设待播放的主流分片按照时间点先后排序后为主流分片1~5,主流分片1~5与辅流分片1~5一一对应,那么,终端获取的主流分片和辅流分片的顺序可以是:主流分片1、辅流分片1、主流分片2、主流分片3、主流分片4、辅流分片4、主流分片5、辅流分片5。进一步地,若在获取了辅流分片5时,当前播放时刻正在播放主流分片1对应的视频内容,则终端还可以依次获取以下辅流分片:辅流分片2和辅流分片3。It can be understood that after the terminal acquires the last mainstream segment and before acquiring the auxiliary stream segment corresponding to the mainstream segment, it may not judge whether the current real-time network status satisfies the preset condition. In addition, after executing the above S21-S24, the terminal has acquired each main stream segment to be played, and auxiliary stream segments corresponding to part or all of the main stream segments. Optionally, the method may further include: the terminal acquiring an unbuffered auxiliary stream segment corresponding to an unplayed main stream segment. For example, assuming that the mainstream segments to be played are sorted according to the time points and are the mainstream segments 1-5, and the mainstream segments 1-5 are in one-to-one correspondence with the auxiliary stream segments 1-5, then the mainstream segments obtained by the terminal and The order of content fragmentation can be: Main stream slice 1, Second stream slice 1, Main stream slice 2, Main stream slice 3, Main stream slice 4, Second stream slice 4, Main stream slice 5, Second stream slice 5. Further, if the video content corresponding to the main stream segment 1 is being played at the current playback moment when the auxiliary stream segment 5 is obtained, the terminal can also obtain the following auxiliary stream segments in sequence: auxiliary stream segment 2 and auxiliary stream segment 3.
需要说明的是,具体实现时,终端在获取每个主流分片之后,若检测到当前实时网络状况满足预设条件,则获取未播放的主流分片对应的未缓存的首个辅流分片,直至获取到最后一个主流分片,接着,再获取未播放的主流分片对应的未缓存的辅流分片。或者,终端可以在获取多个主流分片之后,获取一个或多个未播放的主流分片对应的未缓存的辅流分片等,本申请实施例对此不进行限定。It should be noted that, in specific implementation, after obtaining each mainstream segment, if the terminal detects that the current real-time network conditions meet the preset conditions, it will obtain the uncached first auxiliary stream segment corresponding to the unplayed mainstream segment , until the last mainstream segment is obtained, and then, the uncached auxiliary stream segment corresponding to the unplayed mainstream segment is obtained. Alternatively, the terminal may acquire unbuffered auxiliary stream segments corresponding to one or more unplayed main stream segments after acquiring multiple mainstream segments, which is not limited in this embodiment of the present application.
S104:终端根据所缓存的分片,播放视频。S104: The terminal plays the video according to the cached segments.
终端在请求到每个分片(包括主流分片和辅流分片)之后,先缓存该分片,并在缓存至一定数量的主流分片之后,开始按照主流分片的时间点依次根据所缓存的主流分片播放待播放视频,以保证播放的连续性。需要说明的是,由于终端向服务器获取到的主流分片和辅流分片是服务器编码后得到的码流,因此,终端在播放之前,还需要对主流分片和辅流分片进行解码。另外,本申请实施例对该一定数量的具体取值以及如何取值不进行限定。After the terminal requests each fragment (including mainstream fragments and secondary stream fragments), it first caches the fragment, and after caching a certain number of mainstream The cached mainstream segment plays the video to be played to ensure the continuity of playback. It should be noted that since the main stream segment and the auxiliary stream segment obtained by the terminal from the server are code streams obtained after encoding by the server, the terminal needs to decode the main stream segment and the auxiliary stream segment before playing. In addition, the embodiment of the present application does not limit the specific value of the certain number and how to take the value.
可以理解的,对于包含多个主流分片的待播放视频而言,终端可以边获取视频边播放已缓存的视频,但是对于同一个主流分片来说,终端先获取该主流分片,再播放已缓存的该主流分片。Understandably, for a video to be played that contains multiple mainstream segments, the terminal can play the cached video while obtaining the video, but for the same mainstream segment, the terminal first obtains the mainstream segment and then plays The main stream shard that has been cached.
基于此,终端播放视频的过程,如图8所示,具体可以包括如下步骤S31~S35:Based on this, the process of playing video by the terminal, as shown in Figure 8, may specifically include the following steps S31-S35:
S31:终端按照主流分片的时间点确定第j个主流分片。其中,第j个主流分片表示终端最近将要播放的主流分片,例如,若终端当前正在播放主流分片1,则终端最近将要播放的主流分片是主流分片2。S31: The terminal determines the j-th mainstream segment according to the time point of the mainstream segment. Wherein, the jth mainstream segment indicates the mainstream segment that the terminal will play recently, for example, if the terminal is currently playing mainstream segment 1, then the mainstream segment to be played by the terminal most recently is mainstream segment 2.
其中,第j个主流分片是指待播放视频的第j个主流分片,j是大于等于1的整数,j的初始值为1,j的最大值为待播放视频中包含的主流分片的数量。Among them, the jth mainstream segment refers to the jth mainstream segment of the video to be played, j is an integer greater than or equal to 1, the initial value of j is 1, and the maximum value of j is the mainstream segment contained in the video to be played quantity.
S32:终端判断是否缓存了第j个主流分片对应的辅流分片。S32: The terminal judges whether the auxiliary stream segment corresponding to the jth mainstream segment is cached.
若是,则执行步骤S33;若否,则执行步骤S34。If yes, execute step S33; if not, execute step S34.
S33:终端播放第j个主流分片。即,播放第j个主流分片对应的视频内容。S33: The terminal plays the jth mainstream segment. That is, the video content corresponding to the jth mainstream segment is played.
执行步骤S33之后,执行步骤S35。After step S33 is executed, step S35 is executed.
S34:终端将第j个主流分片和该辅流分片进行叠加并重构,得到合成分片,播放该合成分片。S34: The terminal superimposes and reconstructs the j-th mainstream segment and the auxiliary stream segment to obtain a composite segment, and plays the composite segment.
执行步骤S34之后,执行步骤S35。After step S34 is executed, step S35 is executed.
可以理解的,步骤S33中所播放的视频内容对应的视频内容与步骤S34中所播放的合成分片对应的视频内容相同,只是二者的码率不同,因此播放质量不同。It can be understood that the video content corresponding to the video content played in step S33 is the same as the video content corresponding to the synthesized segment played in step S34, but the code rates of the two are different, so the playback quality is different.
主流分片与叠加辅流分片并重构是重构视频编码的关键步骤。由于编码服务器在对视频内容进行编码,生成主流分片的过程中,会进行降码率处理,例如将4K的视频流进行降码率,生成2K的视频流。因此,终端对主流分片解码后得到的图像帧的分辨率较低。一般地,终端在对主流分片解码之后,会对解码得到的图像进行超分辨率处理,重新将码率提升至4K;但是,提升过程中,相比原始的4K的视频流的时频质量会下降,因此可以利用辅编码流进行修正,例如补充丢失的细节,修正编码过程中引入的误差等。Fragmentation and reconstruction of mainstream and superimposed auxiliary streams are key steps in reconstructing video coding. When the encoding server encodes video content and generates mainstream fragments, it will perform bit rate reduction processing. For example, the bit rate of 4K video stream is reduced to generate 2K video stream. Therefore, the resolution of the image frame obtained by the terminal after decoding the mainstream slice is relatively low. Generally, after the terminal decodes the mainstream slice, it will perform super-resolution processing on the decoded image, and increase the bit rate to 4K again; however, during the upgrading process, the time-frequency quality of the original 4K video stream will decrease, so the auxiliary encoding stream can be used for correction, such as supplementing lost details, correcting errors introduced in the encoding process, etc.
S35:终端判断第j个主流分片是否是待播放的最后一个主流分片。S35: The terminal judges whether the jth mainstream segment is the last mainstream segment to be played.
若是,则结束。若否,则执行i=i+1,并返回步骤S31。If so, end. If not, execute i=i+1, and return to step S31.
例如,假设待播放视频包括10个主流分片,每个主流分片对应一个辅流分片,当前播放时刻所指示的主流分片为第5个主流分片,已缓存第6~10个主流分片,以及第6~7个辅流分片,则一种可能的情况为:依次播放合成分片6、合成分片7,第8~10个主流分片。其中,合成分片6是第6个主流分片和第6个辅流分片叠加并重构后得到的合成分片,合成分片7是第7个主流分片和第7个辅流分片叠加并重构后得到的合成分片。For example, suppose the video to be played includes 10 mainstream segments, and each mainstream segment corresponds to a secondary stream segment, the mainstream segment indicated at the current playback time is the fifth mainstream segment, and the sixth to tenth mainstream fragments, and the 6th to 7th auxiliary stream fragments, then a possible situation is: sequentially play synthetic fragment 6, synthetic fragment 7, and the 8th to 10th mainstream fragments. Among them, synthetic segment 6 is the composite segment obtained by superimposing and reconstructing the sixth mainstream segment and the sixth auxiliary stream segment, and synthetic segment 7 is the seventh mainstream segment and the seventh auxiliary stream segment. Composite slices obtained after the slices are superimposed and reconstructed.
本申请实施例提供的视频传输方法,终端请求主流分片,并按需请求辅流分片;其中,辅流分片用于提高主流分片的码率。由于在本申请实施例中,主编码流可以单独播放,或者,主编码流与辅编码流叠加重构后播放,因此已缓存的主编码流不会因缓存辅编码流而失去作用。与现有技术相比,能够节省传输资源和缓存资源。In the video transmission method provided by the embodiment of the present application, the terminal requests the main stream fragmentation, and requests the auxiliary stream fragmentation as needed; wherein, the auxiliary stream fragmentation is used to increase the code rate of the main stream fragmentation. In the embodiment of the present application, the main coded stream can be played alone, or the main coded stream and the auxiliary coded stream can be superimposed and reconstructed to be played, so the cached main coded stream will not lose its effect due to buffering the auxiliary coded stream. Compared with the prior art, transmission resources and cache resources can be saved.
可以理解的,终端与服务器之间可以建立一条或多条链路,在本申请实施例中,主流分片与辅流分片可以在独立的两条链路上传输,也可以在同一条链路上传输。若在同一条链路上传输,终端和服务器均只需要维护这一条链路即可,因此实现简单。示例的,这里的链路可以是HTTP/2链路。也就是说,终端在发送主流分片请求和辅流分片请求时,使用同一HTTP/2链路,即主流分片和辅流分片使用不同的HTTP/2的帧,两路流复用到同一HTTP/2链路中。It can be understood that one or more links can be established between the terminal and the server. In the embodiment of this application, the main stream fragment and the secondary stream fragment can be transmitted on two independent links, or they can be transmitted on the same link Transport on the road. If transmission is performed on the same link, both the terminal and the server only need to maintain this link, so the implementation is simple. Exemplarily, the link here may be an HTTP/2 link. That is to say, the terminal uses the same HTTP/2 link when sending the main stream segment request and the auxiliary stream segment request, that is, the main stream segment and the auxiliary stream segment use different HTTP/2 frames, and the two streams are multiplexed into the same HTTP/2 link.
上述S11~S16提供了获取第一主流分片和第一辅流分片的过程。在该过程中,还可以设置中断请求,以中断辅流分片的传输流程。如图9所示,具体可以包括以下步骤S41~S47。其中,为了与第一主流分片进行区分,下面使用第二主流分片为例进行说明。可以理解的,第二主流分片具有任意性,即终端可以中断待播放时频中的任一个辅流分片的传输流程。The above steps S11 to S16 provide a process of obtaining the first main stream segment and the first auxiliary stream segment. During this process, an interrupt request can also be set to interrupt the transmission process of the auxiliary stream segment. As shown in FIG. 9 , the following steps S41 to S47 may be specifically included. Wherein, in order to distinguish it from the first mainstream segment, the following uses the second mainstream segment as an example for illustration. It can be understood that the second mainstream segment is arbitrary, that is, the terminal can interrupt the transmission process of any auxiliary stream segment in the time-frequency to be played.
S41:终端向服务器发送第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片。S41: The terminal sends a second mainstream fragmentation request to the server, wherein the second mainstream fragmentation request is used to request a second mainstream fragmentation, and the second mainstream fragmentation is at least two mainstream fragments except the first mainstream fragmentation A mainstream shard other than .
S42:服务器接收终端发送的第二主流分片请求,并根据第二主流分片请求向服务器发送第二主流分片。S42: The server receives the second mainstream fragmentation request sent by the terminal, and sends the second mainstream fragmentation to the server according to the second mainstream fragmentation request.
S43:终端接收服务器发送的第二主流分片,并缓存第二主流分片。S43: The terminal receives the second mainstream segment sent by the server, and caches the second mainstream segment.
S44:若当前实时网络状况满足预设条件,则终端向服务器发送第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片。S44: If the current real-time network condition satisfies the preset condition, the terminal sends a second auxiliary stream fragmentation request to the server, wherein the second auxiliary stream fragmentation request is used to request the second auxiliary stream fragmentation corresponding to the second mainstream fragmentation .
其中,S41~S44的具体实现方式可以参考上文中的S11~S14。Wherein, for specific implementation manners of S41-S44, reference may be made to S11-S14 above.
S45:服务器接收终端发送的第二辅流分片请求。S45: The server receives the second auxiliary stream fragmentation request sent by the terminal.
S46:若在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,终端检测到当前实时网络状况不满足预设条件,则向服务器发送中断请求,其中,中断请求用于请求中断第二辅流分片的传输流程。S46: If the terminal detects that the current real-time network condition does not meet the preset condition after sending the second auxiliary stream segment request to the server and before receiving the second auxiliary stream segment, send an interrupt request to the server, wherein the interrupt request Used to request to interrupt the transmission process of the second auxiliary stream segment.
由于终端可以实时检测当前网络状况,因此,若终端在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,终端检测到当前实时网络状况不满足预设条件,说明此时网络状况较差,若服务器向终端发送第二辅流分片,则可能需要很长时间,从而导致终端播放视频的过程中出现卡顿等,基于此,本申请实施例提供了终端发送中断请求的技术方案。其中,该终端请求可以是HTTP/2中的RST_STREM帧,也可以是一种新的帧,或者是其他的帧,本申请实施例对此不进行限定。Since the terminal can detect the current network status in real time, if the terminal detects that the current real-time network status does not meet the preset condition after sending the second auxiliary stream segment request to the server and before receiving the second auxiliary stream segment, it means At this time, the network condition is poor. If the server sends the second substream segment to the terminal, it may take a long time, which may cause the terminal to freeze during the video playback process. Based on this, the embodiment of the present application provides the terminal to send A technical solution for an interrupt request. Wherein, the terminal request may be a RST_STREM frame in HTTP/2, or a new frame, or other frames, which is not limited in this embodiment of the present application.
可以理解的,若在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,终端检测到当前实时网络状况仍然满足预设条件,则不向服务器发送中断请求,即服务器不会接收到中断请求。该情况下,服务器会向终端发送第二辅流分片请求,终端接收第二辅流分片,并缓存该第二辅流分片,其具体实现过程可参考上文。It can be understood that if the terminal detects that the current real-time network condition still satisfies the preset condition after sending the second auxiliary stream segment request to the server and before receiving the second auxiliary stream segment, it will not send an interruption request to the server, that is, The server will not receive an interrupt request. In this case, the server sends a request for the second auxiliary stream segment to the terminal, and the terminal receives the second auxiliary stream segment and caches the second auxiliary stream segment. For the specific implementation process, refer to the above.
S47:服务器接收终端发送的中断请求,并在确定还未向终端发送第二辅流分片的情况下,根据中断请求中断第二辅流分片的传输流程。S47: The server receives the interrupt request sent by the terminal, and in a case where it is determined that the second auxiliary stream segment has not been sent to the terminal, interrupts the transmission process of the second auxiliary stream segment according to the interrupt request.
具体的,服务器在接收到中断请求之后,可以不响应第二辅流分片请求消息,即不向终端发送第二辅流分片。若服务器在接收到终端发送的中断请求时,已经向终端发送了第二辅流分片,则服务器可以丢弃该中断请求。Specifically, after receiving the interruption request, the server may not respond to the second auxiliary stream segment request message, that is, not send the second auxiliary stream segment to the terminal. If the server has already sent the second auxiliary stream segment to the terminal when receiving the interruption request sent by the terminal, the server may discard the interruption request.
可以理解的,在执行S41~S47之后,终端可能接收不到服务器发送的第二辅流分片,但是终端已获取到了第二主流分片,因此,终端可以继续向服务器请求第二主流分片的下一个主流分片。It can be understood that after executing S41-S47, the terminal may not receive the second auxiliary stream segment sent by the server, but the terminal has obtained the second main stream segment, so the terminal can continue to request the second main stream segment from the server The next mainstream shard.
本实施例提供的技术方案,终端在已向服务器发送辅流分片请求之后且未接收到所请求的辅流分片之前,若检测到当前实时网络状况不满足预设条件,可以触发中断所请求的辅流分片的传输流程。这样,能够在一定程度上减少终端获取该辅流分片对应的主流分片的下一个主流分片,从而有效较少终端播放视频的过程中出现卡顿的现象的发生。In the technical solution provided by this embodiment, after the terminal has sent the auxiliary stream fragmentation request to the server but before receiving the requested auxiliary stream fragmentation, if the terminal detects that the current real-time network conditions do not meet the preset conditions, it can trigger the interrupt. The transmission process of the requested auxiliary stream fragment. In this way, it can reduce to a certain extent that the terminal acquires the next mainstream segment of the mainstream segment corresponding to the secondary stream segment, thereby effectively reducing the occurrence of stuttering during the video playback process of the terminal.
上述主要从各个网元之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,各个网元,例如终端或者服务器。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solution provided by the embodiment of the present application from the perspective of interaction between various network elements. It can be understood that each network element, such as a terminal or a server. In order to realize the above functions, it includes corresponding hardware structures and/or software modules for performing various functions. Those skilled in the art should easily realize that the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
本申请实施例可以根据上述方法示例对终端或者服务器进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the functional modules of the terminal or server according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
比如,在采用对应各个功能划分各个功能模块的情况下,图10示出了上述实施例中所涉及的终端100的一种可能的结构示意图。该终端100包括发送单元1401和接收单元1402。可选的,还可以包括:重构单元1403和播放单元1404。其中,发送单元1401可以用于执行图6中的S11和S14中终端执行的动作,图9中的S41和S46中终端执行的动作,和/或用于支持本文所描述的技术的其它过程。接收单元可以用于执行图6中的S12和S15中终端执行的动作,图9中的S42中终端执行的动作,和/或用于支持本文所描述的技术的其它过程。重构单元1403可以用于执行图8中的S34中重构的动作,和/或用于支持本文所描述的技术的其它过程。播放单元1404可以用于执行图8中的S34中播放的动作,和/或用于支持本文所描述的技术的其它过程。For example, in the case of dividing each functional module corresponding to each function, FIG. 10 shows a possible structural diagram of the terminal 100 involved in the foregoing embodiment. The terminal 100 includes a sending unit 1401 and a receiving unit 1402 . Optionally, it may further include: a reconstruction unit 1403 and a playback unit 1404 . Wherein, the sending unit 1401 may be configured to perform the actions performed by the terminal in S11 and S14 in FIG. 6 , the actions performed by the terminal in S41 and S46 in FIG. 9 , and/or other processes for supporting the technology described herein. The receiving unit may be used to perform the actions performed by the terminal in S12 and S15 in FIG. 6 , the actions performed by the terminal in S42 in FIG. 9 , and/or other processes for supporting the technology described herein. The reconstruction unit 1403 may be used to execute the actions reconstructed in S34 in FIG. 8 , and/or to support other processes of the technology described herein. The playing unit 1404 may be used to execute the action played in S34 in FIG. 8 , and/or to support other processes of the technology described herein.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。Wherein, all relevant content of each step involved in the above-mentioned method embodiment can be referred to the function description of the corresponding function module, and will not be repeated here.
在本申请实施例中,该终端对应各个功能划分各个功能模块的形式来呈现,或者,该策略实体以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定应用集成电路(Application-Specific Integrated Circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。在一个简单的实施例中,本领域的技术人员可以想到该终端可以通过图4所示的形式。比如,上文提供的发送单元1401可以是发送器,接收单元1402可以是接收器,发送器可以与接收器一起构成收发器,其具体可以是图4中的通信接口1301。另外,重构单元1403可以以硬件形式内嵌于或独立于终端的处理器(如图4中的处理器1302)中,也可以以软件形式存储于终端的存储器(如图4中的存储器1303)中。播放单元1404可以是图4中的播放器1305和/或显示屏1306。In the embodiment of the present application, the terminal is presented in the form of dividing each function module corresponding to each function, or the policy entity is presented in the form of dividing each function module in an integrated manner. The "module" here may refer to an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), a processor and memory that execute one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above functions . In a simple embodiment, those skilled in the art can imagine that the terminal can be in the form shown in FIG. 4 . For example, the sending unit 1401 provided above may be a transmitter, the receiving unit 1402 may be a receiver, and the transmitter and the receiver may form a transceiver together, which may specifically be the communication interface 1301 in FIG. 4 . In addition, the reconstruction unit 1403 can be embedded in or independent of the processor of the terminal in the form of hardware (such as the processor 1302 in Figure 4), and can also be stored in the memory of the terminal in the form of software (such as the memory 1303 in Figure 4). )middle. The playing unit 1404 may be the player 1305 and/or the display screen 1306 in FIG. 4 .
由于本申请实施例提供的终端可用于执行上述视频传输方法,因此其所能获得的技术效果可参考上述方法实施例,本申请实施例在此不再赘述。Since the terminal provided by the embodiment of the present application can be used to execute the above video transmission method, the technical effect it can obtain can refer to the above method embodiment, and the embodiment of the present application will not repeat it here.
比如,在采用对应各个功能划分各个功能模块的情况下,图11示出了上述实施例中所涉及的服务器110的一种可能的结构示意图。该服务器110可以包括接收单元1501和发送单元1502。可选的,还可以包括:中断单元1503。其中,接收单元1501可以用于执行图6中的S11和S14中服务器执行的动作,图9中S41和S44中服务器执行的动作,和/或用于支持本文所描述的技术的其它过程。发送单元1502可以用于执行图6中的S12和S15中服务器执行的动作,图9中S45和S46中服务器执行的动作,和/或用于支持本文所描述的技术的其它过程。中断单元1503可以用于执行图9中S47的动作,和/或用于支持本文所描述的技术的其它过程。For example, in the case of dividing each functional module corresponding to each function, FIG. 11 shows a possible structural diagram of the server 110 involved in the above embodiment. The server 110 may include a receiving unit 1501 and a sending unit 1502 . Optionally, an interrupt unit 1503 may also be included. Wherein, the receiving unit 1501 may be used to perform the actions performed by the server in S11 and S14 in FIG. 6 , the actions performed by the server in S41 and S44 in FIG. 9 , and/or other processes for supporting the technology described herein. The sending unit 1502 may be configured to perform the actions performed by the server in S12 and S15 in FIG. 6 , the actions performed by the server in S45 and S46 in FIG. 9 , and/or other processes for supporting the technologies described herein. The interrupt unit 1503 may be used to execute the action of S47 in FIG. 9 , and/or to support other processes of the technology described herein.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。Wherein, all relevant content of each step involved in the above-mentioned method embodiment can be referred to the function description of the corresponding function module, and will not be repeated here.
在本申请实施例中,该服务器对应各个功能划分各个功能模块的形式来呈现,或者,该服务器以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定ASIC电路,执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。在一个简单的实施例中,本领域的技术人员可以想到该终端可以通过图3所示的形式。比如,上文提供的发送单元1502可以是发送器,接收单元1501可以是接收器,发送器可以与接收器一起构成收发器,其具体可以是图3中的通信接口1201。另外,中断单元1503可以以硬件形式内嵌于或独立于终端的处理器(如图3中的处理器1202)中,也可以以软件形式存储于终端的存储器(如图3中的存储器1203)中。In the embodiment of the present application, the server is presented in the form of dividing each functional module corresponding to each function, or the server is presented in the form of dividing each functional module in an integrated manner. The "module" here may refer to a specific ASIC circuit, a processor and memory executing one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above functions. In a simple embodiment, those skilled in the art can imagine that the terminal can be in the form shown in FIG. 3 . For example, the sending unit 1502 provided above may be a transmitter, the receiving unit 1501 may be a receiver, and the transmitter and the receiver may form a transceiver together, which may specifically be the communication interface 1201 in FIG. 3 . In addition, the interrupt unit 1503 may be embedded in or independent of the processor of the terminal in the form of hardware (such as the processor 1202 in Figure 3), and may also be stored in the memory of the terminal in the form of software (such as the memory 1203 in Figure 3). middle.
由于本申请实施例提供的终端可用于执行上述视频传输方法,因此其所能获得的技术效果可参考上述方法实施例,本申请实施例在此不再赘述。Since the terminal provided by the embodiment of the present application can be used to execute the above video transmission method, the technical effect it can obtain can refer to the above method embodiment, and the embodiment of the present application will not repeat it here.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or may be a data storage device including one or more servers, data centers, etc. that can be integrated with the medium. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present application has been described in conjunction with various embodiments here, however, in the process of implementing the claimed application, those skilled in the art can understand and Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Although the application has been described in conjunction with specific features and embodiments thereof, it will be apparent that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and drawings are merely illustrative of the application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of this application. Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims (22)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710140922.6A CN108574882B (en) | 2017-03-08 | 2017-03-08 | A video transmission method and device |
PCT/CN2018/076526 WO2018161790A1 (en) | 2017-03-08 | 2018-02-12 | Video transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710140922.6A CN108574882B (en) | 2017-03-08 | 2017-03-08 | A video transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108574882A true CN108574882A (en) | 2018-09-25 |
CN108574882B CN108574882B (en) | 2019-11-12 |
Family
ID=63448047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710140922.6A Active CN108574882B (en) | 2017-03-08 | 2017-03-08 | A video transmission method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108574882B (en) |
WO (1) | WO2018161790A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110072130A (en) * | 2019-04-11 | 2019-07-30 | 西安交通大学 | A kind of HAS video segment method for pushing based on HTTP/2 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6496980B1 (en) * | 1998-12-07 | 2002-12-17 | Intel Corporation | Method of providing replay on demand for streaming digital multimedia |
CN102123304A (en) * | 2009-12-28 | 2011-07-13 | 汤姆森许可贸易公司 | Method and device for reception of video contents and services broadcast with prior transmission of data |
CN102638704A (en) * | 2006-06-27 | 2012-08-15 | 汤姆森特许公司 | Performance perceived peering content on-demand |
-
2017
- 2017-03-08 CN CN201710140922.6A patent/CN108574882B/en active Active
-
2018
- 2018-02-12 WO PCT/CN2018/076526 patent/WO2018161790A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6496980B1 (en) * | 1998-12-07 | 2002-12-17 | Intel Corporation | Method of providing replay on demand for streaming digital multimedia |
CN102638704A (en) * | 2006-06-27 | 2012-08-15 | 汤姆森特许公司 | Performance perceived peering content on-demand |
CN102123304A (en) * | 2009-12-28 | 2011-07-13 | 汤姆森许可贸易公司 | Method and device for reception of video contents and services broadcast with prior transmission of data |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110072130A (en) * | 2019-04-11 | 2019-07-30 | 西安交通大学 | A kind of HAS video segment method for pushing based on HTTP/2 |
CN110072130B (en) * | 2019-04-11 | 2020-06-02 | 西安交通大学 | A HAS video slice push method based on HTTP/2 |
Also Published As
Publication number | Publication date |
---|---|
WO2018161790A1 (en) | 2018-09-13 |
CN108574882B (en) | 2019-11-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10757453B2 (en) | Distributed multi-datacenter video packaging system | |
CN103814562B (en) | Signals the characteristics of a segment for network streaming of media data | |
US11743518B2 (en) | Player methods for chunked CMAF low latency playback | |
US9271003B2 (en) | Real-time audio or video transcoding | |
US10869048B2 (en) | Method, device and system for transmitting and receiving pictures using a hybrid resolution encoding framework | |
CN110784740A (en) | Video processing method, device, server and readable storage medium | |
WO2018133601A1 (en) | Streaming media transmission method and apparatus, server, and terminal | |
JP5795446B2 (en) | Content delivery system with allocation of source data and repair data between HTTP servers | |
US10476928B2 (en) | Network video playback method and apparatus | |
WO2017095885A1 (en) | Method and apparatus for transmitting video data | |
CN111447455A (en) | Live video stream playback processing method, device and computing device | |
MX2014013560A (en) | Apparatus and method of transmitting and receiving packet in a broadcasting and communication system. | |
US20140226711A1 (en) | System and method for self-adaptive streaming of multimedia content | |
US20190089966A1 (en) | Efficient frame loss recovery and reconstruction in dyadic hierarchy based coding | |
CN110602555B (en) | Video transcoding method and device | |
KR20140056296A (en) | Techniques for dynamic switching between coded bitstreams | |
CN116600169A (en) | Method and device for preloading media files, electronic equipment and storage medium | |
US10893303B1 (en) | Streaming chunked media segments | |
CN103152606A (en) | Video file processing method, device and system | |
JP2015510355A (en) | Method and storage medium executed by computer | |
CN108574882B (en) | A video transmission method and device | |
CN114449291A (en) | Data transmission method, device and computer storage medium | |
US20160330298A1 (en) | System, Terminal, Server, and Method for Data Transmission | |
CN112702605B (en) | Video transcoding system, video transcoding method, electronic device, and storage medium | |
KR102212973B1 (en) | Method for providing a content part of a multimedia content to a client terminal, corresponding cache |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |