WO2018161790A1 - Video transmission method and device - Google Patents
Video transmission method and device Download PDFInfo
- Publication number
- WO2018161790A1 WO2018161790A1 PCT/CN2018/076526 CN2018076526W WO2018161790A1 WO 2018161790 A1 WO2018161790 A1 WO 2018161790A1 CN 2018076526 W CN2018076526 W CN 2018076526W WO 2018161790 A1 WO2018161790 A1 WO 2018161790A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- fragment
- mainstream
- request
- terminal
- auxiliary stream
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 101
- 230000005540 biological transmission Effects 0.000 title claims abstract description 73
- 239000012634 fragment Substances 0.000 claims abstract description 492
- 238000013467 fragmentation Methods 0.000 claims description 92
- 238000006062 fragmentation reaction Methods 0.000 claims description 92
- 230000015654 memory Effects 0.000 claims description 42
- 238000004891 communication Methods 0.000 claims description 35
- 230000011218 segmentation Effects 0.000 claims description 8
- 230000008569 process Effects 0.000 description 32
- 230000006870 function Effects 0.000 description 22
- 238000010586 diagram Methods 0.000 description 13
- 230000009471 action Effects 0.000 description 12
- 230000000694 effects Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 8
- 230000003993 interaction Effects 0.000 description 7
- 239000002131 composite material Substances 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 238000013461 design Methods 0.000 description 5
- 230000003139 buffering effect Effects 0.000 description 3
- 238000005538 encapsulation Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 239000000872 buffer Substances 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000005055 memory storage Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000011895 specific detection Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
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
Definitions
- the present application relates to the field of transmission technologies, and in particular, to a video transmission method and apparatus.
- HLS HTTP live streaming
- HTTP hypertext transfer protocol
- the server encodes the video content to obtain a plurality of video files of different code rates, and then divides each of the plurality of video files into a plurality of slices according to time.
- the terminal needs to play the video, it requests the required fragment according to the playing time and the current network condition, and buffers, decodes, and plays the requested fragment.
- the embodiment of the present application provides a video transmission method and apparatus, which are used to save transmission resources and cache resources.
- a video transmission method where the video includes a primary encoded stream and a secondary encoded stream, where the secondary encoded stream is used to increase a code rate of the primary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least Two auxiliary stream segments, each of which corresponds to one auxiliary stream segment.
- the method includes: the terminal sends a first mainstream fragment request to the server, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is one mainstream fragment of the at least two mainstream fragments.
- the terminal requests the mainstream fragment, and requests the auxiliary stream fragmentation as needed; wherein the auxiliary stream fragment is used to improve the code rate of the mainstream fragment.
- the primary encoded stream can be played separately, or the primary encoded stream and the secondary encoded stream are superimposed and reconstructed, so the buffered primary encoded stream does not lose its role due to buffering the secondary encoded stream. Compared with the prior art, it is possible to save transmission resources and cache resources.
- the terminal and the server communicate through the HTTP/2 protocol.
- the server can be any server that supports the HTTP/2 protocol, and can be, for example, a WEB server.
- the method may further include: the terminal superimposing and reconstructing the first mainstream fragment and the first auxiliary stream fragment, and playing the reconstructed code stream. In this way, the quality of video playback can be improved.
- the receiving, by the terminal, the first mainstream fragment sent by the server may include: receiving, by a server, a first mainstream fragment sent by the server, where the link may be between the terminal and the server. Any of the links.
- the first auxiliary stream fragment sent by the receiving server includes: receiving, by the link, the first auxiliary stream fragment sent by the server. In this way, both the terminal and the server need only maintain one link, so the implementation is simple.
- the method may further include: the terminal sending a second mainstream fragment request to the server, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is at least a mainstream fragment other than the first mainstream fragment in the two mainstream fragments; a second mainstream fragment sent by the receiving server; if the current real-time network condition meets the preset condition, sending the second auxiliary stream to the server a slice request, where the second auxiliary stream fragment request is used to request a second auxiliary stream fragment corresponding to the second mainstream fragment; if the second auxiliary stream fragmentation request is sent to the server, and the second auxiliary stream is received Before detecting the current real-time network condition, the interrupt request is sent to the server, where the interrupt request is used to request to interrupt the transmission process of the second auxiliary stream fragment.
- the terminal can obtain the next mainstream fragment of the second mainstream fragment to be reduced to a certain extent, thereby effectively reducing the occurrence of a stuck phenomenon in the process of playing the video by the terminal. It can be understood that the possible implementation manner can be performed separately without relying on any of the technical solutions provided above, such that the second mainstream fragment is arbitrary.
- a second aspect provides a video transmission method, where the video includes a primary encoded stream and a secondary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each mainstream fragment.
- the method may include: the server receiving the first mainstream fragment request sent by the terminal, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is at least two The first mainstream fragment is sent to the terminal; the first auxiliary stream fragment request sent by the terminal is received, where the first auxiliary stream fragment request is used to request the first mainstream fragment corresponding to the first mainstream fragment.
- the first auxiliary stream fragmentation request is sent by the terminal if the current network condition meets the preset condition; and the first auxiliary stream fragment is sent to the terminal.
- sending the first mainstream fragment to the terminal may include: sending the first mainstream fragment to the terminal on a link.
- sending the first auxiliary stream fragment to the terminal may include: sending the first auxiliary stream fragment to the terminal on the link.
- the priority of the mainstream fragment is higher than the priority of the auxiliary stream fragment corresponding to the mainstream fragment.
- sending the first auxiliary stream fragment to the terminal may include: if it is determined that the first mainstream fragment is sent to the terminal, sending the first auxiliary stream fragment to the terminal. In this way, the mainstream fragments can be preferentially transmitted, thereby ensuring the continuity of playback of the mainstream fragments.
- the method may further include: the server receiving the second mainstream fragment request sent by the terminal, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is a mainstream fragment other than the first mainstream fragment of the at least two mainstream fragments; sending a second mainstream fragment to the terminal; receiving a second auxiliary stream fragmentation request sent by the terminal, where the second auxiliary stream is divided The slice request is used to request the second auxiliary stream fragment corresponding to the second mainstream fragment; if the interrupt request sent by the terminal is received before the second auxiliary stream fragmentation request is sent to the terminal, the second auxiliary stream fragment is interrupted. Transmission process. It can be understood that the possible implementation manner may be performed independently of any of the technical solutions provided above, such that the second mainstream fragment is arbitrary.
- a third aspect provides a terminal, where the video includes a primary encoded stream and a secondary encoded stream, where the secondary encoded stream is used to increase a code rate of the primary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two secondary streams.
- Flow segmentation where each mainstream segment corresponds to one auxiliary stream segment.
- the terminal may include: a transmitting unit and a receiving unit.
- the sending unit is configured to send a first mainstream fragment request to the server, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is one of the at least two mainstream fragments. Fragmentation.
- the receiving unit is configured to receive the first mainstream fragment sent by the server.
- the sending unit is further configured to: if the current real-time network condition meets the preset condition, send a first auxiliary stream fragment request to the server, where the first auxiliary stream fragment request is used to request the first auxiliary corresponding to the first mainstream fragment Streaming slices.
- the receiving unit is further configured to receive the first auxiliary stream fragment sent by the server.
- the terminal may further include: a reconstruction unit and a playback unit.
- the reconstruction unit is configured to superimpose and reconstruct the first mainstream segment and the first auxiliary stream segment.
- the playing unit is configured to play the code stream generated after the reconstruction.
- the receiving unit is configured to: receive, by a server, a first mainstream fragment sent by the server on a link; and receive, by the link, the first auxiliary stream fragment sent by the server.
- the sending unit may be further configured to send a second mainstream fragment request to the server, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is at least One of the two mainstream slices except the first mainstream slice.
- the receiving unit is further configured to receive the second mainstream fragment sent by the server.
- the sending unit may be further configured to: if the current real-time network condition meets the preset condition, send a second auxiliary stream fragmentation request to the server, where the second auxiliary stream fragmentation request is used to request the second corresponding to the second mainstream fragment Auxiliary flow segmentation.
- the sending unit may be further configured to: if the current real-time network condition does not satisfy the preset condition after detecting the second auxiliary stream fragmentation request to the server and before receiving the second auxiliary stream fragmentation, send an interrupt request to the server, The interrupt request is used to request to interrupt the transmission process of the second auxiliary stream fragment.
- a fourth aspect provides a server, where the video includes a primary encoded stream and a secondary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each mainstream fragment and one auxiliary stream.
- the stream is fragmented.
- the server may include: a receiving unit and a transmitting unit.
- the receiving unit is configured to receive a first mainstream fragment request sent by the terminal, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is one of at least two mainstream fragments. Mainstream segmentation.
- a sending unit configured to send the first mainstream fragment to the terminal.
- the receiving unit is further configured to: receive the first auxiliary stream fragmentation request sent by the terminal, where the first auxiliary stream fragmentation request is used to request the first auxiliary stream fragment corresponding to the first mainstream fragment; the first auxiliary stream fragmentation The request is sent by the terminal if the current network condition satisfies the preset condition.
- the sending unit is further configured to send the first auxiliary stream fragment to the terminal.
- the sending unit is specifically configured to: send a first mainstream fragment to the terminal on a link; and send the first auxiliary stream fragment to the terminal on the link.
- the priority of the mainstream fragment is higher than the priority of the auxiliary stream fragment corresponding to the mainstream fragment.
- the sending unit is specifically configured to: if it is determined that the first mainstream has been sent to the terminal Fragmentation, the first auxiliary stream fragment is sent to the terminal.
- the receiving unit is further configured to: receive a second mainstream fragment request sent by the terminal, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is at least One of the two mainstream slices except the first mainstream slice.
- the sending unit is further configured to send the second mainstream fragment 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 the second auxiliary stream fragment corresponding to the second mainstream fragment.
- the receiving unit is further configured to receive an interrupt request sent by the terminal.
- the server may further include: an interrupting unit, configured to interrupt the transmission process of the second auxiliary stream fragment if the receiving unit receives the interrupt request sent by the terminal before the sending unit sends the second auxiliary stream fragmentation request to the terminal.
- the interrupt request in the above first to fourth aspects may include: an RST_STREM frame in HTTP/2.
- the interrupt request may be a newly designed frame, or other frames provided in the prior art may be multiplexed, which is not limited in this embodiment of the present application.
- a terminal in a fifth aspect, has a function of implementing terminal behavior in the foregoing method embodiment.
- This function can be implemented in hardware or in hardware by executing the corresponding software.
- the hardware or software includes one or more modules corresponding to the functions described above.
- the terminal may include: a processor, a memory, a communication bus, and a communication interface; wherein the memory is configured to store a computer execution instruction, the processor and the memory are connected through a communication bus, and when the terminal is running, processing The computer executing the memory storage executes the instructions to cause the terminal to perform the video transmission method provided by the above first aspect or any one of the first aspects.
- a computer readable storage medium for storing computer software instructions for use by the terminal, when executed on a computer, causes the computer to perform the video transmission method of any of the above aspects.
- a computer program product comprising instructions for causing a computer to perform the video transmission method of any of the above first aspects when executed on a computer is provided.
- a server having a function of implementing server behavior in the above method embodiment.
- This function can be implemented in hardware or in hardware by executing the corresponding software.
- the hardware or software includes one or more modules corresponding to the functions described above.
- the server may include: a processor, a memory, a communication bus, and a communication interface.
- the memory is used to store computer execution instructions, the processor and the memory are connected by a communication bus, and when the server is running, the processor executes the memory storage computer execution instructions, so that the server performs any of the above second aspect or the second aspect.
- the video transmission method provided by the implementation.
- a computer readable storage medium for storing computer software instructions for use by the server, when executed on a computer, causes the computer to perform the video transmission method of any of the above second aspects.
- a computer program product comprising instructions which, when run on a computer, cause the computer to perform the video transmission method of any of the above second aspects.
- FIG. 1 is a schematic diagram of a system architecture applicable to a technical solution provided by an embodiment of the present disclosure
- FIG. 2 is a schematic structural diagram of an encoding server according to an embodiment of the present application.
- FIG. 3 is a schematic structural diagram of a transmission server according to an embodiment of the present disclosure.
- FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present application.
- FIG. 5 is a schematic diagram of interaction of a video transmission method according to an embodiment of the present application.
- FIG. 6 is a schematic diagram of interaction of another video transmission method according to an embodiment of the present disclosure.
- FIG. 7 is a schematic flowchart of a video transmission method according to an embodiment of the present application.
- FIG. 8 is a schematic flowchart of playing a video according to an embodiment of the present application.
- FIG. 9 is a schematic diagram of interaction of another video transmission method according to an embodiment of the present disclosure.
- FIG. 10 is a schematic structural diagram of another terminal according to an embodiment of the present disclosure.
- FIG. 11 is a schematic structural diagram of another server according to an embodiment of the present application.
- the cached but unplayed low bit rate fragments will be disabled, resulting in waste of transmission resources and cache resources.
- the terminal has requested and cached the low code rate fragments 1 to 10, and is currently playing the fragment 5; if the terminal detects that the current network condition is good when the fragment 5 is played, the high code can be requested from the server.
- the fragment 6 of the rate such that the low-rate fragment 6 that has been cached but not played will be deactivated, thereby causing waste of transmission resources and cache resources.
- the embodiment of the present application provides a video transmission method and device, the basic principle is: the terminal requests the mainstream fragmentation, and requests the auxiliary stream fragmentation as needed; wherein the auxiliary stream fragment is used to improve the mainstream fragmentation.
- Code rate In the prior art, fragments of the same content of different code rates exist independently, are independently transmitted, and are selectively played.
- the role of the secondary encoded stream is to improve the code rate of the primary encoded stream, that is, the primary encoded stream can be played separately, or the primary encoded stream and the secondary encoded stream are superimposed and reconstructed, and thus the cached primary encoding is performed. The stream does not lose its effect by caching the secondary encoded stream. Compared with the prior art, it is possible to save transmission resources and cache resources.
- the primary encoded stream and the secondary encoded stream involved in the embodiment of the present application may be a code stream obtained by the server after being encoded according to a reconstructive video coding (RVC) technology or the like.
- RVC reconstructive video coding
- the encoder can generate two streams at the same time, one of which is the primary encoded stream and the other is the secondary encoded stream.
- the main encoded stream is a video stream with a lower resolution, and the player can directly decode and play.
- the role of the secondary encoded stream is to assist the player in improving the resolution of the primary encoded stream.
- the code rate of the main code stream is 720p.
- the code rate can be increased to 1080p, thereby improving the video playback quality.
- the embodiment of the present application is not limited to the coding technology of the RVC technology, and may be other coding technologies.
- the technical solution provided by the embodiment of the present application can be applied to the system architecture shown in FIG. 1 , the system package shown in FIG. 1 : the encoding server 11 , the transmission server 12 , and the terminal 13 .
- the encoding server 11 is for encoding the video content according to a certain encoding technique and transmitting the encoded result to the transmission server 12.
- the transmission server 12 is configured to save the encoded result, and when receiving the fragmentation request sent by the terminal 13, transmits the encoded fragment to the terminal 13.
- the terminal 13 is configured to send a fragmentation request to the transmission server 12 according to a user indication or a self-trigger, and decode and play the encoded fragment received by the transmission server 12.
- FIG. 1 is only an example diagram, and the number of the encoding server 11 , the number of the transmission server 12 , and the number of at least one terminal 13 are not limited in the embodiment of the present application. In practical applications, Network deployment can be performed in different numbers as shown in Figure 1 as needed.
- one or more links may be established between the transport server 12 and the terminal 13, and the fragmentation request and the fragment are transmitted on the links.
- the link here may be an HTTP/2 link, in which case the transport server 12 may be a server supporting HTTP/2.
- the specific implementation is not limited to this.
- the encoding server 11 in FIG. 1 may include: a downsampling module 1101, a mainstream encoder 1102, an auxiliary stream generating module 1103, a fragmentation control module 1104, and a mainstream.
- the downsampling module 1101 is configured to receive the original video input stream, perform a down conversion rate on the input original video input stream, and output the video stream obtained by the downsampling rate to the mainstream encoder 1102. For example, receiving a 4K YUV format video input stream, and a 4K YUV format video input stream downrate, generating a 2K YUV format video stream, and then outputting the 2K YUV format video stream to the mainstream encoder 1102.
- YUV is an encoding format of color data.
- the mainstream encoder 1102 is configured to receive the video stream input by the downsampling module 1101, and encode the video stream, for example, H.264 encoding, etc., generate a main encoded stream, and then output the main encoded stream to the mainstream package fragmentation module 1105.
- the auxiliary stream information generating module 1103 is configured to compare the video stream output by the downsampling module 1101 with the main encoded stream output by the mainstream encoder 1102 to generate a secondary encoded stream.
- the secondary encoded stream includes content reconstructed for improving video quality, such as information for correcting partial pixel points in the primary encoded stream.
- the mainstream encapsulation fragmentation module 1105 is configured to receive the main encoded stream output by the mainstream encoder 1102, and under the control of the fragmentation control module 1104, segment and encapsulate the main encoded stream according to a time point to obtain at least two mainstream fragments. For example, TS (transport stream) fragment or mp4 fragment, etc., and then output the at least two mainstream fragments.
- TS transport stream
- mp4 fragment
- the mainstream encapsulation fragmentation module 1105 is configured to receive the main encoded stream output by the mainstream encoder 1102, and under the control of the fragmentation control module 1104, segment and encapsulate the main encoded stream according to a time point to obtain at least two mainstream fragments. For example, TS (transport stream) fragment or mp4 fragment, etc., and then output the at least two mainstream fragments.
- TS transport stream
- the auxiliary stream encapsulation slice module 1106 is configured to receive the auxiliary code stream output by the auxiliary stream generation module 1103, and perform fragmentation and encapsulation on the auxiliary coded stream according to time under the control of the fragmentation control module 1104, to obtain at least two auxiliary stream segments.
- the slice then outputs the at least two auxiliary stream fragments.
- the format of the auxiliary stream fragment may be a custom format, and each auxiliary stream fragment corresponds to one mainstream fragment, and the time point of each auxiliary stream fragment is the same as the time point of the corresponding mainstream fragment, and each auxiliary The stream slice is used to increase the bit rate of the corresponding mainstream slice.
- the fragmentation control module 1104 is configured to control the execution process of the mainstream package fragmentation module 1105 and the execution process of the auxiliary stream package fragmentation module 1106, and generate a warehouse receipt that describes the fragmentation (including the mainstream fragment and the auxiliary stream fragment). File, then output the warehouse order file.
- the warehouse order file may include a time point of each slice, a correspondence between each mainstream slice and each mainstream slice, and the like.
- the encoding server 11 may further include a communication interface for communicating with an external device such as the transmission server 2.
- the main stream fragment for receiving the output of the mainstream package fragmentation module 1105, the auxiliary stream fragment output by the auxiliary stream package fragmentation module 1106, and the warehouse order file output by the fragmentation control module 1104; and transmitting the information to The WEB server, wherein the WEB server may be a WEB server supporting the HTTP/2 protocol, and the server may be the transport server 12 above.
- the communication interface 1107 can be a transceiver, a downsampling module 1101, a mainstream encoder 1102, a secondary stream information generating module 1103, a fragmentation control module 1104, a mainstream package fragmentation module 1105, and a secondary stream package fragmentation module 1106. Both may be embedded in the hardware of the encoding server 11 in hardware, or may be stored in the memory of the encoding server 11 in the form of software, so that the processor invokes the operations corresponding to the above modules.
- the encoding server 11 may include, in addition to the transceiver, the processor, and the memory, a communication bus for interconnecting the transceiver, the processor, and the memory.
- the transmission server 12 in FIG. 1 may include: a communication interface 1201, a processor 1202, a memory 1203, and a communication bus 1204.
- the communication interface 1201, the processor 1202, and the memory 1203 are connected to each other through a communication bus 1204.
- the communication interface 1201 is a unit for performing service data flow interaction between the transmission server 12 and external network elements such as the encoding server 11 and the terminal 13.
- the communication interface 1201 can be configured to receive each mainstream fragment, each auxiliary stream fragment, and a warehouse order file sent by the encoding server 11.
- the main stream fragment request, the auxiliary stream encoding request or the interrupt request sent by the terminal 13 is received, or the requested main stream fragment, auxiliary stream fragment or warehouse order file is returned to the terminal 13.
- the memory 1203 can be used to store data and/or code, and the processor 1302 can implement various functions of the transport server 12 by running or executing program code stored in the memory 1203, as well as invoking data stored in the memory 1203.
- the transmission server 12 shown in FIG. 3 does not constitute a limitation on the transmission server 12.
- the transmission server 12 may further include more components than the illustration, or combine some components, or different. Assembly of parts.
- the transmission server 12 may also include a power source, a fan, a clock (CLK), and the like.
- the terminal 13 in FIG. 1 may include: a communication interface 1301, a processor 1302, a memory 1303, a communication bus 1304, a player 1305, and a display screen 1306.
- the communication interface 1301, the processor 1302, the memory 1303, the player 1305, and the display 1306 are connected to each other through a communication bus 1304.
- the communication interface 1303 is a unit for performing service data flow interaction between the terminal 13 and an external network element (such as the transmission server 12). Specifically, the communication interface 1303 may be configured to send a mainstream fragment request, a secondary stream encoding request, or an interrupt request to the transmission server 12, or receive a mainstream fragment, a secondary stream fragment, or a warehouse order file sent by the transmission server.
- the memory 1303 can be used to store data and/or code, and the processor 1302 can implement various functions of the terminal 13 by running or executing program code stored in the memory 1303, and calling data stored in the memory 1303.
- the terminal 13 shown in FIG. 4 does not constitute a limitation on the terminal 13.
- the terminal 13 may further include more components than the illustrated ones, or combine some components, or different component arrangements.
- the terminal 13 may also include a power source, a fan, a clock, and the like.
- the communication interface 1201 and the communication interface 1301 may each include a receiving unit and a sending unit, and may specifically be a transceiver or a transmission interface.
- the processor 1202 and the processor 1302 may include a plurality of central processing units (CPUs) or include a plurality of network processing units (CPUs), which may be application specific integrated circuits (ASICs). Or one or more integrated circuits configured to implement embodiments of the present application, such as one or more digital signal processors (DSPs), or one or more field programmable gate arrays (field programmable gates) Array, FPGA), can also be a multi-core system-on-chip (SoC).
- CPUs central processing units
- CPUs may be application specific integrated circuits
- ASICs application specific integrated circuits
- DSPs digital signal processors
- FPGA field programmable gate array
- SoC system-on-chip
- the memory 1203 and the memory 1303 may each be a volatile memory, such as a random-access memory (RAM), or a non-volatile memory, such as a read-only memory.
- RAM random-access memory
- ROM read-only memory
- flash memory flash memory
- HDD hard disk drive
- SSD solid-state drive
- the communication bus 1204 and the communication bus 1304 can be divided into an address bus, a data bus, a control bus, etc., and can be an Ethernet bus, an industry standard architecture (ISA) bus, or a peripheral component (PCI). Bus or extended industry standard architecture (EISA) bus.
- ISA industry standard architecture
- PCI peripheral component
- EISA extended industry standard architecture
- each of the communication buses is represented by only one thick line in FIGS. 3 and 4, but does not mean that there is only one bus or one type of bus.
- the encoding server 11 and the transmission server 12 are described as independent devices.
- the two devices may also be integrated, and in addition, any of the two devices A device may be integrated with other network-side devices, which is not limited in this embodiment of the present application.
- the following embodiments show and describe in detail the video transmission method provided by the present invention, wherein the steps shown may also be in the transmission server 12 and the terminal shown in FIG. Executed in any computer other than 13.
- the logical sequence of the video transmission method provided by the embodiment of the present application is shown in the method flowchart, in some cases, the steps shown or described may be performed in an order different from that herein.
- the "server” described in the embodiments provided below may specifically be the transmission server 12 described above.
- "and/or” in this article is only an association relationship describing the associated objects, indicating that there may be three kinds of relationships, for example, A and / or B, which may indicate that A exists separately, and A and B exist simultaneously, respectively. B these three situations.
- the character "/" in this article generally indicates that the contextual object is an "or” relationship.
- Multiple refers to two or more.
- FIG. 5 is a schematic diagram of interaction of a video transmission method according to an embodiment of the present application.
- the method shown in FIG. 5 may include the following steps S101 to S104:
- S101 The terminal acquires a warehouse order file of the video to be played from the server.
- the video to be played may be any video requested by the terminal to the server.
- the video may include a primary encoded stream and a secondary encoded stream, the secondary encoded stream is used to increase the code rate of the primary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each mainstream The slice corresponds to one auxiliary stream slice.
- the generation process of the primary coded stream and the secondary coded stream and the fragmentation process thereof may be referred to the above, and are not described herein again.
- the warehouse order file of the to-be-played video may include, but is not limited to, information of each of the at least two mainstream segments, and information of each of the at least two auxiliary stream segments.
- information of each of the at least two mainstream segments may include, but is not limited to, information of each of the at least two mainstream segments, and information of each of the at least two auxiliary stream segments.
- the time point of each fragment including the mainstream fragment and the auxiliary stream fragment
- the time point of each mainstream slice is the same as the time point of the corresponding auxiliary stream slice.
- the terminal may send the indication information to the terminal, for example, by using a touch screen operation, text input, voice input, etc.; after detecting the indication information, the terminal determines that the terminal has been established with the server. If the connection is made, the warehouse file of the video to be played is requested from the server; if it is determined that the terminal does not establish a connection with the server, a connection is established with the server, and then the warehouse order file of the time-frequency to be played is requested from the server. .
- the process of establishing a connection between the terminal and the server and the specific implementation process of the terminal requesting the warehouse order file from the server, refer to the prior art, and details are not described herein again.
- S102 The terminal parses the warehouse order file, obtains a time point of each fragment of the video to be played, a correspondence relationship between each mainstream fragment and the auxiliary stream fragment, and the like.
- the terminal obtains the mainstream fragment of the to-be-played video from the server, and obtains the auxiliary stream fragment corresponding to the mainstream fragment when the current real-time network status meets the preset condition; and caches each fragment obtained.
- the terminal may determine, according to the detected indication information sent by the user, which mainstream fragment in the time frequency to be played by the server, and then the terminal may request the mainstream segment from the server after receiving the mainstream fragment replied by the server.
- the terminal may request the fifth mainstream fragment from the server, and after receiving the fifth mainstream fragment of the server reply, The sixth mainstream fragment is requested from the server, and so on, until the terminal requests the 10th mainstream fragment.
- the current network status is not static, and it can change in real time as factors such as environment and load change.
- the terminal can periodically detect the current network status. When the detection period is small, it can be considered as detecting the current network status in real time.
- the detecting the current network status may include, but is 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, and details are not described herein again.
- the current real-time network status refers to the detected network status when the terminal performs the action of detecting the network status. That is to say, the meaning represented by the “current real-time network status” involved in the different steps of the embodiment of the present application needs to be determined according to actual implementation or actual context, and the same word in the different steps cannot be considered as “current real-time network”.
- Status indicates the network status measured at the same time.
- current play time refers to the moment the terminal is playing.
- the current real-time network condition satisfies the preset condition, which can be understood as the quality of the current network condition is good, that is, the communication quality is good.
- the terminal may request the auxiliary stream fragment from the server to superimpose and reconstruct the auxiliary stream fragment and the mainstream fragment, thereby improving the code rate of the mainstream fragment corresponding to the auxiliary stream fragment, thereby improving user viewing. Video experience.
- the current network network condition meets the preset condition, and 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 specific values of the first threshold, the second threshold, and the third threshold, and how to obtain values, are not limited in this embodiment.
- the terminal may separately cache the mainstream fragment and the auxiliary stream fragment, for example, opening a specific two-part storage space in the terminal, where a part of the storage space is used for storing the mainstream fragment, and another part of the storage space is used for storing the mainstream fragment.
- the terminal may integrate the cache mainstream fragment and the auxiliary stream fragment, for example, open a specific storage space in the terminal, and store the mainstream fragment and the auxiliary stream fragment in the storage space.
- the method includes the following steps S11 to S16:
- S11 The terminal sends a first mainstream fragment request to the server, where the first mainstream fragment request is used to request the first mainstream fragment.
- the first mainstream fragment request may include an identifier of the first mainstream fragment, such as a time point of the first mainstream fragment, or an index of the first mainstream fragment.
- the first mainstream fragment may be any one of the at least two mainstream fragments, which may be, from the mainstream fragment corresponding to the playback start time indicated by the indication information to the last included in the video to be played. Any of the mainstream shards in a mainstream shard.
- S12 The server receives the first mainstream fragment request sent by the terminal, and sends the first mainstream fragment to the terminal according to the first mainstream fragment request.
- S13 The terminal receives the first mainstream fragment sent by the server, and caches the first mainstream fragment.
- the terminal sends a first auxiliary stream fragmentation request to the server, where the first auxiliary stream fragmentation request is used to request the first auxiliary stream fragment corresponding to the first mainstream fragment.
- the first auxiliary stream fragmentation request may include an identifier of the first auxiliary stream fragment, such as a time point of the first auxiliary stream fragment, or an index of the first auxiliary stream fragment.
- S15 The server receives the first auxiliary stream fragmentation request sent by the terminal, and sends the first auxiliary stream fragment to the terminal.
- S16 The terminal receives the first auxiliary stream fragment sent by the server, and buffers the first auxiliary stream fragment.
- S11 to S13 are processes for acquiring the first mainstream fragment
- S14 to S16 are processes for acquiring the first auxiliary stream fragment.
- the execution order of the S11 to S13 and the S14 to S16 is not limited in the embodiment of the present application, for example, S11 to S16 are executed again, and S14 to S16 are executed.
- S14 to S16 may be executed first, and S11 to S13 may be executed.
- S14 to S16 may be executed during the execution of S11 to S13. That is to say, the process of obtaining a mainstream fragment by the terminal and the process of acquiring the auxiliary stream fragment corresponding to the mainstream fragment may be in no particular order.
- the following describes the process in which the terminal acquires multiple mainstream fragments and auxiliary stream fragments corresponding to each mainstream fragment.
- the terminal it is generally used to distinguish the order of requesting the main stream fragments according to the time point; and, the order of the auxiliary stream fragments may be requested according to the time point, or the auxiliary stream points may not be requested according to the time point.
- the request sequence of the mainstream fragment and the auxiliary stream fragment (that is, the mainstream fragment and the auxiliary stream fragment corresponding to the mainstream fragment) at the same time point may not be limited.
- the server it generally sends each mainstream fragment to the terminal according to the time point, and sends each auxiliary stream fragment to the terminal according to time.
- the priority sequence of the mainstream fragment and the auxiliary stream fragment may be determined by setting a priority.
- the server and the terminal may be pre-agreed, or the priority between the mainstream fragment and the auxiliary stream fragment corresponding to the mainstream fragment is agreed by the server and the terminal. For example, use the HTTP/2 PRIORITY frame to set the priority.
- the terminal when the terminal sends a mainstream fragment request and/or a secondary stream fragmentation request to the server, the terminal carries the priority of the requested mainstream fragment and/or the auxiliary stream fragment.
- the mainstream shards can be played separately, and the auxiliary stream shards need to be played together with the mainstream shards.
- the priority of the mainstream shards is higher than the priority of the auxiliary shards corresponding to the mainstream shards. Level, so as to ensure that the mainstream shards can be transmitted preferentially, so as to ensure the continuity of the mainstream shards; that is, after the server sends a mainstream shard to the terminal, it will send the auxiliary stream corresponding to the mainstream shards. sheet.
- the process of acquiring the multiple mainstream fragments and the auxiliary stream fragments corresponding to each of the mainstream fragments may specifically include the following steps S21 to S24:
- S21 The terminal acquires the i-th main stream fragment from the server, and caches the i-th main stream fragment.
- the i-th main stream fragment refers to the i-th main stream fragment 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 fragment included in the video to be played. quantity.
- S22 The terminal determines whether to request the auxiliary stream fragment corresponding to the i-th mainstream fragment.
- step S23 If yes, go to step S23, if no, go to step S24.
- the terminal determines that the i-th auxiliary stream fragment needs to be requested when the current real-time network status meets the preset condition and the i-th auxiliary stream fragment is not buffered; In the case of a preset condition, or the i-th auxiliary stream fragment has been cached, it is determined that the i-th auxiliary stream fragment is not required to be requested.
- S23 The terminal acquires the auxiliary stream fragment corresponding to the i-th main stream fragment, and caches the auxiliary stream fragment.
- step S24 is performed.
- S24 The terminal determines whether the i-th mainstream fragment is the last mainstream fragment to be played.
- the current real-time network status may not be determined whether the preset condition is met.
- the terminal has acquired each mainstream fragment to be played, and auxiliary stream fragments corresponding to some or all of the mainstream fragments.
- the method may further include: the terminal acquiring the uncached auxiliary stream fragment corresponding to the unplayed mainstream fragment.
- the mainstream shards to be played are sorted according to the time point, the main shards are 1 to 5, and the main shards 1 to 5 are associated with the auxiliary stream shards 1 to 5, then the mainstream shards obtained by the terminal and
- the sequence of the auxiliary stream fragmentation may be: mainstream fragment 1, auxiliary stream fragment 1, mainstream fragment 2, mainstream fragment 3, mainstream fragment 4, auxiliary stream fragment 4, mainstream fragment 5, auxiliary stream fragmentation. 5.
- the terminal may further acquire the following auxiliary stream fragments: the auxiliary stream fragment 2 and the auxiliary stream fragment. 3.
- the terminal after the terminal obtains each mainstream fragment, if the current real-time network condition meets the preset condition, the terminal acquires the uncached first auxiliary stream fragment corresponding to the unplayed mainstream fragment. Until the last mainstream fragment is obtained, and then the uncached auxiliary stream fragment corresponding to the unplayed mainstream fragment is obtained.
- the terminal may obtain one or more uncached auxiliary stream fragments corresponding to the unplayed mainstream fragments after acquiring the multiple mainstream fragments, which is not limited in this embodiment of the present application.
- S104 The terminal plays the video according to the cached slice.
- the terminal After requesting each fragment (including the mainstream fragment and the auxiliary stream fragment), the terminal first caches the fragment, and after buffering to a certain number of mainstream fragments, starts to follow the time points of the mainstream fragment according to the time.
- the cached mainstream shard plays the video to be played to ensure the continuity of playback. It should be noted that, since the mainstream fragment and the auxiliary stream fragment obtained by the terminal are obtained by the server, the terminal needs to decode the mainstream fragment and the auxiliary stream fragment before playing.
- the embodiment of the present application does not limit the specific value and how to determine the value.
- the terminal can play the cached video while acquiring the video, but for the same mainstream segment, the terminal first acquires the mainstream segment and then plays the video.
- the mainstream fragment that has been cached is the mainstream fragment that has been cached.
- the process of playing the video by the terminal may specifically include the following steps S31 to S35:
- the terminal determines the jth mainstream fragment according to the time point of the mainstream fragmentation.
- the jth mainstream fragment indicates the mainstream fragment that the terminal is about to play recently. For example, if the terminal is currently playing the mainstream fragment 1, the mainstream fragment to be played by the terminal is the mainstream fragment 2.
- the jth mainstream fragment refers to the jth mainstream fragment 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 fragment included in the video to be played. quantity.
- S32 The terminal determines whether the auxiliary stream fragment corresponding to the jth mainstream fragment is buffered.
- step S33 If yes, go to step S33; if no, go to step S34.
- the terminal plays the jth mainstream fragment. That is, the video content corresponding to the jth mainstream tile is played.
- step S35 is performed.
- S34 The terminal superimposes and reconstructs the jth mainstream fragment and the auxiliary stream fragment to obtain a composite fragment, and plays the composite fragment.
- step S35 is performed.
- the video content corresponding to the video content played in step S33 is the same as the video content corresponding to the combined component played in step S34, except that the code rates of the two are different, and thus the playback quality is different.
- Mainstream fragmentation and superposition auxiliary stream segmentation and reconstruction are the key steps in reconstructing video coding. Since the encoding server encodes the video content and generates the mainstream fragment, the code rate processing is performed, for example, the 4K video stream is subjected to a down-coding rate to generate a 2K video stream. Therefore, the resolution of the image frame obtained by the terminal after decoding the mainstream slice is low. Generally, after decoding the mainstream slice, the terminal performs super-resolution processing on the decoded image to re-rate the code rate to 4K; however, during the promotion process, the time-frequency quality of the original 4K video stream is compared. It will fall, so it can be corrected with the auxiliary code stream, such as replenishing the missing details, correcting the errors introduced during the encoding process, and so on.
- the auxiliary code stream such as replenishing the missing details, correcting the errors introduced during the encoding process, and so on.
- S35 The terminal determines whether the jth mainstream fragment is the last mainstream fragment to be played.
- the video to be played includes 10 mainstream fragments, and each mainstream fragment corresponds to one auxiliary stream fragment.
- the mainstream fragment indicated by the current playback time is the fifth mainstream fragment, and the sixth to ten mainstream streams are cached.
- Fragmentation, and 6th to 7th auxiliary stream segmentation a possible case is: playing the synthesized slice 6, the synthesized slice 7, and the 8th to 10th mainstream segments in sequence.
- the composite slice 6 is a composite slice obtained by superimposing and reconstructing the sixth mainstream slice and the sixth auxiliary stream slice
- the composite slice 7 is the seventh mainstream slice and the seventh auxiliary stream segment.
- the composite fragments obtained after the slices are superimposed and reconstructed.
- the terminal requests the mainstream fragment, and requests the auxiliary stream fragmentation as needed; wherein the auxiliary stream fragment is used to improve the code rate of the mainstream fragment.
- the primary encoded stream can be played separately, or the primary encoded stream and the secondary encoded stream are superimposed and reconstructed, so the buffered primary encoded stream does not lose its role due to buffering the secondary encoded stream. Compared with the prior art, it is possible to save transmission resources and cache resources.
- the mainstream fragment and the auxiliary stream fragment can be transmitted on two independent links or in the same chain. Transfer on the road. If the transmission is on the same link, both the terminal and the server need only maintain this link, so the implementation is simple.
- the link here can be an HTTP/2 link. That is, when the terminal sends the primary fragment request and the secondary stream fragment request, the same HTTP/2 link is used, that is, the mainstream fragment and the auxiliary stream fragment use different HTTP/2 frames, and the two streams are multiplexed. Go to the same HTTP/2 link.
- the foregoing S11 to S16 provide a process of acquiring the first mainstream fragment and the first auxiliary stream fragment.
- an interrupt request can also be set to interrupt the transmission process of the auxiliary stream fragment.
- the following steps S41 to S47 may be included.
- the second mainstream fragment is used as an example for description. It can be understood that the second mainstream fragment is arbitrarily, that is, the terminal can interrupt the transmission process of any one of the auxiliary stream fragments in the time-frequency to be played.
- S41 The terminal sends a second mainstream fragment request to the server, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is the first mainstream fragment in the at least two mainstream fragments.
- S42 The server receives the second mainstream fragmentation request sent by the terminal, and sends a second mainstream fragment to the server according to the second mainstream fragmentation request.
- S43 The terminal receives the second mainstream fragment sent by the server, and caches the second mainstream fragment.
- S45 The server receives the second auxiliary stream fragmentation request sent by the terminal.
- the terminal can detect the current network status in real time. Therefore, if the terminal sends the second auxiliary stream fragmentation request to the server and receives the second auxiliary stream fragment, the terminal detects that the current real-time network status does not meet the preset condition. In this case, the network is in a bad condition. If the server sends the second auxiliary stream fragment to the terminal, it may take a long time, which may cause the terminal to play a video in the process of playing the video.
- the terminal request may be an RST_STREM frame in the HTTP/2, or may be a new frame, or another frame, which is not limited in this embodiment of the present application.
- the terminal detects that the current real-time network condition still meets the preset condition after sending the second auxiliary stream fragmentation request to the server and before receiving the second auxiliary stream fragmentation, the terminal does not send an interrupt request to the server, that is, The server will not receive an interrupt request.
- the server sends a second secondary stream fragmentation request to the terminal, and the terminal receives the second auxiliary stream fragment and caches the second auxiliary stream fragment.
- the server receives the interrupt request sent by the terminal, and if it is determined that the second auxiliary stream fragment has not been sent to the terminal, interrupts the transmission process of the second auxiliary stream fragment according to the interrupt request.
- the server may not respond to the second auxiliary stream fragmentation request message, that is, the second auxiliary stream fragment is not sent to the terminal. If the server has sent the second auxiliary stream fragment to the terminal when receiving the interrupt request sent by the terminal, the server may discard the interrupt request.
- the terminal may not receive the second auxiliary stream fragment sent by the server, but the terminal has acquired the second mainstream fragment, and therefore, the terminal may continue to request the second mainstream fragment from the server.
- the next mainstream shard may be understood that after performing S41-S47.
- the terminal may trigger the interruption.
- the transmission process of the requested auxiliary stream fragment the terminal can obtain the next mainstream fragment of the mainstream fragment corresponding to the auxiliary stream fragment to a certain extent, thereby effectively reducing the occurrence of a stuck phenomenon in the process of playing the video by the terminal.
- each network element such as a terminal or a server.
- each network element such as a terminal or a server.
- it includes hardware structures and/or software modules corresponding to the execution of the respective functions.
- the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
- the embodiment of the present application may divide a function module into a terminal or a server according to the foregoing method.
- each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
- FIG. 10 shows a possible structural diagram of the terminal 100 involved in the above embodiment.
- the terminal 100 includes a transmitting unit 1401 and a receiving unit 1402.
- the method further includes: a reconstruction unit 1403 and a playback unit 1404.
- the transmitting unit 1401 may be configured to perform actions performed by the terminal in S11 and S14 in FIG. 6, actions performed by the terminal in S41 and S46 in FIG. 9, and/or other processes for supporting the techniques described herein.
- the receiving unit may be used to perform actions performed by the terminal in S12 and S15 in FIG. 6, actions performed by the terminal in S42 in FIG. 9, and/or other processes for supporting the techniques described herein.
- Reconstruction unit 1403 can be used to perform the actions reconstructed in S34 of Figure 8, and/or other processes for supporting the techniques described herein.
- Play unit 1404 can be used to perform the actions played in S34 of Figure 8, and/or other processes for supporting the techniques described herein.
- the terminal is presented in a form corresponding to each function to divide each functional module, or the policy entity is presented in a form of dividing each functional module in an integrated manner.
- a "module” herein may refer to an Application-Specific Integrated Circuit (ASIC), a processor and memory that executes one or more software or firmware programs, integrated logic circuits, and/or other devices that provide the above functionality.
- ASIC Application-Specific Integrated Circuit
- the terminal can take the form shown in FIG.
- the sending unit 1401 provided above may be a transmitter
- the receiving unit 1402 may be a receiver
- the transmitter may form a transceiver together with the receiver, which may specifically be the communication interface 1301 in FIG.
- reconstruction unit 1403 may be embedded in the hardware or in a processor independent of the terminal (such as the processor 1302 in FIG. 4), or may be stored in the memory of the terminal in the form of software (such as the memory 1303 in FIG. 4). )in.
- Play unit 1404 can be player 1305 and/or display 1306 in FIG.
- the terminal provided by the embodiment of the present application can be used to perform the above-mentioned video transmission method. Therefore, the technical effects of the present invention can be referred to the foregoing method embodiments.
- 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 transmitting unit 1502.
- the method further includes: an interrupting unit 1503.
- the receiving unit 1501 may be configured 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 techniques described herein.
- the transmitting 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 techniques described herein.
- Interrupt unit 1503 can be used to perform the actions of S47 in Figure 9, and/or other processes for supporting the techniques described herein.
- the server is presented in a form corresponding to each functional module, or the server is presented in a form of dividing each functional module in an integrated manner.
- a “module” herein may refer to a particular ASIC circuit, a processor and memory that executes one or more software or firmware programs, integrated logic circuitry, and/or other devices that can provide the functionality described above.
- the terminal can take the form shown in FIG.
- the sending unit 1502 provided above may be a transmitter
- the receiving unit 1501 may be a receiver
- the transmitter may form a transceiver together with the receiver, which may specifically be the communication interface 1201 in FIG.
- the interrupting unit 1503 may be embedded in hardware or in a processor independent of the terminal (such as the processor 1202 in FIG. 3), or may be stored in software in the memory of the terminal (such as the memory 1203 in FIG. 3). in.
- the terminal provided by the embodiment of the present application can be used to perform the above-mentioned video transmission method. Therefore, the technical effects of the present invention can be referred to the foregoing method embodiments.
- the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
- 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.
- the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are generated in whole or in part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transmission to another website site, computer, server or data center via wired (eg coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.).
- the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device that includes one or more servers, data centers, etc. that can be integrated with the media.
- the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)) or the like.
- a magnetic medium eg, a floppy disk, a hard disk, a magnetic tape
- an optical medium eg, a DVD
- a semiconductor medium such as a solid state disk (SSD)
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Embodiments of the present application disclose a video transmission method and device, relating to the technical field of transmission, and are used to conserve transmission and cache resources. The video comprises a primary encoding stream and a secondary encoding stream. The secondary encoding stream is used to increase a bit rate of the primary encoding stream. The primary encoding stream comprises at least two primary stream fragments. The secondary encoding stream comprises at least two secondary stream fragments. Each primary stream fragment corresponds to one secondary stream fragment. The method comprises: sending a first primary stream fragment request to a server, wherein the first primary stream fragment request is used to request a first primary stream fragment, and the first primary stream fragment is a primary stream fragment in at least two primary stream fragments; receiving the first primary stream fragment sent by the server; sending a first secondary stream fragment request to the server if a current real-time network status satisfies a preset condition, wherein the first secondary stream fragment request is used to request a first secondary stream fragment corresponding to the first primary stream fragment; and receiving the first secondary stream fragment sent by the server.
Description
本申请要求于2017年3月8日提交中国专利局、申请号为201710140922.6、发明名称为“一种视频传输方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. JP-A No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. .
本申请涉及传输技术领域,尤其涉及一种视频传输方法和装置。The present application relates to the field of transmission technologies, and in particular, to a video transmission method and apparatus.
HLS(HTTP live streaming)是基于超文本传输协议(hyper text transfer protocol,HTTP)的一种流媒体传输协议,可实现流媒体的直播和点播。在HLS点播场景中,服务器对视频内容进行编码,得到不同码率的多个视频文件,然后按照时间将该多个视频文件中的每个视频文件分为多个分片。终端需要播放视频时,按照播放时间和当前网络状况请求需要的分片,并对所请求到的分片进行缓存、解码和播放。HLS (HTTP live streaming) is a streaming media transmission protocol based on hypertext transfer protocol (HTTP), which enables live streaming and on-demand streaming. In an HLS on-demand scenario, the server encodes the video content to obtain a plurality of video files of different code rates, and then divides each of the plurality of video files into a plurality of slices according to time. When the terminal needs to play the video, it requests the required fragment according to the playing time and the current network condition, and buffers, decodes, and plays the requested fragment.
在HLS技术中,终端所请求的分片从低码率切换为高码率时,已缓存但未播放的低码率分片会失去作用,从而造成传输资源和缓存资源的浪费。In the HLS technology, when the fragment requested by the terminal is switched from the low code rate to the high code rate, the cached but unplayed low bit rate fragments will be disabled, resulting in waste of transmission resources and cache resources.
发明内容Summary of the invention
本申请实施例提供一种视频传输方法和装置,用以节省传输资源和缓存资源。The embodiment of the present application provides a video transmission method and apparatus, which are used to save transmission resources and cache resources.
第一方面,提供一种视频传输方法,该视频包括主编码流和辅编码流,辅编码流用于提高主编码流的码率,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。该方法包括:终端向服务器发送第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片;接收服务器发送的第一主流分片;若当前实时网络状况满足预设条件,则向服务器发送第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片;接收服务器发送的第一辅流分片。该技术方案中,终端请求主流分片,并按需请求辅流分片;其中,辅流分片用于提高主流分片的码率。由于在本申请实施例中,主编码流可以单独播放,或者,主编码流与辅编码流叠加重构后播放,因此已缓存的主编码流不会因缓存辅编码流而失去作用。与现有技术相比,能够节省传输资源和缓存资源。In a first aspect, a video transmission method is provided, where the video includes a primary encoded stream and a secondary encoded stream, where the secondary encoded stream is used to increase a code rate of the primary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least Two auxiliary stream segments, each of which corresponds to one auxiliary stream segment. The method includes: the terminal sends a first mainstream fragment request to the server, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is one mainstream fragment of the at least two mainstream fragments. Receiving a first mainstream fragment sent by the server; if the current real-time network condition meets the preset condition, sending a first auxiliary stream fragment request to the server, where the first auxiliary stream fragment request is used to request the first mainstream fragment Corresponding first auxiliary stream fragment; receiving the first auxiliary stream fragment sent by the server. In the technical solution, the terminal requests the mainstream fragment, and requests the auxiliary stream fragmentation as needed; wherein the auxiliary stream fragment is used to improve the code rate of the mainstream fragment. In the embodiment of the present application, the primary encoded stream can be played separately, or the primary encoded stream and the secondary encoded stream are superimposed and reconstructed, so the buffered primary encoded stream does not lose its role due to buffering the secondary encoded stream. Compared with the prior art, it is possible to save transmission resources and cache resources.
可选的,终端和服务器之间通过HTTP/2协议通信。该服务器可以是支持HTTP/2协议的任一个服务器,例如可以是WEB服务器。Optionally, the terminal and the server communicate through the HTTP/2 protocol. The server can be any server that supports the HTTP/2 protocol, and can be, for example, a WEB server.
在一种可能的实现方式中,该方法还可以包括:终端将第一主流分片和第一辅流分片叠加并重构,播放重构后生成的码流。这样,能够提高视频播放质量。In a possible implementation manner, the method may further include: the terminal superimposing and reconstructing the first mainstream fragment and the first auxiliary stream fragment, and playing the reconstructed code stream. In this way, the quality of video playback can be improved.
在一种可能的实现方式中,终端接收服务器发送的第一主流分片,可以包括:在一链路上接收服务器发送的第一主流分片,其中,该链路可以是终端与服务器之间的任一条链 路。该情况下,上述接收服务器发送的第一辅流分片,包括:在链路上接收服务器发送的第一辅流分片。这样,终端和服务器均只需要维护一条链路即可,因此实现简单。In a possible implementation, the receiving, by the terminal, the first mainstream fragment sent by the server may include: receiving, by a server, a first mainstream fragment sent by the server, where the link may be between the terminal and the server. Any of the links. In this case, the first auxiliary stream fragment sent by the receiving server includes: receiving, by the link, the first auxiliary stream fragment sent by the server. In this way, both the terminal and the server need only maintain one link, so the implementation is simple.
在一种可能的实现方式中,该方法还可以包括:终端向服务器发送第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片;接收服务器发送的第二主流分片;若当前实时网络状况满足预设条件,则向服务器发送第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片;若在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,检测到当前实时网络状况不满足预设条件,则向服务器发送中断请求,其中,中断请求用于请求中断第二辅流分片的传输流程。这样,能够在一定程度上减少终端获取第二主流分片的下一个主流分片,从而有效较少终端播放视频的过程中出现卡顿的现象的发生。可以理解的,该可能的实现方式可以不依赖于上文提供的任一技术方案,而单独执行,这样,第二主流分片具有任性。In a possible implementation, the method may further include: the terminal sending a second mainstream fragment request to the server, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is at least a mainstream fragment other than the first mainstream fragment in the two mainstream fragments; a second mainstream fragment sent by the receiving server; if the current real-time network condition meets the preset condition, sending the second auxiliary stream to the server a slice request, where the second auxiliary stream fragment request is used to request a second auxiliary stream fragment corresponding to the second mainstream fragment; if the second auxiliary stream fragmentation request is sent to the server, and the second auxiliary stream is received Before detecting the current real-time network condition, the interrupt request is sent to the server, where the interrupt request is used to request to interrupt the transmission process of the second auxiliary stream fragment. In this way, the terminal can obtain the next mainstream fragment of the second mainstream fragment to be reduced to a certain extent, thereby effectively reducing the occurrence of a stuck phenomenon in the process of playing the video by the terminal. It can be understood that the possible implementation manner can be performed separately without relying on any of the technical solutions provided above, such that the second mainstream fragment is arbitrary.
第二方面,提供一种视频传输方法,该视频包括主编码流和辅编码流,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应;该方法可以包括:服务器接收终端发送的第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片;向终端发送第一主流分片;接收终端发送的第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片;第一辅流分片请求是终端在当前网络状况满足预设条件的情况下发送的;向终端发送第一辅流分片。A second aspect provides a video transmission method, where the video includes a primary encoded stream and a secondary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each mainstream fragment. Corresponding to a secondary stream segment; the method may include: the server receiving the first mainstream fragment request sent by the terminal, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is at least two The first mainstream fragment is sent to the terminal; the first auxiliary stream fragment request sent by the terminal is received, where the first auxiliary stream fragment request is used to request the first mainstream fragment corresponding to the first mainstream fragment. The first auxiliary stream fragmentation request is sent by the terminal if the current network condition meets the preset condition; and the first auxiliary stream fragment is sent to the terminal.
在一种可能的实现方式中,向终端发送第一主流分片,可以包括:在一链路上向终端发送第一主流分片。该情况下,向终端发送第一辅流分片,可以包括:在该链路上向终端发送第一辅流分片。In a possible implementation, 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 fragment to the terminal may include: sending the first auxiliary stream fragment to the terminal on the link.
在一种可能的实现方式中,主流分片的优先级高于该主流分片对应的辅流分片的优先级。该情况下,向终端发送第一辅流分片,可以包括:若确定已向终端发送第一主流分片,则向终端发送第一辅流分片。这样,能够保证主流分片可以优先传输,从而保证主流分片的播放连续性。In a possible implementation manner, the priority of the mainstream fragment is higher than the priority of the auxiliary stream fragment corresponding to the mainstream fragment. In this case, sending the first auxiliary stream fragment to the terminal may include: if it is determined that the first mainstream fragment is sent to the terminal, sending the first auxiliary stream fragment to the terminal. In this way, the mainstream fragments can be preferentially transmitted, thereby ensuring the continuity of playback of the mainstream fragments.
在一种可能的实现方式中,该方法还可以包括:服务器接收终端发送的第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片;向终端发送第二主流分片;接收终端发送的第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片;若在向终端发送第二辅流分片请求之前,接收到终端发送的中断请求,则中断第二辅流分片的传输流程。可以理解的,该可能的实现方式可以不依赖于上文提供的任一技术方案,而是单独执行,这样,第二主流分片具有任性。In a possible implementation, the method may further include: the server receiving the second mainstream fragment request sent by the terminal, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is a mainstream fragment other than the first mainstream fragment of the at least two mainstream fragments; sending a second mainstream fragment to the terminal; receiving a second auxiliary stream fragmentation request sent by the terminal, where the second auxiliary stream is divided The slice request is used to request the second auxiliary stream fragment corresponding to the second mainstream fragment; if the interrupt request sent by the terminal is received before the second auxiliary stream fragmentation request is sent to the terminal, the second auxiliary stream fragment is interrupted. Transmission process. It can be understood that the possible implementation manner may be performed independently of any of the technical solutions provided above, such that the second mainstream fragment is arbitrary.
第二方面或第二方面的任一种可能的实现方式提供的技术方案的有益效果均可以参考上述第一方面或第一方面可能的实现方式,此处不再赘述。The beneficial effects of the technical solutions provided by the second aspect or any of the possible implementation manners of the second aspect may refer to the foregoing first aspect or the possible implementation manner of the first aspect, and details are not described herein again.
第三方面,提供一种终端,视频包括主编码流和辅编码流,辅编码流用于提高主编码流的码率,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。该终端可以包括:发送单元和接收单元。其中,发送单元,用 于向服务器发送第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片。接收单元,用于接收服务器发送的第一主流分片。发送单元还用于,若当前实时网络状况满足预设条件,则向服务器发送第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片。接收单元还用于,接收服务器发送的第一辅流分片。A third aspect provides a terminal, where the video includes a primary encoded stream and a secondary encoded stream, where the secondary encoded stream is used to increase a code rate of the primary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two secondary streams. Flow segmentation, where each mainstream segment corresponds to one auxiliary stream segment. The terminal may include: a transmitting unit and a receiving unit. The sending unit is configured to send a first mainstream fragment request to the server, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is one of the at least two mainstream fragments. Fragmentation. The receiving unit is configured to receive the first mainstream fragment sent by the server. The sending unit is further configured to: if the current real-time network condition meets the preset condition, send a first auxiliary stream fragment request to the server, where the first auxiliary stream fragment request is used to request the first auxiliary corresponding to the first mainstream fragment Streaming slices. The receiving unit is further configured to receive the first auxiliary stream fragment sent by the server.
在一种可能的实现方式中,该终端还可以包括:重构单元和播放单元。其中,重构单元,用于将第一主流分片和第一辅流分片叠加并重构。播放单元,用于播放重构后生成的码流。In a possible implementation, the terminal may further include: a reconstruction unit and a playback unit. The reconstruction unit is configured to superimpose and reconstruct the first mainstream segment and the first auxiliary stream segment. The playing unit is configured to play the code stream generated after the reconstruction.
在一种可能的实现方式中,接收单元具体用于,在一链路上接收服务器发送的第一主流分片;在该链路上接收服务器发送的第一辅流分片。In a possible implementation manner, the receiving unit is configured to: receive, by a server, a first mainstream fragment sent by the server on a link; and receive, by the link, the first auxiliary stream fragment sent by the server.
在一种可能的实现方式中,发送单元还可以用于,向服务器发送第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片。接收单元还可以用于,接收服务器发送的第二主流分片。发送单元还可以用于,若当前实时网络状况满足预设条件,则向服务器发送第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片。发送单元还可以用于,若在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,检测到当前实时网络状况不满足预设条件,则向服务器发送中断请求,其中,中断请求用于请求中断第二辅流分片的传输流程。In a possible implementation, the sending unit may be further configured to send a second mainstream fragment request to the server, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is at least One of the two mainstream slices except the first mainstream slice. The receiving unit is further configured to receive the second mainstream fragment sent by the server. The sending unit may be further configured to: if the current real-time network condition meets the preset condition, send a second auxiliary stream fragmentation request to the server, where the second auxiliary stream fragmentation request is used to request the second corresponding to the second mainstream fragment Auxiliary flow segmentation. The sending unit may be further configured to: if the current real-time network condition does not satisfy the preset condition after detecting the second auxiliary stream fragmentation request to the server and before receiving the second auxiliary stream fragmentation, send an interrupt request to the server, The interrupt request is used to request to interrupt the transmission process of the second auxiliary stream fragment.
第四方面,提供一种服务器,视频包括主编码流和辅编码流,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。该服务器可以包括:接收单元和发送单元。其中,接收单元,用于接收终端发送的第一主流分片请求,其中,第一主流分片请求用于请求第一主流分片,第一主流分片是至少两个主流分片中的一个主流分片。发送单元,用于向终端发送第一主流分片。接收单元还用于,接收终端发送的第一辅流分片请求,其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片;第一辅流分片请求是终端在当前网络状况满足预设条件的情况下发送的。发送单元还用于,向终端发送第一辅流分片。A fourth aspect provides a server, where the video includes a primary encoded stream and a secondary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each mainstream fragment and one auxiliary stream. The stream is fragmented. The server may include: a receiving unit and a transmitting unit. The receiving unit is configured to receive a first mainstream fragment request sent by the terminal, where the first mainstream fragment request is used to request the first mainstream fragment, and the first mainstream fragment is one of at least two mainstream fragments. Mainstream segmentation. And a sending unit, configured to send the first mainstream fragment to the terminal. The receiving unit is further configured to: receive the first auxiliary stream fragmentation request sent by the terminal, where the first auxiliary stream fragmentation request is used to request the first auxiliary stream fragment corresponding to the first mainstream fragment; the first auxiliary stream fragmentation The request is sent by the terminal if the current network condition satisfies the preset condition. The sending unit is further configured to send the first auxiliary stream fragment to the terminal.
在一种可能的实现方式中,发送单元具体用于:在一链路上向终端发送第一主流分片;在该链路上向终端发送第一辅流分片。In a possible implementation manner, the sending unit is specifically configured to: send a first mainstream fragment to the terminal on a link; and send the first auxiliary stream fragment to the terminal on the link.
在一种可能的实现方式中,主流分片的优先级高于该主流分片对应的辅流分片的优先级;该情况下,发送单元具体用于:若确定已向终端发送第一主流分片,则向终端发送第一辅流分片。In a possible implementation manner, the priority of the mainstream fragment is higher than the priority of the auxiliary stream fragment corresponding to the mainstream fragment. In this case, the sending unit is specifically configured to: if it is determined that the first mainstream has been sent to the terminal Fragmentation, the first auxiliary stream fragment is sent to the terminal.
在一种可能的实现方式中,接收单元还用于,接收终端发送的第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片。发送单元还用于,向终端发送第二主流分片。接收单元还用于,接收终端发送的第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片。接收单元还用于,接收终端发送的中断请求。该服务器还可以包括:中断单元,用于若在发送单元向终端发送第二辅流分片请求之前,接收单元接收到终端发送的中断请求,则中断第二辅流分片的传输流程。In a possible implementation, the receiving unit is further configured to: receive a second mainstream fragment request sent by the terminal, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is at least One of the two mainstream slices except the first mainstream slice. The sending unit is further configured to send the second mainstream fragment 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 the second auxiliary stream fragment corresponding to the second mainstream fragment. The receiving unit is further configured to receive an interrupt request sent by the terminal. The server may further include: an interrupting unit, configured to interrupt the transmission process of the second auxiliary stream fragment if the receiving unit receives the interrupt request sent by the terminal before the sending unit sends the second auxiliary stream fragmentation request to the terminal.
可选的,上文第一方面至第四方面中的中断请求可以包括:HTTP/2中的RST_STREM帧。另外,中断请求还可以是一种新设计的帧,或者可以复用现有技术中提供的其他帧,本申请实施例对此不进行限定。Optionally, the interrupt request in the above first to fourth aspects may include: an RST_STREM frame in HTTP/2. In addition, the interrupt request may be a newly designed frame, or other frames provided in the prior art may be multiplexed, 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 terminal behavior in the foregoing method embodiment. This function can be implemented in hardware or in hardware by executing the corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
在一种可能的实现方式中,该终端可以包括:处理器、存储器、通信总线和通信接口;其中,存储器用于存储计算机执行指令,处理器与存储器通过通信总线连接,当终端运行时,处理器执行存储器存储的计算机执行指令,以使终端执行上述第一方面或第一方面的任一种实现方式提供的视频传输方法。In a possible implementation manner, the terminal may include: a processor, a memory, a communication bus, and a communication interface; wherein the memory is configured to store a computer execution instruction, the processor and the memory are connected through a communication bus, and when the terminal is running, processing The computer executing the memory storage executes the instructions to cause the terminal to perform the video transmission method provided by the above first aspect or any one of the first aspects.
第六方面,提供一种计算机可读存储介质,用于储存为上述终端所用的计算机软件指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的视频传输方法。In a sixth aspect, a computer readable storage medium for storing computer software instructions for use by the terminal, when executed on a computer, causes the computer to perform the video transmission method of any of the above aspects.
第七方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的视频传输方法。In a seventh aspect, a computer program product comprising instructions for causing a computer to perform the video transmission method of any of the above first aspects when executed on a computer is provided.
另外,第三方面、第五方面和第六方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。In addition, the technical effects brought by the design manners of any one of the third aspect, the fifth aspect, and the sixth aspect can be referred to the technical effects brought by different design modes in the first aspect, and details are not described herein again.
第八方面,提供一种服务器,该服务器具有实现上述方法实施例中服务器行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In an eighth aspect, a server is provided, the server having a function of implementing server behavior in the above method embodiment. This function can be implemented in hardware or in hardware by executing the corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
在一种可能的实现方式中,该服务器可以包括:处理器、存储器、通信总线和通信接口。其中,存储器用于存储计算机执行指令,处理器与存储器通过通信总线连接,当服务器运行时,处理器执行存储器存储的计算机执行指令,以使服务器执行上述第二方面或第二方面的任一种实现方式提供的视频传输方法。In a possible implementation, the server may include: a processor, a memory, a communication bus, and a communication interface. The memory is used to store computer execution instructions, the processor and the memory are connected by a communication bus, and when the server is running, the processor executes the memory storage computer execution instructions, so that the server performs any of the above second aspect or the second aspect. The video transmission method provided by the implementation.
第九方面,提供一种计算机可读存储介质,用于储存为上述服务器所用的计算机软件指令,当其在计算机上运行时,使得计算机可以执行上述第二方面中任一项的视频传输方法。In a ninth aspect, a computer readable storage medium for storing computer software instructions for use by the server, when executed on a computer, causes the computer to perform the video transmission method of any of the above second aspects.
第十方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第二方面中任一项的视频传输方法。According to a tenth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the video transmission method of any of the above second aspects.
另外,第四方面、第九方面和第十方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。In addition, the technical effects brought by the design manners of any one of the fourth aspect, the ninth aspect, and the tenth aspect can be referred to the technical effects brought by different design modes in the first aspect, and details are not described herein again.
图1为本申请实施例提供的技术方案所适用的一种系统架构的示意图;FIG. 1 is a schematic diagram of a system architecture applicable to a technical solution provided by an embodiment of the present disclosure;
图2为本申请实施例提供的一种编码服务器的结构示意图;2 is a schematic structural diagram of an encoding server according to an embodiment of the present application;
图3为本申请实施例提供的一种传输服务器的结构示意图;FIG. 3 is a schematic structural diagram of a transmission server according to an embodiment of the present disclosure;
图4为本申请实施例提供的一种终端的结构示意图;FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present application;
图5为本申请实施例提供的一种视频传输方法的交互示意图;FIG. 5 is a schematic diagram of interaction of a video transmission method according to an embodiment of the present application;
图6为本申请实施例提供的另一种视频传输方法的交互示意图;FIG. 6 is a schematic diagram of interaction of another video transmission method according to an embodiment of the present disclosure;
图7为本申请实施例提供的一种视频传输方法的流程示意图;FIG. 7 is a schematic flowchart of a video transmission method according to an embodiment of the present application;
图8为本申请实施例提供的一种播放视频的流程示意图;FIG. 8 is a schematic flowchart of playing a video according to an embodiment of the present application;
图9为本申请实施例提供的另一种视频传输方法的交互示意图;FIG. 9 is a schematic diagram of interaction of another video transmission method according to an embodiment of the present disclosure;
图10为本申请实施例提供的另一种终端的结构示意图;FIG. 10 is a schematic structural diagram of another terminal according to an embodiment of the present disclosure;
图11为本申请实施例提供的另一种服务器的结构示意图。FIG. 11 is a schematic structural diagram of another server according to an embodiment of the present application.
在HLS技术中,终端所请求的分片从低码率切换为高码率时,已缓存但未播放的低码率分片会失去作用,从而造成传输资源和缓存资源的浪费。例如,假设终端已请求并缓存了低码率分片1~10,且当前正在播放分片5;若终端在播放分片5时,检测到当前网络状况较好,则可以向服务器请求高码率的分片6,这样,已缓存但未播放的低码率的分片6会失去作用,从而造成传输资源和缓存资源的浪费。In the HLS technology, when the fragment requested by the terminal is switched from the low code rate to the high code rate, the cached but unplayed low bit rate fragments will be disabled, resulting in waste of transmission resources and cache resources. For example, suppose the terminal has requested and cached the low code rate fragments 1 to 10, and is currently playing the fragment 5; if the terminal detects that the current network condition is good when the fragment 5 is played, the high code can be requested from the server. The fragment 6 of the rate, such that the low-rate fragment 6 that has been cached but not played will be deactivated, thereby causing 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 is: the terminal requests the mainstream fragmentation, and requests the auxiliary stream fragmentation as needed; wherein the auxiliary stream fragment is used to improve the mainstream fragmentation. Code rate. In the prior art, fragments of the same content of different code rates exist independently, are independently transmitted, and are selectively played. In the present application, the role of the secondary encoded stream is to improve the code rate of the primary encoded stream, that is, the primary encoded stream can be played separately, or the primary encoded stream and the secondary encoded stream are superimposed and reconstructed, and thus the cached primary encoding is performed. The stream does not lose its effect by caching the secondary encoded stream. Compared with the prior art, it is possible to save transmission resources and cache resources.
本申请实施例中所涉及的主编码流和辅编码流可以是服务器根据重构视频编码(reconstructive video coding,RVC)技术等编码后得到的码流。其中,在RVC技术中,编码器可以同时生成两路流,其中一路为主编码流,一路为辅编码流。主编码流为分辨率较低的视频码流,播放器可以直接解码播放。辅编码流的作用是协助播放器对主编码流进行分辨率的提升。比如,主编码流的码率为720p,通过进行超分辨率操作,叠加辅编码流后进行重构,即可将该码率提升到1080p,从而提升视频的播放质量。当然,本申请实施例不限定于RVC技术这一种编码技术,还可以是其他的编码技术。The primary encoded stream and the secondary encoded stream involved in the embodiment of the present application may be a code stream obtained by the server after being encoded according to a reconstructive video coding (RVC) technology or the like. Among them, in the RVC technology, the encoder can generate two streams at the same time, one of which is the primary encoded stream and the other is the secondary encoded stream. The main encoded stream is a video stream with a lower resolution, and the player can directly decode and play. The role of the secondary encoded stream is to assist the player in improving the resolution of the primary encoded stream. For example, the code rate of the main code stream is 720p. By performing super-resolution operation and superimposing the auxiliary code stream and reconstructing, the code rate can be increased to 1080p, thereby improving the video playback quality. Of course, the embodiment of the present application is not limited to the coding technology of the RVC technology, and may be other coding technologies.
本申请实施例提供的技术方案可以应用于如图1所示的系统架构中,图1所示的系统包:编码服务器11、传输服务器12和终端13。编码服务器11用于按照某种编码技术对视频内容进行编码,并将编码结果传输至传输服务器12。传输服务器12用于保存编码结果,并在接收到终端13发送的分片请求时,向终端13发送编码后的分片。终端13用于根据用户指示或者自身触发向传输服务器12发送分片请求,并对接收到传输服务器12发送的编码后的分片进行解码和播放。The technical solution provided by the embodiment of the present application can be applied to the system architecture shown in FIG. 1 , the system package shown in FIG. 1 : the encoding server 11 , the transmission server 12 , and the terminal 13 . The encoding server 11 is for encoding the video content according to a certain encoding technique and transmitting the encoded result to the transmission server 12. The transmission server 12 is configured to save the encoded result, and when receiving the fragmentation request sent by the terminal 13, transmits the encoded fragment to the terminal 13. The terminal 13 is configured to send a fragmentation request to the transmission server 12 according to a user indication or a self-trigger, and decode and play the encoded fragment received by the transmission server 12.
需要说明的是,图1仅为示例图,其中,本申请实施例对编码服务器11的个数、传输服务器12的个数和至少一个终端13的个数均不进行限定,在实际应用中,可以根据需要以不同于图1所示的个数进行网络部署。It should be noted that, FIG. 1 is only an example diagram, and the number of the encoding server 11 , the number of the transmission server 12 , and the number of at least one terminal 13 are not limited in the embodiment of the present application. In practical applications, Network deployment can be performed in different numbers as shown in Figure 1 as needed.
可选的,传输服务器12与终端13之间可以建立一条或多条链路,并在这些链路上传输分片请求和分片。其中,这里的链路可以是HTTP/2链路,该情况下,传输服务器12可 以是支持HTTP/2的服务器。当然,具体实现时不限于此。Optionally, one or more links may be established between the transport server 12 and the terminal 13, and the fragmentation request and the fragment are transmitted on the links. Here, the link here may be an HTTP/2 link, in which case the transport 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。As shown in FIG. 2, the encoding server 11 in FIG. 1 may include: a downsampling module 1101, a mainstream encoder 1102, an auxiliary stream generating module 1103, a fragmentation control module 1104, and a mainstream. The package fragmentation module 1105 and the auxiliary stream package fragmentation module 1106.
其中,下采样模块1101用于接收原始视频输入流,并对所输入的原始视频输入流进行降码率,并将降码率后得到的视频流输出至主流编码器1102。例如,接收4K的YUV格式的视频输入流,并对4K的YUV格式的视频输入流降码率,生成2K的YUV格式的视频流,然后将该2K的YUV格式的视频流输出至主流编码器1102。其中,YUV是一种色彩数据的编码格式。The downsampling module 1101 is configured to receive the original video input stream, perform a down conversion rate on the input original video input stream, and output the video stream obtained by the downsampling rate to the mainstream encoder 1102. For example, receiving a 4K YUV format video input stream, and a 4K YUV format video input stream downrate, generating a 2K YUV format video stream, and then outputting the 2K YUV format video stream to the mainstream encoder 1102. Among them, YUV is an encoding format of color data.
主流编码器1102用于接收下采样模块1101输入的视频流,并对该视频流进行编码,例如H.264编码等,生成主编码流,然后将主编码流输出至主流封装分片模块1105。The mainstream encoder 1102 is configured to receive the video stream input by the downsampling module 1101, and encode the video stream, for example, H.264 encoding, etc., generate a main encoded stream, and then output the main encoded stream to the mainstream package fragmentation module 1105.
辅流信息生成模块1103用于比较下采样模块1101输出的视频流与主流编码器1102输出的主编码流,生成辅编码流。其中,辅编码流包含重构用于提高视频质量的内容,例如对主编码流中的部分像素点进行修正的信息等。The auxiliary stream information generating module 1103 is configured to compare the video stream output by the downsampling module 1101 with the main encoded stream output by the mainstream encoder 1102 to generate a secondary encoded stream. The secondary encoded stream includes content reconstructed for improving video quality, such as information for correcting partial pixel points in the primary encoded stream.
主流封装分片模块1105用于接收主流编码器1102输出的主编码流,并在分片控制模块1104的控制下,按照时间点对主编码流进行分片及封装,得到至少两个主流分片,例如TS(transport stream)分片或者mp4分片等,然后输出该至少两个主流分片。The mainstream encapsulation fragmentation module 1105 is configured to receive the main encoded stream output by the mainstream encoder 1102, and under the control of the fragmentation control module 1104, segment and encapsulate the main encoded stream according to a time point to obtain at least two mainstream fragments. For example, TS (transport stream) fragment or mp4 fragment, etc., and then output the at least two mainstream fragments.
辅流封装切片模块1106用于接收辅流生成模块1103输出的辅编码流,并在分片控制模块1104的控制下,按照时间对辅编码流进行分片及封装,得到至少两个辅流分片,然后输出该至少两个辅流分片。其中,辅流分片的格式可以是自定义格式,每个辅流分片与一个主流分片对应,每个辅流分片的时间点与其对应的主流分片的时间点相同,每个辅流分片用于提高其所对应的主流分片的码率。The auxiliary stream encapsulation slice module 1106 is configured to receive the auxiliary code stream output by the auxiliary stream generation module 1103, and perform fragmentation and encapsulation on the auxiliary coded stream according to time under the control of the fragmentation control module 1104, to obtain at least two auxiliary stream segments. The slice then outputs the at least two auxiliary stream fragments. The format of the auxiliary stream fragment may be a custom format, and each auxiliary stream fragment corresponds to one mainstream fragment, and the time point of each auxiliary stream fragment is the same as the time point of the corresponding mainstream fragment, and each auxiliary The stream slice is used to increase the bit rate of the corresponding mainstream slice.
分片控制模块1104用于对主流封装分片模块1105的执行过程和辅流封装分片模块1106的执行过程进行控制,并生成描述分片(包括主流分片和辅流分片)的仓单文件,然后输出该仓单文件。其中,仓单文件可以包括每个分片的时间点,每个主流分片与每个主流分片的对应关系等等。The fragmentation control module 1104 is configured to control the execution process of the mainstream package fragmentation module 1105 and the execution process of the auxiliary stream package fragmentation module 1106, and generate a warehouse receipt that describes the fragmentation (including the mainstream fragment and the auxiliary stream fragment). File, then output the warehouse order file. The warehouse order file may include a time point of each slice, a correspondence between each mainstream slice and each mainstream slice, and the like.
另外,编码服务器11还可以包括通信接口,用于与外部设备(例如传输服务器2)进行通信。例如,用于接收主流封装分片模块1105输出的主流分片、辅流封装分片模块1106输出的辅流分片,以及分片控制模块1104输出的仓单文件;并将这些信息,发送至WEB服务器,其中,该WEB服务器可以是支持HTTP/2协议的WEB服务器,该服务器可以为上文中的传输服务器12。In addition, the encoding server 11 may further include a communication interface for communicating with an external device such as the transmission server 2. For example, the main stream fragment for receiving the output of the mainstream package fragmentation module 1105, the auxiliary stream fragment output by the auxiliary stream package fragmentation module 1106, and the warehouse order file output by the fragmentation control module 1104; and transmitting the information to The WEB server, wherein the WEB server may be a WEB server supporting the HTTP/2 protocol, and the server may be the transport server 12 above.
在硬件实现上,通信接口1107可以是收发器,下采样模块1101、主流编码器1102、辅流信息生成模块1103、分片控制模块1104、主流封装分片模块1105和辅流封装分片模块1106均可以以硬件形式内嵌于或独立于编码服务器11的处理器中,也可以以软件的形式存储于编码服务器11的存储器中,以便于处理器调用执行以上各个模块对应的操作。另外,编码服务器11除了包含收发器、处理器和存储器之外,还可以包含通信总线,用于使收发器、处理器和存储器相互连接。In hardware implementation, the communication interface 1107 can be a transceiver, a downsampling module 1101, a mainstream encoder 1102, a secondary stream information generating module 1103, a fragmentation control module 1104, a mainstream package fragmentation module 1105, and a secondary stream package fragmentation module 1106. Both may be embedded in the hardware of the encoding server 11 in hardware, or may be stored in the memory of the encoding server 11 in the form of software, so that the processor invokes the operations corresponding to the above modules. In addition, the encoding server 11 may include, in addition to the transceiver, the processor, and the memory, 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. 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 performing service data flow interaction between the transmission server 12 and external network elements such as the encoding server 11 and the terminal 13. Specifically, the communication interface 1201 can be configured to receive each mainstream fragment, each auxiliary stream fragment, and a warehouse order file sent by the encoding server 11. Alternatively, the main stream fragment request, the auxiliary stream encoding request or the interrupt request sent by the terminal 13 is received, or the requested main stream fragment, auxiliary stream fragment or warehouse order file is returned to the terminal 13. The memory 1203 can be used to store data and/or code, and the processor 1302 can implement various functions of the transport server 12 by running or executing program code stored in the memory 1203, as well as invoking 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 further include more components than the illustration, or combine some components, or different. Assembly of parts. For example, the transmission server 12 may also include a power source, a fan, a clock (CLK), and the like.
为了实现本申请实施例提供的技术方案,如图4所示,图1中的终端13可以包括:通信接口1301、处理器1302、存储器1303、通信总线1304、播放器1305和显示屏1306。其中,通信接口1301、处理器1302、存储器1303、播放器1305以及显示屏1306通过通信总线1304相互连接。In order to implement the technical solution provided by the embodiment of the present application, as shown in FIG. 4, the terminal 13 in FIG. 1 may include: a communication interface 1301, a processor 1302, a memory 1303, a communication bus 1304, a player 1305, and a display screen 1306. The communication interface 1301, the processor 1302, the memory 1303, the player 1305, and the display 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 performing service data flow interaction between the terminal 13 and an external network element (such as the transmission server 12). Specifically, the communication interface 1303 may be configured to send a mainstream fragment request, a secondary stream encoding request, or an interrupt request to the transmission server 12, or receive a mainstream fragment, a secondary stream fragment, or a warehouse order file sent by the transmission server. The memory 1303 can be used to store data and/or code, and the processor 1302 can implement various functions of the terminal 13 by running or executing program code 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 further include more components than the illustrated ones, or combine some components, or different component arrangements. For example, the terminal 13 may also include a power source, a fan, a clock, and the like.
另外,通信接口1201和通信接口1301均可以包括接收单元和发送单元,具体可以是收发器或者传输接口等。In addition, the communication interface 1201 and the communication interface 1301 may each include a receiving unit and a sending unit, and 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 a plurality of central processing units (CPUs) or include a plurality of network processing units (CPUs), which may be application specific integrated circuits (ASICs). Or one or more integrated circuits configured to implement embodiments of the present application, such as one or more digital signal processors (DSPs), or one or more field programmable gate arrays (field programmable gates) Array, FPGA), can also be a multi-core system-on-chip (SoC).
存储器1203和存储器1303均可以是易失性存储器(volatile memory),如:随机存取存储器(random-access memory,RAM);也可以是非易失性存储器(non-volatile memory),如:只读存储器(read-only memory,ROM)、快闪存储器(flash memory),硬盘(hard disk drive,HDD),还可以是固态硬盘(solid-state drive,SSD),或者上述种类的存储器的组合。通信总线1204和通信总线1304均可以分为地址总线、数据总线、控制总线等,可以是以 太网总线、工业标准体系结构(industry standard architecture,ISA)总线、外部设备互连(peripheral component,PCI)总线或扩展工业标准体系结构(extended industry standard architecture,EISA)总线等。为便于表示,图3和图4中仅用一条粗线表示各个通信总线,但并不表示仅有一根总线或一种类型的总线。The memory 1203 and the memory 1303 may each be a volatile memory, such as a random-access memory (RAM), or a non-volatile memory, such as a read-only memory. A read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), or a combination of the above types of memories. The communication bus 1204 and the communication bus 1304 can be divided into an address bus, a data bus, a control bus, etc., and can be an Ethernet bus, an industry standard architecture (ISA) bus, or a peripheral component (PCI). Bus or extended industry standard architecture (EISA) bus. For ease of representation, each of the communication buses is represented by only one thick line in FIGS. 3 and 4, but does not mean that there is only one bus or one type of bus.
需要说明的是,上文中均是是编码服务器11和传输服务器12为独立的设备进行描述的,具体实现时,这两个设备还可以是集成在一起的,另外,这两个设备中的任一个设备还可以与其他的网络侧设备集成在一起,本申请实施例对此不进行限定。It should be noted that, in the foregoing, the encoding server 11 and the transmission server 12 are described as independent devices. In specific implementation, the two devices may also be integrated, and in addition, any of the two devices A device may be integrated with other network-side devices, which is not limited in this embodiment of the present application.
为了便于描述,以下实施例以步骤的形式示出并详细描述了本发明提供的视频传输方法,其中,示出的步骤也可以在除图3所示的传输服务器12和图4所示的终端13之外的其他任一计算机中执行。此外,虽然在方法流程图中示出了本申请实施例提供的视频传输方法的逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。For convenience of description, the following embodiments show and describe in detail the video transmission method provided by the present invention, wherein the steps shown may also be in the transmission server 12 and the terminal shown in FIG. Executed in any computer other than 13. In addition, although the logical sequence of the video transmission method provided by the embodiment of the present application is shown in the method flowchart, in some cases, the steps shown or described may be performed in an order different from that herein.
需要说明的是,下文中提供的实施例中所描述的“服务器”具体可以是上文中描述的传输服务器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 only an association relationship describing the associated objects, indicating that there may be three kinds of relationships, for example, A and / or B, which may indicate that A exists separately, and A and B exist simultaneously, respectively. B these three situations. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship. "Multiple" as used herein refers to two or more.
如图5所示,为本申请实施例提供的一种视频传输方法的交互示意图。图5所示的方法可以包括以下步骤S101~S104:FIG. 5 is a schematic diagram of interaction of a video transmission method according to an embodiment of the present application. The method shown in FIG. 5 may include the following steps S101 to S104:
S101:终端向服务器获取待播放视频的仓单文件。S101: The terminal acquires a warehouse order file of the video to be played from the server.
待播放视频可以是终端向服务器请求的任意一段视频。该视频可以包括主编码流和辅编码流,辅编码流用于提高主编码流的码率,主编码流包括至少两个主流分片,辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应。其中,主编码流和辅编码流的生成过程及其分片过程,可以参考上文,此处不再赘述。The video to be played may be any video requested by the terminal to the server. The video may include a primary encoded stream and a secondary encoded stream, the secondary encoded stream is used to increase the code rate of the primary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each mainstream The slice corresponds to one auxiliary stream slice. The generation process of the primary coded stream and the secondary coded stream and the fragmentation process thereof may be referred to the above, and are not described herein again.
待播放视频的仓单文件可以包括但不限于:该至少两个主流分片中的每个主流分片的信息,以及该至少两个辅流分片中的每个辅流分片的信息。例如,每个分片(包括主流分片和辅流分片)的时间点,主流分片与辅流分片的对应关系等等。每个主流分片的时间点和与其对应的辅流分片的时间点相同。The warehouse order file of the to-be-played video may include, but is not limited to, information of each of the at least two mainstream segments, and information of each of the at least two auxiliary stream segments. For example, the time point of each fragment (including the mainstream fragment and the auxiliary stream fragment), the correspondence between the mainstream fragment and the auxiliary stream fragment, and the like. The time point of each mainstream slice is the same as the time point of the corresponding auxiliary stream slice.
当用户需要播放一个视频时,可以向终端发送指示信息,例如通过触屏操作,文字输入,语音输入等方式发送指示信息;终端检测到该指示信息之后,若确定该终端已与服务器之间建立连接,则向该服务器请求待播放视频的仓单文件;若确定该终端没有与服务器之间建立连接,则先与该服务器之间建立连接,再向该服务器请求待播放时频的仓单文件。其中,关于终端与服务器之间建立连接的过程,以及终端向服务器请求仓单文件的具体实现过程可参考现有技术,此处不再赘述。When the user needs to play a video, the terminal may send the indication information to the terminal, for example, by using a touch screen operation, text input, voice input, etc.; after detecting the indication information, the terminal determines that the terminal has been established with the server. If the connection is made, the warehouse file of the video to be played is requested from the server; if it is determined that the terminal does not establish a connection with the server, a connection is established with the server, and then the warehouse order file of the time-frequency to be played is requested 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 order file from the server, refer to the prior art, and details are not described herein again.
S102:终端解析仓单文件,得到待播放视频的每个分片的时间点,每个主流分片与辅流分片的对应关系等。S102: The terminal parses the warehouse order file, obtains a time point of each fragment of the video to be played, a correspondence relationship between each mainstream fragment and the auxiliary stream fragment, and the like.
S103:终端向服务器获取待播放视频的主流分片,并在当前实时网络状况满足预设条件时,获取主流分片对应的辅流分片;以及缓存获取到的每个分片。S103: The terminal obtains the mainstream fragment of the to-be-played video from the server, and obtains the auxiliary stream fragment corresponding to the mainstream fragment when the current real-time network status meets the preset condition; and caches each fragment obtained.
终端可以根据检测到的用户发送的指示信息,确定向服务器请求待播放时频中的哪个 主流分片,接着,终端可以在接收到服务器回复的该主流分片之后,向该服务器请求该主流分片的下一个主流分片,依次类推,直至终端向服务器请求到该待播放视频的最后一个分片为止。例如,假设待播放视频包括10个主流分片,那么,用户发送的指示信息所指示的播放起始时刻所对应的主流分片可以是第1个主流分片,也可以是第5个主流分片等。若所指示的播放起始时刻所对应的主流分片是第5个主流分片,则终端可以向服务器请求第5个主流分片,并在接收到服务器回复的第5个主流分片之后,向服务器请求第6个主流分片,依次类推,直至终端请求到第10个主流分片为止。The terminal may determine, according to the detected indication information sent by the user, which mainstream fragment in the time frequency to be played by the server, and then the terminal may request the mainstream segment from the server after receiving the mainstream fragment replied by the server. The next mainstream slice of the slice, and so on, until the terminal requests the server for the last slice of the video to be played. For example, if the video to be played includes 10 mainstream fragments, the mainstream fragment corresponding to the playback start time indicated by the indication information sent by the user may be the first mainstream fragment, or may be the fifth mainstream segment. Film and so on. If the mainstream fragment corresponding to the indicated playback start time is the fifth mainstream fragment, the terminal may request the fifth mainstream fragment from the server, and after receiving the fifth mainstream fragment of the server reply, The sixth mainstream fragment is requested from the server, and so on, until the terminal requests the 10th mainstream fragment.
当前网络状况不是一成不变的,其可以随着环境、负载等因素的变化而实时变化。终端可以周期性地检测当前网络状况,当检测周期较小时,可以认为是实时检测当前网络状况。其中,检测当前网络状况可以包括但不限于检测以下参数中的至少一种:网络时延,网络丢包率和网络波动系统。其具体检测过程可以参考现有技术,此处不再赘述。The current network status is not static, and it can change in real time as factors such as environment and load change. The terminal can periodically detect the current network status. When the detection period is small, it can be considered as detecting the current network status in real time. The detecting the current network status may include, but is 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, and details are not described herein again.
需要说明的是,在本申请实施例提供的技术方案中,当前实时网络状况,是指终端执行检测网络状况这一动作时,所检测到的网络状况。也就是说,本申请实施例的不同步骤中涉及到的“当前实时网络状况”所代表的含义,需要根据实际实现或实际语境确定,而不能认为不同步骤中的同一个词“当前实时网络状况”表示同一时刻测量得到的网络状况。类似地,“当前播放时刻”是指终端正在播放的时刻。It should be noted that, in the technical solution provided by the embodiment of the present application, the current real-time network status refers to the detected network status when the terminal performs the action of detecting the network status. That is to say, the meaning represented by the “current real-time network status” involved in the different steps of the embodiment of the present application needs to be determined according to actual implementation or actual context, and the same word in the different steps cannot be considered as “current real-time network”. "Status" indicates the network status measured at the same time. Similarly, "current play time" refers to the moment the terminal is playing.
当前实时网络状况满足预设条件,可以理解为,当前网络状况的质量较好,即通信质量较好。该情况下,终端可以向服务器请求辅流分片,以将该辅流分片与主流分片叠加并重构,从而提高该辅流分片对应的主流分片的码率,进而提高用户观看视频的体验。当前实时网络状况满足预设条件,可以包括以下至少一种:当前网络时延小于或等于第一阈值,当前网络丢包率小于或等于第二阈值,当前网络波动系数小于或等于第三阈值。本申请实施例对第一阈值、第二阈值和第三阈值的具体取值以及如何取值不进行限定。The current real-time network condition satisfies the preset condition, which can be understood as the quality of the current network condition is good, that is, the communication quality is good. In this case, the terminal may request the auxiliary stream fragment from the server to superimpose and reconstruct the auxiliary stream fragment and the mainstream fragment, thereby improving the code rate of the mainstream fragment corresponding to the auxiliary stream fragment, thereby improving user viewing. Video experience. The current network network condition meets the preset condition, and 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 specific values of the first threshold, the second threshold, and the third threshold, and how to obtain values, are not limited in this embodiment.
在本申请实施例中,终端可以独立缓存主流分片和辅流分片,例如,在终端中开辟特定的两部分存储空间,其中一部分存储空间用于存储主流分片,另一部分存储空间用于存储辅流分片。或者,终端可以集成缓存主流分片和辅流分片,例如,在终端中开辟特定的存储空间,并在该存储空间中存储主流分片和辅流分片。In the embodiment of the present application, the terminal may separately cache the mainstream fragment and the auxiliary stream fragment, for example, opening a specific two-part storage space in the terminal, where a part of the storage space is used for storing the mainstream fragment, and another part of the storage space is used for storing the mainstream fragment. Store auxiliary stream fragments. Alternatively, the terminal may integrate the cache mainstream fragment and the auxiliary stream fragment, for example, open a specific storage space in the terminal, and store the mainstream fragment and the auxiliary stream fragment in the storage space.
下面说明终端获取一个主流分片和其对应的辅流分片的过程。如图6所示,该方法包括以下步骤S11~S16:The process of acquiring a mainstream fragment and its corresponding auxiliary stream fragment is described below. As shown in FIG. 6, the method includes the following steps S11 to S16:
S11:终端向服务器发送第一主流分片请求,第一主流分片请求用于请求第一主流分片。S11: The terminal sends a first mainstream fragment request to the server, where the first mainstream fragment request is used to request the first mainstream fragment.
第一主流分片请求中可以包括第一主流分片的标识,例如第一主流分片的时间点,或者第一主流分片的索引等。第一主流分片,可以是该至少两个主流分片中的任意一个主流分片,具体可以是从指示信息所指示的播放起始时刻所对应的主流分片开始至待播放视频包括的最后一个主流分片中的任意一个主流分片。The first mainstream fragment request may include an identifier of the first mainstream fragment, such as a time point of the first mainstream fragment, or an index of the first mainstream fragment. The first mainstream fragment may be any one of the at least two mainstream fragments, which may be, from the mainstream fragment corresponding to the playback start time indicated by the indication information to the last included in the video to be played. Any of the mainstream shards in a mainstream shard.
S12:服务器接收终端发送的第一主流分片请求,并根据第一主流分片请求向终端发送第一主流分片。S12: The server receives the first mainstream fragment request sent by the terminal, and sends the first mainstream fragment to the terminal according to the first mainstream fragment request.
S13:终端接收服务器发送的第一主流分片,并缓存第一主流分片。S13: The terminal receives the first mainstream fragment sent by the server, and caches the first mainstream fragment.
S14:若当前实时网络状况满足预设条件,则终端向服务器发送第一辅流分片请求, 其中,第一辅流分片请求用于请求第一主流分片对应的第一辅流分片。S14: If the current real-time network condition meets the preset condition, the terminal sends a first auxiliary stream fragmentation request to the server, where the first auxiliary stream fragmentation request is used to request the first auxiliary stream fragment corresponding to the first mainstream fragment. .
第一辅流分片请求中可以包括第一辅流分片的标识,例如第一辅流分片的时间点,或者第一辅流分片的索引等。The first auxiliary stream fragmentation request may include an identifier of the first auxiliary stream fragment, such as a time point of the first auxiliary stream fragment, or an index of the first auxiliary stream fragment.
S15:服务器接收终端发送的第一辅流分片请求,并向终端发送第一辅流分片。S15: The server receives the first auxiliary stream fragmentation request sent by the terminal, and sends the first auxiliary stream fragment to the terminal.
S16:终端接收服务器发送的第一辅流分片,并缓存第一辅流分片。S16: The terminal receives the first auxiliary stream fragment sent by the server, and buffers the first auxiliary stream fragment.
S11~S13为获取第一主流分片的过程,S14~S16为获取第一辅流分片的过程;本申请实施例对S11~S13和S14~S16的执行顺序不进行限定,例如,可以先执行S11~S13再执行S14~S16,也可以先执行S14~S16再执行S11~S13,还可以在执行S11~S13的过程中执行S14~S16。也就是说,终端获取一个主流分片的过程和获取该主流分片对应的辅流分片的过程可以不分先后。S11 to S13 are processes for acquiring the first mainstream fragment, and S14 to S16 are processes for acquiring the first auxiliary stream fragment. The execution order of the S11 to S13 and the S14 to S16 is not limited in the embodiment of the present application, for example, S11 to S16 are executed again, and S14 to S16 are executed. S14 to S16 may be executed first, and S11 to S13 may be executed. S14 to S16 may be executed during the execution of S11 to S13. That is to say, the process of obtaining a mainstream fragment by the terminal and the process of acquiring the auxiliary stream fragment corresponding to the mainstream fragment may be in no particular order.
下面说明终端获取多个主流分片和每个主流分片对应的辅流分片的过程。The following describes the process in which the terminal acquires multiple mainstream fragments and auxiliary stream fragments corresponding to each mainstream fragment.
对于终端来说,其一般是按照时间点区分请求各主流分片的先后顺序;并且,可以按照时间点区分请求各辅流分片的先后顺序,也可以不按照时间点区分请求各辅流分片的先后顺序。对于同一个时间点的主流分片和辅流分片(即主流分片和该主流分片对应的辅流分片)的请求顺序,可以不进行限定。For the terminal, it is generally used to distinguish the order of requesting the main stream fragments according to the time point; and, the order of the auxiliary stream fragments may be requested according to the time point, or the auxiliary stream points may not be requested according to the time point. The order of the films. The request sequence of the mainstream fragment and the auxiliary stream fragment (that is, the mainstream fragment and the auxiliary stream fragment corresponding to the mainstream fragment) at the same time point may not be limited.
对于服务器来说,其一般也是按照时间点向终端发送各主流分片,并按照时间向终端发送各辅流分片。对于同一个时间点的主流分片和辅流分片(即主流分片和该主流分片对应的辅流分片)的发送顺序,在本申请实施例中,可以通过设置优先级的方式确定。可选的,服务器和终端可以预先约定好,或者服务器和终端之间通过信令方式约定主流分片和该主流分片对应的辅流分片的优先级。例如,使用HTTP/2的PRIORITY帧设置优先级。例如,终端在向服务器发送主流分片请求和/或辅流分片请求时,携带所请求的主流分片和/或辅流分片的优先级。可选的,考虑到主流分片可以单独播放,而辅流分片需要与主流分片一起才可播放,可以设置主流分片的优先级高于该主流分片对应的辅流分片的优先级,从而保证主流分片可以优先传输,进而保证主流分片的播放连续性;也就是说,服务器在向终端发送一个主流分片之后,才会向其发送该主流分片对应的辅流分片。For the server, it generally sends each mainstream fragment to the terminal according to the time point, and sends each auxiliary stream fragment to the terminal according to time. In the embodiment of the present application, the priority sequence of the mainstream fragment and the auxiliary stream fragment (that is, the mainstream fragment and the auxiliary stream fragment corresponding to the mainstream fragment) may be determined by setting a priority. . Optionally, the server and the terminal may be pre-agreed, or the priority between the mainstream fragment and the auxiliary stream fragment corresponding to the mainstream fragment is agreed by the server and the terminal. For example, use the HTTP/2 PRIORITY frame to set the priority. For example, when the terminal sends a mainstream fragment request and/or a secondary stream fragmentation request to the server, the terminal carries the priority of the requested mainstream fragment and/or the auxiliary stream fragment. Optionally, the mainstream shards can be played separately, and the auxiliary stream shards need to be played together with the mainstream shards. The priority of the mainstream shards is higher than the priority of the auxiliary shards corresponding to the mainstream shards. Level, so as to ensure that the mainstream shards can be transmitted preferentially, so as to ensure the continuity of the mainstream shards; that is, after the server sends a mainstream shard to the terminal, it will send the auxiliary stream corresponding to the mainstream shards. sheet.
基于此,终端获取多个主流分片和每个主流分片对应的辅流分片的过程,如图7所示,具体可以包括如下步骤S21~S24:Based on this, the process of acquiring the multiple mainstream fragments and the auxiliary stream fragments corresponding to each of the mainstream fragments, as shown in FIG. 7, may specifically include the following steps S21 to S24:
S21:终端向服务器获取第i个主流分片,并缓存第i个主流分片。S21: The terminal acquires the i-th main stream fragment from the server, and caches the i-th main stream fragment.
其中,第i个主流分片是指待播放视频的第i个主流分片,i是大于等于1的整数,i的初始值为1,i的最大值为待播放视频中包含的主流分片的数量。The i-th main stream fragment refers to the i-th main stream fragment 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 fragment included in the video to be played. quantity.
S22:终端判断是否请求第i个主流分片对应的辅流分片。S22: The terminal determines whether to request the auxiliary stream fragment corresponding to the i-th mainstream fragment.
若是,则执行步骤S23,若否,则执行步骤S24。If yes, go to step S23, if no, go to step S24.
具体的,终端在检测到当前实时网络状况满足预设条件,且没有缓存第i个辅流分片的情况下,确定需要请求第i个辅流分片;在检测到当前实时网络状况不满足预设条件,或已缓存第i个辅流分片的情况下,确定不需要请求第i个辅流分片。Specifically, the terminal determines that the i-th auxiliary stream fragment needs to be requested when the current real-time network status meets the preset condition and the i-th auxiliary stream fragment is not buffered; In the case of a preset condition, or the i-th auxiliary stream fragment has been cached, it is determined that the i-th auxiliary stream fragment is not required to be requested.
S23:终端获取第i个主流分片对应的辅流分片,并缓存该辅流分片。S23: The terminal acquires the auxiliary stream fragment corresponding to the i-th main stream fragment, and caches the auxiliary stream fragment.
执行步骤S23之后,执行步骤S24。After step S23 is performed, step S24 is performed.
S24:终端判断第i个主流分片是否是待播放的最后一个主流分片。S24: The terminal determines whether the i-th mainstream fragment is the last mainstream fragment to be played.
若是,则结束。若否,则执行i=i+1,并返回步骤S21。If yes, it ends. If not, i=i+1 is executed, and the process returns 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 obtains the last mainstream fragment, before obtaining the auxiliary stream fragment corresponding to the mainstream fragment, the current real-time network status may not be determined whether the preset condition is met. In addition, after performing the foregoing S21 to S24, the terminal has acquired each mainstream fragment to be played, and auxiliary stream fragments corresponding to some or all of the mainstream fragments. Optionally, the method may further include: the terminal acquiring the uncached auxiliary stream fragment corresponding to the unplayed mainstream fragment. For example, if the mainstream shards to be played are sorted according to the time point, the main shards are 1 to 5, and the main shards 1 to 5 are associated with the auxiliary stream shards 1 to 5, then the mainstream shards obtained by the terminal and The sequence of the auxiliary stream fragmentation may be: mainstream fragment 1, auxiliary stream fragment 1, mainstream fragment 2, mainstream fragment 3, mainstream fragment 4, auxiliary stream fragment 4, mainstream fragment 5, auxiliary stream fragmentation. 5. Further, if the video content corresponding to the mainstream fragment 1 is being played at the current playing time, the terminal may further acquire the following auxiliary stream fragments: the auxiliary stream fragment 2 and the auxiliary stream fragment. 3.
需要说明的是,具体实现时,终端在获取每个主流分片之后,若检测到当前实时网络状况满足预设条件,则获取未播放的主流分片对应的未缓存的首个辅流分片,直至获取到最后一个主流分片,接着,再获取未播放的主流分片对应的未缓存的辅流分片。或者,终端可以在获取多个主流分片之后,获取一个或多个未播放的主流分片对应的未缓存的辅流分片等,本申请实施例对此不进行限定。It should be noted that, in the specific implementation, after the terminal obtains each mainstream fragment, if the current real-time network condition meets the preset condition, the terminal acquires the uncached first auxiliary stream fragment corresponding to the unplayed mainstream fragment. Until the last mainstream fragment is obtained, and then the uncached auxiliary stream fragment corresponding to the unplayed mainstream fragment is obtained. Alternatively, the terminal may obtain one or more uncached auxiliary stream fragments corresponding to the unplayed mainstream fragments after acquiring the multiple mainstream fragments, which is not limited in this embodiment of the present application.
S104:终端根据所缓存的分片,播放视频。S104: The terminal plays the video according to the cached slice.
终端在请求到每个分片(包括主流分片和辅流分片)之后,先缓存该分片,并在缓存至一定数量的主流分片之后,开始按照主流分片的时间点依次根据所缓存的主流分片播放待播放视频,以保证播放的连续性。需要说明的是,由于终端向服务器获取到的主流分片和辅流分片是服务器编码后得到的码流,因此,终端在播放之前,还需要对主流分片和辅流分片进行解码。另外,本申请实施例对该一定数量的具体取值以及如何取值不进行限定。After requesting each fragment (including the mainstream fragment and the auxiliary stream fragment), the terminal first caches the fragment, and after buffering to a certain number of mainstream fragments, starts to follow the time points of the mainstream fragment according to the time. The cached mainstream shard plays the video to be played to ensure the continuity of playback. It should be noted that, since the mainstream fragment and the auxiliary stream fragment obtained by the terminal are obtained by the server, the terminal needs to decode the mainstream fragment and the auxiliary stream fragment before playing. In addition, the embodiment of the present application does not limit the specific value and how to determine the value.
可以理解的,对于包含多个主流分片的待播放视频而言,终端可以边获取视频边播放已缓存的视频,但是对于同一个主流分片来说,终端先获取该主流分片,再播放已缓存的该主流分片。It can be understood that, for a video to be played that includes multiple mainstream segments, the terminal can play the cached video while acquiring the video, but for the same mainstream segment, the terminal first acquires the mainstream segment and then plays the video. The mainstream fragment that has been cached.
基于此,终端播放视频的过程,如图8所示,具体可以包括如下步骤S31~S35:Based on this, the process of playing the video by the terminal, as shown in FIG. 8 , may specifically include the following steps S31 to S35:
S31:终端按照主流分片的时间点确定第j个主流分片。其中,第j个主流分片表示终端最近将要播放的主流分片,例如,若终端当前正在播放主流分片1,则终端最近将要播放的主流分片是主流分片2。S31: The terminal determines the jth mainstream fragment according to the time point of the mainstream fragmentation. The jth mainstream fragment indicates the mainstream fragment that the terminal is about to play recently. For example, if the terminal is currently playing the mainstream fragment 1, the mainstream fragment to be played by the terminal is the mainstream fragment 2.
其中,第j个主流分片是指待播放视频的第j个主流分片,j是大于等于1的整数,j的初始值为1,j的最大值为待播放视频中包含的主流分片的数量。The jth mainstream fragment refers to the jth mainstream fragment 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 fragment included in the video to be played. quantity.
S32:终端判断是否缓存了第j个主流分片对应的辅流分片。S32: The terminal determines whether the auxiliary stream fragment corresponding to the jth mainstream fragment is buffered.
若是,则执行步骤S33;若否,则执行步骤S34。If yes, go to step S33; if no, go to step S34.
S33:终端播放第j个主流分片。即,播放第j个主流分片对应的视频内容。S33: The terminal plays the jth mainstream fragment. That is, the video content corresponding to the jth mainstream tile is played.
执行步骤S33之后,执行步骤S35。After step S33 is performed, step S35 is performed.
S34:终端将第j个主流分片和该辅流分片进行叠加并重构,得到合成分片,播放该合成分片。S34: The terminal superimposes and reconstructs the jth mainstream fragment and the auxiliary stream fragment to obtain a composite fragment, and plays the composite fragment.
执行步骤S34之后,执行步骤S35。After step S34 is performed, step S35 is performed.
可以理解的,步骤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 combined component played in step S34, except that the code rates of the two are different, and thus the playback quality is different.
主流分片与叠加辅流分片并重构是重构视频编码的关键步骤。由于编码服务器在对视频内容进行编码,生成主流分片的过程中,会进行降码率处理,例如将4K的视频流进行降码率,生成2K的视频流。因此,终端对主流分片解码后得到的图像帧的分辨率较低。一般地,终端在对主流分片解码之后,会对解码得到的图像进行超分辨率处理,重新将码率提升至4K;但是,提升过程中,相比原始的4K的视频流的时频质量会下降,因此可以利用辅编码流进行修正,例如补充丢失的细节,修正编码过程中引入的误差等。Mainstream fragmentation and superposition auxiliary stream segmentation and reconstruction are the key steps in reconstructing video coding. Since the encoding server encodes the video content and generates the mainstream fragment, the code rate processing is performed, for example, the 4K video stream is subjected to a down-coding rate to generate a 2K video stream. Therefore, the resolution of the image frame obtained by the terminal after decoding the mainstream slice is low. Generally, after decoding the mainstream slice, the terminal performs super-resolution processing on the decoded image to re-rate the code rate to 4K; however, during the promotion process, the time-frequency quality of the original 4K video stream is compared. It will fall, so it can be corrected with the auxiliary code stream, such as replenishing the missing details, correcting the errors introduced during the encoding process, and so on.
S35:终端判断第j个主流分片是否是待播放的最后一个主流分片。S35: The terminal determines whether the jth mainstream fragment is the last mainstream fragment to be played.
若是,则结束。若否,则执行i=i+1,并返回步骤S31。If yes, it ends. If not, i=i+1 is executed, and the process returns to step S31.
例如,假设待播放视频包括10个主流分片,每个主流分片对应一个辅流分片,当前播放时刻所指示的主流分片为第5个主流分片,已缓存第6~10个主流分片,以及第6~7个辅流分片,则一种可能的情况为:依次播放合成分片6、合成分片7,第8~10个主流分片。其中,合成分片6是第6个主流分片和第6个辅流分片叠加并重构后得到的合成分片,合成分片7是第7个主流分片和第7个辅流分片叠加并重构后得到的合成分片。For example, suppose that the video to be played includes 10 mainstream fragments, and each mainstream fragment corresponds to one auxiliary stream fragment. The mainstream fragment indicated by the current playback time is the fifth mainstream fragment, and the sixth to ten mainstream streams are cached. Fragmentation, and 6th to 7th auxiliary stream segmentation, a possible case is: playing the synthesized slice 6, the synthesized slice 7, and the 8th to 10th mainstream segments in sequence. The composite slice 6 is a composite slice obtained by superimposing and reconstructing the sixth mainstream slice and the sixth auxiliary stream slice, and the composite slice 7 is the seventh mainstream slice and the seventh auxiliary stream segment. The composite fragments 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 mainstream fragment, and requests the auxiliary stream fragmentation as needed; wherein the auxiliary stream fragment is used to improve the code rate of the mainstream fragment. In the embodiment of the present application, the primary encoded stream can be played separately, or the primary encoded stream and the secondary encoded stream are superimposed and reconstructed, so the buffered primary encoded stream does not lose its role due to buffering the secondary encoded stream. Compared with the prior art, it is possible to save transmission resources and cache resources.
可以理解的,终端与服务器之间可以建立一条或多条链路,在本申请实施例中,主流分片与辅流分片可以在独立的两条链路上传输,也可以在同一条链路上传输。若在同一条链路上传输,终端和服务器均只需要维护这一条链路即可,因此实现简单。示例的,这里的链路可以是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 this embodiment, the mainstream fragment and the auxiliary stream fragment can be transmitted on two independent links or in the same chain. Transfer on the road. If the transmission is on the same link, both the terminal and the server need only maintain this link, so the implementation is simple. By way of example, the link here can be an HTTP/2 link. That is, when the terminal sends the primary fragment request and the secondary stream fragment request, the same HTTP/2 link is used, that is, the mainstream fragment and the auxiliary stream fragment use different HTTP/2 frames, and the two streams are multiplexed. Go to the same HTTP/2 link.
上述S11~S16提供了获取第一主流分片和第一辅流分片的过程。在该过程中,还可以设置中断请求,以中断辅流分片的传输流程。如图9所示,具体可以包括以下步骤S41~S47。其中,为了与第一主流分片进行区分,下面使用第二主流分片为例进行说明。可以理解的,第二主流分片具有任意性,即终端可以中断待播放时频中的任一个辅流分片的传输流程。The foregoing S11 to S16 provide a process of acquiring the first mainstream fragment and the first auxiliary stream fragment. In the process, an interrupt request can also be set to interrupt the transmission process of the auxiliary stream fragment. As shown in FIG. 9, specifically, the following steps S41 to S47 may be included. In order to distinguish from the first mainstream fragment, the second mainstream fragment is used as an example for description. It can be understood that the second mainstream fragment is arbitrarily, that is, the terminal can interrupt the transmission process of any one of the auxiliary stream fragments in the time-frequency to be played.
S41:终端向服务器发送第二主流分片请求,其中,第二主流分片请求用于请求第二主流分片,第二主流分片是至少两个主流分片中的除第一主流分片之外的一个主流分片。S41: The terminal sends a second mainstream fragment request to the server, where the second mainstream fragment request is used to request the second mainstream fragment, and the second mainstream fragment is the first mainstream fragment in the at least two mainstream fragments. A mainstream shard outside.
S42:服务器接收终端发送的第二主流分片请求,并根据第二主流分片请求向服务器发送第二主流分片。S42: The server receives the second mainstream fragmentation request sent by the terminal, and sends a second mainstream fragment to the server according to the second mainstream fragmentation request.
S43:终端接收服务器发送的第二主流分片,并缓存第二主流分片。S43: The terminal receives the second mainstream fragment sent by the server, and caches the second mainstream fragment.
S44:若当前实时网络状况满足预设条件,则终端向服务器发送第二辅流分片请求,其中,第二辅流分片请求用于请求第二主流分片对应的第二辅流分片。S44: If the current real-time network condition meets the preset condition, the terminal sends a second auxiliary stream fragmentation request to the server, where the second auxiliary stream fragmentation request is used to request the second auxiliary stream fragment corresponding to the second mainstream fragment. .
其中,S41~S44的具体实现方式可以参考上文中的S11~S14。For specific implementation manners of S41 to S44, refer to S11 to S14 in the foregoing.
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 fragmentation request to the server, and before receiving the second auxiliary stream fragmentation, the terminal sends an interrupt request to the server, where the interrupt request is sent. Used to request the transmission process of interrupting the second auxiliary stream segmentation.
由于终端可以实时检测当前网络状况,因此,若终端在向服务器发送第二辅流分片请求之后且接收到第二辅流分片之前,终端检测到当前实时网络状况不满足预设条件,说明此时网络状况较差,若服务器向终端发送第二辅流分片,则可能需要很长时间,从而导致终端播放视频的过程中出现卡顿等,基于此,本申请实施例提供了终端发送中断请求的技术方案。其中,该终端请求可以是HTTP/2中的RST_STREM帧,也可以是一种新的帧,或者是其他的帧,本申请实施例对此不进行限定。The terminal can detect the current network status in real time. Therefore, if the terminal sends the second auxiliary stream fragmentation request to the server and receives the second auxiliary stream fragment, the terminal detects that the current real-time network status does not meet the preset condition. In this case, the network is in a bad condition. If the server sends the second auxiliary stream fragment to the terminal, it may take a long time, which may cause the terminal to play a video in the process of playing the video. The technical solution for interrupting the request. The terminal request may be an RST_STREM frame in the HTTP/2, or may be a new frame, or another frame, 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 meets the preset condition after sending the second auxiliary stream fragmentation request to the server and before receiving the second auxiliary stream fragmentation, the terminal does not send an interrupt request to the server, that is, The server will not receive an interrupt request. In this case, the server sends a second secondary stream fragmentation request to the terminal, and the terminal receives the second auxiliary stream fragment and caches the second auxiliary stream fragment.
S47:服务器接收终端发送的中断请求,并在确定还未向终端发送第二辅流分片的情况下,根据中断请求中断第二辅流分片的传输流程。S47: The server receives the interrupt request sent by the terminal, and if it is determined that the second auxiliary stream fragment has not been sent to the terminal, interrupts the transmission process of the second auxiliary stream fragment according to the interrupt request.
具体的,服务器在接收到中断请求之后,可以不响应第二辅流分片请求消息,即不向终端发送第二辅流分片。若服务器在接收到终端发送的中断请求时,已经向终端发送了第二辅流分片,则服务器可以丢弃该中断请求。Specifically, after receiving the interrupt request, the server may not respond to the second auxiliary stream fragmentation request message, that is, the second auxiliary stream fragment is not sent to the terminal. If the server has sent the second auxiliary stream fragment to the terminal when receiving the interrupt request sent by the terminal, the server may discard the interrupt request.
可以理解的,在执行S41~S47之后,终端可能接收不到服务器发送的第二辅流分片,但是终端已获取到了第二主流分片,因此,终端可以继续向服务器请求第二主流分片的下一个主流分片。It can be understood that after performing S41-S47, the terminal may not receive the second auxiliary stream fragment sent by the server, but the terminal has acquired the second mainstream fragment, and therefore, the terminal may continue to request the second mainstream fragment from the server. The next mainstream shard.
本实施例提供的技术方案,终端在已向服务器发送辅流分片请求之后且未接收到所请求的辅流分片之前,若检测到当前实时网络状况不满足预设条件,可以触发中断所请求的辅流分片的传输流程。这样,能够在一定程度上减少终端获取该辅流分片对应的主流分片的下一个主流分片,从而有效较少终端播放视频的过程中出现卡顿的现象的发生。In the technical solution provided by the embodiment, after the terminal sends the auxiliary stream fragmentation request to the server and does not receive the requested auxiliary stream fragment, if the current real-time network status does not meet the preset condition, the terminal may trigger the interruption. The transmission process of the requested auxiliary stream fragment. In this way, the terminal can obtain the next mainstream fragment of the mainstream fragment corresponding to the auxiliary stream fragment to a certain extent, thereby effectively reducing the occurrence of a stuck phenomenon in the process of playing the video by the terminal.
上述主要从各个网元之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,各个网元,例如终端或者服务器。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The solution provided by the embodiment of the present application is mainly introduced from the perspective of interaction between the network elements. It can be understood that each network element, such as a terminal or a server. In order to implement the above functions, it includes hardware structures and/or software modules corresponding to the execution of the respective functions. Those skilled in the art will readily appreciate that the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
本申请实施例可以根据上述方法示例对终端或者服务器进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide a function module into a terminal or a server according to the foregoing method. For example, each function module may be divided according to each function, or two or more functions may be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
比如,在采用对应各个功能划分各个功能模块的情况下,图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 by using corresponding functions, FIG. 10 shows a possible structural diagram of the terminal 100 involved in the above embodiment. The terminal 100 includes a transmitting unit 1401 and a receiving unit 1402. Optionally, the method further includes: a reconstruction unit 1403 and a playback unit 1404. The transmitting unit 1401 may be configured to perform actions performed by the terminal in S11 and S14 in FIG. 6, actions performed by the terminal in S41 and S46 in FIG. 9, and/or other processes for supporting the techniques described herein. The receiving unit may be used to perform actions performed by the terminal in S12 and S15 in FIG. 6, actions performed by the terminal in S42 in FIG. 9, and/or other processes for supporting the techniques described herein. Reconstruction unit 1403 can be used to perform the actions reconstructed in S34 of Figure 8, and/or other processes for supporting the techniques described herein. Play unit 1404 can be used to perform the actions played in S34 of Figure 8, and/or other processes for supporting the techniques described herein.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
在本申请实施例中,该终端对应各个功能划分各个功能模块的形式来呈现,或者,该策略实体以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定应用集成电路(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 a form corresponding to each function to divide each functional module, or the policy entity is presented in a form of dividing each functional module in an integrated manner. A "module" herein may refer to an Application-Specific Integrated Circuit (ASIC), a processor and memory that executes one or more software or firmware programs, integrated logic circuits, and/or other devices that provide the above functionality. . In a simple embodiment, those skilled in the art will appreciate that the terminal can take the form shown in FIG. For example, the sending unit 1401 provided above may be a transmitter, the receiving unit 1402 may be a receiver, and the transmitter may form a transceiver together with the receiver, which may specifically be the communication interface 1301 in FIG. In addition, the reconstruction unit 1403 may be embedded in the hardware or in a processor independent of the terminal (such as the processor 1302 in FIG. 4), or may be stored in the memory of the terminal in the form of software (such as the memory 1303 in FIG. 4). )in. Play unit 1404 can be player 1305 and/or display 1306 in FIG.
由于本申请实施例提供的终端可用于执行上述视频传输方法,因此其所能获得的技术效果可参考上述方法实施例,本申请实施例在此不再赘述。The terminal provided by the embodiment of the present application can be used to perform the above-mentioned video transmission method. Therefore, the technical effects of the present invention can be referred to the foregoing method embodiments.
比如,在采用对应各个功能划分各个功能模块的情况下,图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 by corresponding functions, 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 transmitting unit 1502. Optionally, the method further includes: an interrupting unit 1503. The receiving unit 1501 may be configured 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 techniques described herein. The transmitting 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 techniques described herein. Interrupt unit 1503 can be used to perform the actions of S47 in Figure 9, and/or other processes for supporting the techniques described herein.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
在本申请实施例中,该服务器对应各个功能划分各个功能模块的形式来呈现,或者,该服务器以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定ASIC电路,执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。在一个简单的实施例中,本领域的技术人员可以想到该终端可以通过图3所示的形式。比如,上文提供的发送单元1502可以是发送器,接收单元1501可以是接收器,发送器可以与接收器一起构成收发器,其具体可以是图3中的通信接口1201。另外,中断单元1503可以以硬件形式内嵌于或独立于终端的处理器(如 图3中的处理器1202)中,也可以以软件形式存储于终端的存储器(如图3中的存储器1203)中。In the embodiment of the present application, the server is presented in a form corresponding to each functional module, or the server is presented in a form of dividing each functional module in an integrated manner. A "module" herein may refer to a particular ASIC circuit, a processor and memory that executes one or more software or firmware programs, integrated logic circuitry, and/or other devices that can provide the functionality described above. In a simple embodiment, those skilled in the art will appreciate that the terminal can take the form shown in FIG. For example, the sending unit 1502 provided above may be a transmitter, the receiving unit 1501 may be a receiver, and the transmitter may form a transceiver together with the receiver, which may specifically be the communication interface 1201 in FIG. In addition, the interrupting unit 1503 may be embedded in hardware or in a processor independent of the terminal (such as the processor 1202 in FIG. 3), or may be stored in software in the memory of the terminal (such as the memory 1203 in FIG. 3). in.
由于本申请实施例提供的终端可用于执行上述视频传输方法,因此其所能获得的技术效果可参考上述方法实施例,本申请实施例在此不再赘述。The terminal provided by the embodiment of the present application can be used to perform the above-mentioned video transmission method. Therefore, the technical effects of the present invention can be referred to the foregoing method embodiments.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part 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 a computer, the processes or functions described in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transmission to another website site, computer, server or data center via wired (eg coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device that includes one or more servers, data centers, etc. that can be integrated with the media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)) or the like.
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present application has been described herein in connection with the various embodiments, those skilled in the art can Other variations of the disclosed embodiments are achieved. 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 several of the functions recited in the claims. Certain measures are recited in mutually different dependent claims, but this does not mean that the measures are not combined to produce a good effect.
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。While the present invention has been described in connection with the specific embodiments and embodiments thereof, various modifications and combinations can be made without departing from the spirit and scope of the application. Accordingly, the description and drawings are to be regarded as It will be apparent to those skilled in the art that various modifications and changes can be made in the present application without departing from the spirit and scope of the application. Thus, it is intended that the present invention cover the modifications and variations of the present invention.
Claims (22)
- 一种视频传输方法,其特征在于,所述视频包括主编码流和辅编码流,所述辅编码流用于提高所述主编码流的码率,所述主编码流包括至少两个主流分片,所述辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应;所述方法包括:A video transmission method, wherein the video includes a primary encoded stream and a secondary encoded stream, where the secondary encoded stream is used to increase a code rate of the primary encoded stream, and the primary encoded stream includes at least two mainstream fragments. The secondary encoded stream includes at least two auxiliary stream fragments, and each mainstream fragment corresponds to one auxiliary stream fragment; the method includes:向服务器发送第一主流分片请求,其中,所述第一主流分片请求用于请求第一主流分片,所述第一主流分片是所述至少两个主流分片中的一个主流分片;Sending a first mainstream fragment request to the server, where the first mainstream fragment request is used to request a first mainstream fragment, and the first mainstream fragment is a mainstream part of the at least two mainstream fragments. sheet;接收所述服务器发送的所述第一主流分片;Receiving the first mainstream fragment sent by the server;若当前实时网络状况满足预设条件,则向所述服务器发送第一辅流分片请求,其中,所述第一辅流分片请求用于请求所述第一主流分片对应的第一辅流分片;Sending a first auxiliary stream fragmentation request to the server, where the current real-time network status meets a preset condition, where the first auxiliary stream fragmentation request is used to request the first auxiliary corresponding to the first mainstream fragment Flow segmentation接收所述服务器发送的所述第一辅流分片。Receiving the first auxiliary stream fragment sent by the server.
- 根据权利要求1所述的方法,其特征在于,The method of claim 1 wherein所述接收所述服务器发送的所述第一主流分片,包括:Receiving the first mainstream fragment sent by the server, including:在一链路上接收所述服务器发送的所述第一主流分片;Receiving, by using a link, the first mainstream fragment sent by the server;所述接收所述服务器发送的所述第一辅流分片,包括:Receiving the first auxiliary stream fragment sent by the server, including:在所述链路上接收所述服务器发送的所述第一辅流分片。Receiving, on the link, the first auxiliary stream fragment sent by the server.
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:向所述服务器发送第二主流分片请求,其中,所述第二主流分片请求用于请求第二主流分片,所述第二主流分片是所述至少两个主流分片中的除所述第一主流分片之外的一个主流分片;And sending, by the server, a second mainstream fragment request, where the second mainstream fragment request is used to request a second mainstream fragment, where the second mainstream fragment is divided by the at least two mainstream fragments. a mainstream slice other than the first mainstream slice;接收所述服务器发送的所述第二主流分片;Receiving the second mainstream fragment sent by the server;若当前实时网络状况满足所述预设条件,则向所述服务器发送第二辅流分片请求,其中,所述第二辅流分片请求用于请求所述第二主流分片对应的第二辅流分片;Sending a second auxiliary stream fragmentation request to the server, where the current real-time network status meets the preset condition, where the second auxiliary stream fragmentation request is used to request the corresponding part of the second mainstream fragment Second auxiliary stream segmentation;若在向所述服务器发送所述第二辅流分片请求之后且接收到所述第二辅流分片之前,检测到当前实时网络状况不满足所述预设条件,则向所述服务器发送中断请求,其中,所述中断请求用于请求中断所述第二辅流分片的传输流程。Sending to the server after detecting that the current real-time network condition does not satisfy the preset condition after sending the second auxiliary stream fragmentation request to the server and before receiving the second auxiliary stream fragmentation An interrupt request, wherein the interrupt request is used to request to interrupt a transmission process of the second auxiliary stream fragment.
- 根据权利要求3所述的方法,其特征在于,所述中断请求包括:HTTP/2中的RST_STREM帧。The method of claim 3, wherein the interrupt request comprises: an RST_STREM frame in HTTP/2.
- 根据权利要求1至3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:将所述第一主流分片和所述第一辅流分片叠加并重构,播放重构后生成的码流。And superimposing and reconstructing the first mainstream fragment and the first auxiliary stream fragment, and playing the reconstructed code stream.
- 一种视频传输方法,其特征在于,所述视频包括主编码流和辅编码流,所述主编码流包括至少两个主流分片,所述辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应;所述方法包括:A video transmission method, wherein the video includes a primary encoded stream and a secondary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each The primary fragment corresponds to one auxiliary stream fragment; the method includes:接收终端发送的第一主流分片请求,其中,所述第一主流分片请求用于请求第一主流分片,所述第一主流分片是所述至少两个主流分片中的一个主流分片;Receiving, by the terminal, a first mainstream fragment request, where the first mainstream fragment request is used to request a first mainstream fragment, and the first mainstream fragment is one of the at least two mainstream fragments. Fragmentation;向所述终端发送所述第一主流分片;Sending the first mainstream fragment to the terminal;接收所述终端发送的第一辅流分片请求,其中,所述第一辅流分片请求用于请求所述第一主流分片对应的第一辅流分片;所述第一辅流分片请求是所述终端在当前网络状况满足预设条件的情况下发送的;Receiving a first auxiliary stream fragmentation request sent by the terminal, where the first auxiliary stream fragmentation request is used to request a first auxiliary stream fragment corresponding to the first mainstream fragment; the first auxiliary stream The fragmentation request is sent by the terminal if the current network condition satisfies a preset condition;向所述终端发送所述第一辅流分片。Sending the first auxiliary stream fragment to the terminal.
- 根据权利要求6所述的方法,其特征在于,The method of claim 6 wherein:所述向所述终端发送所述第一主流分片,包括:The sending the first mainstream fragment to the terminal includes:在一链路上向所述终端发送所述第一主流分片;Transmitting the first mainstream fragment to the terminal on a link;所述向所述终端发送所述第一辅流分片,包括:The sending the first auxiliary stream fragment to the terminal includes:在所述链路上向所述终端发送所述第一辅流分片。Transmitting the first auxiliary stream fragment to the terminal on the link.
- 根据权利要求6或7所述的方法,其特征在于,主流分片的优先级高于该主流分片对应的辅流分片的优先级;所述向所述终端发送所述第一辅流分片,包括:The method according to claim 6 or 7, wherein the priority of the mainstream fragment is higher than the priority of the auxiliary stream fragment corresponding to the mainstream fragment; and the sending the first auxiliary stream to the terminal Fragmentation, including:若确定已向所述终端发送所述第一主流分片,则向所述终端发送所述第一辅流分片。And if it is determined that the first mainstream fragment is sent to the terminal, sending the first auxiliary stream fragment to the terminal.
- 根据权利要求6至8任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 6 to 8, wherein the method further comprises:接收所述终端发送的第二主流分片请求,其中,所述第二主流分片请求用于请求第二主流分片,所述第二主流分片是所述至少两个主流分片中的除所述第一主流分片之外的一个主流分片;Receiving a second mainstream fragment request sent by the terminal, where the second mainstream fragment request is used to request a second mainstream fragment, and the second mainstream fragment is in the at least two mainstream fragments. a mainstream slice other than the first mainstream slice;向所述终端发送所述第二主流分片;Sending the second mainstream fragment to the terminal;接收所述终端发送的第二辅流分片请求,其中,所述第二辅流分片请求用于请求所述第二主流分片对应的第二辅流分片;Receiving 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 mainstream fragment;若在向所述终端发送所述第二辅流分片请求之前,接收到所述终端发送的中断请求,则中断所述第二辅流分片的传输流程。If the interrupt request sent by the terminal is received before the second auxiliary stream fragmentation request is sent to the terminal, the transmission process of the second auxiliary stream fragment is interrupted.
- 根据权利要求9所述的方法,其特征在于,所述中断请求包括:HTTP/2中的RST_STREM帧。The method of claim 9, wherein the interrupt request comprises: an RST_STREM frame in HTTP/2.
- 一种终端,其特征在于,视频包括主编码流和辅编码流,所述辅编码流用于提高所述主编码流的码率,所述主编码流包括至少两个主流分片,所述辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应;所述终端包括:发送单元和接收单元;A terminal, wherein the video includes a primary encoded stream and a secondary encoded stream, where the secondary encoded stream is used to increase a code rate of the primary encoded stream, and the primary encoded stream includes at least two mainstream fragments, the secondary The encoded stream includes at least two auxiliary stream fragments, each mainstream fragment corresponding to one auxiliary stream fragment; the terminal includes: a sending unit and a receiving unit;所述发送单元,用于向服务器发送第一主流分片请求,其中,所述第一主流分片请求用于请求第一主流分片,所述第一主流分片是所述至少两个主流分片中的一个主流分片;The sending unit is configured to send a first mainstream fragment request to the server, where the first mainstream fragment request is used to request a first mainstream fragment, and the first mainstream fragment is the at least two mainstream a mainstream slice in the slice;所述接收单元,用于接收所述服务器发送的所述第一主流分片;The receiving unit is configured to receive the first mainstream fragment sent by the server;所述发送单元还用于,若当前实时网络状况满足预设条件,则向所述服务器发送第一辅流分片请求,其中,所述第一辅流分片请求用于请求所述第一主流分片对应的第一辅流分片;The sending unit is further configured to send a first auxiliary stream fragmentation request to the server, if the current real-time network status meets a preset condition, where the first auxiliary stream fragment request is used to request the first The first auxiliary stream segment corresponding to the mainstream segment;所述接收单元还用于,接收所述服务器发送的所述第一辅流分片。The receiving unit is further configured to receive the first auxiliary stream fragment sent by the server.
- 根据权利要求11所述的终端,其特征在于,The terminal of claim 11 wherein:所述接收单元具体用于,在一链路上接收所述服务器发送的所述第一主流分片;在所述链路上接收所述服务器发送的所述第一辅流分片。The receiving unit is configured to receive the first mainstream fragment sent by the server on a link, and receive the first auxiliary stream fragment sent by the server on the link.
- 根据权利要求11或12所述的终端,其特征在于,A terminal according to claim 11 or 12, characterized in that所述发送单元还用于,向所述服务器发送第二主流分片请求,其中,所述第二主流分片请求用于请求第二主流分片,所述第二主流分片是所述至少两个主流分片中的除所述第一主流分片之外的一个主流分片;The sending unit is further configured to send a second mainstream fragment request to the server, where the second mainstream fragment request is used to request a second mainstream fragment, and the second mainstream fragment is the at least a mainstream slice other than the first mainstream slice in the two mainstream fragments;所述接收单元还用于,接收所述服务器发送的所述第二主流分片;The receiving unit is further configured to receive the second mainstream fragment sent by the server;所述发送单元还用于,若当前实时网络状况满足所述预设条件,则向所述服务器发送第二辅流分片请求,其中,所述第二辅流分片请求用于请求所述第二主流分片对应的第二辅流分片;The sending unit is further configured to: if the current real-time network condition meets the preset condition, send a second auxiliary stream fragmentation request to the server, where the second auxiliary stream fragmentation request is used to request the a second auxiliary stream segment corresponding to the second mainstream slice;所述发送单元还用于,若在向所述服务器发送所述第二辅流分片请求之后且接收到所述第二辅流分片之前,检测到当前实时网络状况不满足所述预设条件,则向所述服务器发送中断请求,其中,所述中断请求用于请求中断所述第二辅流分片的传输流程。The sending unit is further configured to: if the current real-time network condition does not satisfy the preset after sending the second auxiliary stream fragmentation request to the server and before receiving the second auxiliary stream fragmentation And sending an interrupt request to the server, where the interrupt request is used to request to interrupt the transmission process of the second auxiliary stream segment.
- 根据权利要求13所述的终端,其特征在于,所述中断请求包括:HTTP/2中的RST_STREM帧。The terminal according to claim 13, wherein the interrupt request comprises: an RST_STREM frame in HTTP/2.
- 根据权利要求11至14任一项所述的终端,其特征在于,所述终端还包括:The terminal according to any one of claims 11 to 14, wherein the terminal further comprises:重构单元,用于将所述第一主流分片和所述第一辅流分片叠加并重构;a reconstruction unit, configured to superimpose and reconstruct the first mainstream segment and the first auxiliary stream segment;播放单元,用于播放重构后生成的码流。The playing unit is configured to play the code stream generated after the reconstruction.
- 一种服务器,其特征在于,视频包括主编码流和辅编码流,所述主编码流包括至少两个主流分片,所述辅编码流包括至少两个辅流分片,每个主流分片与一个辅流分片对应;所述服务器包括:接收单元和发送单元;A server, wherein the video includes a primary encoded stream and a secondary encoded stream, the primary encoded stream includes at least two mainstream fragments, and the secondary encoded stream includes at least two auxiliary stream fragments, each mainstream fragment Corresponding to one auxiliary stream segment; the server includes: a receiving unit and a sending unit;所述接收单元,用于接收终端发送的第一主流分片请求,其中,所述第一主流分片请求用于请求第一主流分片,所述第一主流分片是所述至少两个主流分片中的一个主流分片;The receiving unit is configured to receive a first mainstream fragment request sent by the terminal, where the first mainstream fragment request is used to request a first mainstream fragment, and the first mainstream fragment is the at least two a mainstream segment in the mainstream segment;所述发送单元,用于向所述终端发送所述第一主流分片;The sending unit is configured to send the first mainstream fragment to the terminal;所述接收单元还用于,接收所述终端发送的第一辅流分片请求,其中,所述第一辅流分片请求用于请求所述第一主流分片对应的第一辅流分片;所述第一辅流分片请求是所述终端在当前网络状况满足预设条件的情况下发送的;The receiving unit is further configured to receive a first auxiliary stream fragmentation request sent by the terminal, where the first auxiliary stream fragmentation request is used to request a first auxiliary stream corresponding to the first mainstream fragment The first auxiliary stream fragmentation request is sent by the terminal if the current network condition meets a preset condition;所述发送单元还用于,向所述终端发送所述第一辅流分片。The sending unit is further configured to send the first auxiliary stream fragment to the terminal.
- 根据权利要求16所述的服务器,其特征在于,A server according to claim 16 wherein:所述发送单元具体用于:在一链路上向所述终端发送所述第一主流分片;在所述链路上向所述终端发送所述第一辅流分片。The sending unit is specifically configured to: send the first mainstream fragment to the terminal on a link; and send the first auxiliary stream fragment to the terminal on the link.
- 根据权利要求16或17所述的服务器,其特征在于,主流分片的优先级高于该主流分片对应的辅流分片的优先级;The server according to claim 16 or 17, wherein the priority of the mainstream fragment is higher than the priority of the auxiliary stream fragment corresponding to the mainstream fragment;所述发送单元具体用于:若确定已向所述终端发送所述第一主流分片,则向所述终端发送所述第一辅流分片。The sending unit is specifically configured to: if it is determined that the first mainstream fragment is sent to the terminal, send the first auxiliary stream fragment to the terminal.
- 根据权利要求16至18任一项所述的服务器,其特征在于,A server according to any one of claims 16 to 18, characterized in that所述接收单元还用于,接收所述终端发送的第二主流分片请求,其中,所述第二主流分片请求用于请求第二主流分片,所述第二主流分片是所述至少两个主流分片中的除所述第一主流分片之外的一个主流分片;The receiving unit is further configured to receive a second mainstream fragment request sent by the terminal, where the second mainstream fragment request is used to request a second mainstream fragment, and the second mainstream fragment is the a mainstream slice other than the first mainstream slice in at least two mainstream fragments;所述发送单元还用于,向所述终端发送所述第二主流分片;The sending unit is further configured to send the second mainstream fragment 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 corresponding to the second mainstream fragment sheet;所述接收单元还用于,接收所述终端发送的中断请求;The receiving unit is further configured to receive an interrupt request sent by the terminal;所述服务器还包括:The server further includes:中断单元,用于若在所述发送单元向所述终端发送所述第二辅流分片请求之前,所述 接收单元接收到所述终端发送的所述中断请求,则中断所述第二辅流分片的传输流程。An interruption unit, configured to: if the receiving unit receives the interrupt request sent by the terminal before the sending unit sends the second auxiliary stream fragmentation request to the terminal, interrupting the second auxiliary The flow of stream fragmentation.
- 根据权利要求19所述的服务器,其特征在于,所述中断请求包括:HTTP/2中的RST_STREM帧。The server according to claim 19, wherein said interrupt request comprises: an RST_STREM frame in HTTP/2.
- 一种终端,其特征在于,包括:处理器、存储器、通信总线和通信接口;A terminal, comprising: a processor, a memory, a communication bus, and a communication interface;所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述通信总线连接,当所述终端运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述终端执行如权利要求1-5中任一项所述的视频传输方法。The memory is configured to store a computer to execute an instruction, the processor is connected to the memory through the communication bus, and when the terminal is running, the processor executes the computer-executed instruction stored in the memory, so that The terminal performs the video transmission method according to any one of claims 1-5.
- 一种服务器,其特征在于,包括:处理器、存储器、通信总线和通信接口;A server, comprising: a processor, a memory, a communication bus, and a communication interface;所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述通信总线连接,当所述服务器运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述服务器执行如权利要求6-10中任一项所述的视频传输方法。The memory is configured to store a computer to execute instructions, the processor is coupled to the memory via the communication bus, and when the server is running, the processor executes the computer-executed instructions stored by the memory to enable The server performs the video transmission method according to any one of claims 6-10.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710140922.6A CN108574882B (en) | 2017-03-08 | 2017-03-08 | A video transmission method and device |
CN201710140922.6 | 2017-03-08 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018161790A1 true WO2018161790A1 (en) | 2018-09-13 |
Family
ID=63448047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/076526 WO2018161790A1 (en) | 2017-03-08 | 2018-02-12 | Video transmission method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108574882B (en) |
WO (1) | WO2018161790A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110072130B (en) * | 2019-04-11 | 2020-06-02 | 西安交通大学 | A HAS video slice push method 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 |
Also Published As
Publication number | Publication date |
---|---|
CN108574882B (en) | 2019-11-12 |
CN108574882A (en) | 2018-09-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11622134B2 (en) | System and method for low-latency content streaming | |
CN110784740A (en) | Video processing method, device, server and readable storage medium | |
WO2016131223A1 (en) | Frame loss method for video frame and video sending apparatus | |
WO2018133601A1 (en) | Streaming media transmission method and apparatus, server, and terminal | |
WO2017095885A1 (en) | Method and apparatus for transmitting video data | |
CN110830460B (en) | Connection establishing method and device, electronic equipment and storage medium | |
US10476928B2 (en) | Network video playback method and apparatus | |
CN111447455A (en) | Live video stream playback processing method, device and computing device | |
TWI637631B (en) | Image processing device, video subsystem and video pipeline | |
US10863179B1 (en) | Overlapped rate control for high-quality segmented video encoding | |
CN102006501A (en) | Streaming media play control method and device and streaming media player | |
US20140226711A1 (en) | System and method for self-adaptive streaming of multimedia content | |
CN107592551A (en) | Method and apparatus for cloud stream service | |
JP2018509060A (en) | Method and apparatus for converting MMTP stream to MPEG-2 TS | |
WO2021143360A1 (en) | Resource transmission method and computer device | |
CN110855645B (en) | Streaming media data playing method and device | |
WO2023226915A1 (en) | Video transmission method and system, device, and storage medium | |
CN114900698A (en) | Forward error correction-based video transmission method, apparatus and computer storage medium | |
CN105898625B (en) | Playing processing method and terminal equipment | |
US10893303B1 (en) | Streaming chunked media segments | |
CN115767149A (en) | Video data transmission method and device | |
WO2018161790A1 (en) | Video transmission method and device | |
CN113079386B (en) | Online video playback method, device, electronic equipment and storage medium | |
CN108702542A (en) | Client operation method for streaming service | |
CN105519121B (en) | A key frame routing method and media server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18763041 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18763041 Country of ref document: EP Kind code of ref document: A1 |