CN107147916B - Method for transmitting H.265 coding video data on transmission layer - Google Patents

Method for transmitting H.265 coding video data on transmission layer Download PDF

Info

Publication number
CN107147916B
CN107147916B CN201710431382.7A CN201710431382A CN107147916B CN 107147916 B CN107147916 B CN 107147916B CN 201710431382 A CN201710431382 A CN 201710431382A CN 107147916 B CN107147916 B CN 107147916B
Authority
CN
China
Prior art keywords
protocol
rtmp
http
video data
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710431382.7A
Other languages
Chinese (zh)
Other versions
CN107147916A (en
Inventor
高扬
杨爱芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Snail Digital Technology Co Ltd
Original Assignee
Suzhou Snail Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Snail Digital Technology Co Ltd filed Critical Suzhou Snail Digital Technology Co Ltd
Priority to CN201710431382.7A priority Critical patent/CN107147916B/en
Publication of CN107147916A publication Critical patent/CN107147916A/en
Application granted granted Critical
Publication of CN107147916B publication Critical patent/CN107147916B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

A method of transmitting h.265 encoded video data on a transport layer comprising the steps of h.265 encoding a live video; modifying the codecID field and metadata information of the header of the RTMP or HTTP-FLV protocol, and modifying the data structure of the RTMP protocol or HTTP-FLV protocol; the modified RTMP or HTTP-FLV protocol is adopted to transmit H.265 coded video data; and selecting an H.265 decoder for decoding and video playing. The method for transmitting H.265 coded video data on the transmission layer uses the H.265 coding mode to reduce the code rate on the premise of ensuring that the image quality is not changed, thereby being capable of transmitting the video data with high image quality under the condition of not consuming high bandwidth resources.

Description

Method for transmitting H.265 coding video data on transmission layer
Technical Field
The invention relates to the technical field of video data transmission, in particular to a method for transmitting H.265 coded video data on a transmission layer.
Background
In recent years, due to the spread of high-bit-rate and high-quality video, in particular, video requiring an extremely experienced visual viewing experience, such as VR video, has been transmitted with a higher network bandwidth. One method is that the user actively upgrades the network bandwidth size, and the other method is that a new video coding mode is used to reduce the code rate on the premise of ensuring the image quality to be unchanged, so that the video data with high image quality can be transmitted without consuming high bandwidth resources. The present invention is a solution to transmit the super-high quality video data at a relatively not very high bit rate using a second idea.
Disclosure of Invention
In order to solve the defects of the prior art, the invention aims to provide a method for transmitting H.265 encoded video data on a transmission layer, which distributes and transmits pictures with higher image quality on a video live streaming layer protocol by using an H.265 encoding mode with higher compression rate.
To achieve the above object, the present invention provides a method for transmitting h.265 encoded video data on a transport layer, comprising the steps of:
1) h.265 coding the live video;
2) modifying the codecID field and metadata information of the header of the RTMP or HTTP-FLV protocol, and modifying the data structure of the RTMP protocol or HTTP-FLV protocol;
3) the modified RTMP or HTTP-FLV protocol is adopted to transmit H.265 coded video data;
4) and selecting an H.265 decoder for decoding and video playing.
Further, the step 2) modifies the codecID field and the metadata information of the RTMP or HTTP-FLV protocol header, including,
adding data with the codec ID of 10 in a protocol header of an RTMP protocol or an HTTP-FLV protocol to identify that the encoding type of the stream is H.265;
adding codecID to metadata information of RTMP protocol to be 10 indicates that H.265 encoding is used.
Further, the method also comprises the following steps:
if the HevcPacketType field is 0, increasing VPS data;
and encapsulating 265 frame data into video packet payloads of RTMP or HTTP-FLV.
Still further, the step 4) further comprises,
judging whether a protocol header of an RTMP protocol or an HTTP-FLV protocol has a codecID (10 identifier);
judging whether the identifier codecID in the RTMP protocol or the HTTP-FLV protocol metadata is 10 or not;
the player selects the h.265 decoder for video data decoding.
The method for transmitting H.265 coded video data on the transmission layer provided by the invention uses the H.265 coding mode to reduce the code rate on the premise of ensuring that the image quality is not changed, thereby being capable of transmitting the video data with high image quality under the condition of not consuming high bandwidth resources.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic diagram of a message structure of a message in the conventional RTMP protocol;
fig. 2 is a schematic diagram of a message structure of a message block in the existing RTMP protocol;
FIG. 3 is a diagram illustrating a message blocking process in the RTMP protocol;
fig. 4 is a flow chart of a method of transmitting h.265 encoded video data over a transport layer in accordance with the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
The RTMP (HTTP-FLV is the same as RTMP protocol, and will not be described in detail later) protocol is a protocol of an application layer in an Internet TCP/IP five-layer architecture. The basic data unit in the RTMP protocol is called a Message (Message). When the RTMP protocol transmits data over the internet, a message is broken up into smaller units called message blocks (chunks).
1 message
A message is a basic data unit in the RTMP protocol. Different kinds of messages contain different Message Type IDs, representing different functions. A total of more than ten message types are defined in the RTMP protocol and each plays a different role. Fig. 1 is a schematic diagram of a Message structure of a Message in an existing RTMP protocol, and as shown in fig. 1, messages with Message Type IDs of 1 to 7 are used for protocol control, and these messages are generally messages to be used by management of the RTMP protocol itself, and a user generally does not need to operate data therein. Messages with Message Type IDs of 8, 9 are used to transmit audio and video data, respectively. The Message with Message Type ID 15-20 is used to send AMF encoded commands, responsible for the interaction between the user and the server, such as play, pause, etc. The Message Header (Message Header) is composed of four parts: message Type ID for marking Message Type, Payload Length for marking Message Length, Timestamp for marking Timestamp, and Stream ID for marking media Stream to which the Message belongs.
2 message block
When data is transmitted on a network, a message needs to be split into smaller data blocks to be suitable for transmission on the corresponding network environment. The RTMP protocol provides that messages are split into message blocks (Chunk) when transmitted over a network. Fig. 2 is a schematic diagram of a message structure of a message block in the existing RTMP protocol, and as shown in fig. 2, a message block Header (Chunk Header) is composed of three parts: a Chunk Basic Header for identifying the Chunk, a Chunk Message Header for identifying the Message to which the Chunk belongs, and Extended Timestamp which occurs when the Timestamp overflows.
3 message chunking
In the process of dividing a Message into several Message blocks, a Message payload (Message Body) is divided into fixed-size data blocks (default is 128 bytes, and the last data block can be smaller than the fixed length), and a Message block Header (Chunk Header) is added to the Header of the fixed-size data blocks to form corresponding Message blocks. Fig. 3 is a schematic diagram of a message blocking process in the conventional RTMP protocol, and as shown in fig. 3, a message with a size of 307 bytes is divided into message blocks of 128 bytes (except for the last one).
In the process of RTMP transmitting media data, a transmitting end firstly encapsulates the media data into messages, then divides the messages into message blocks, and finally transmits the divided message blocks through a TCP protocol. After receiving data through TCP protocol, the receiving end firstly recombines the message blocks into message, and then recovers the media data by de-encapsulating the message.
Fig. 4 is a flowchart of a method for transmitting h.265 encoded video data on a transport layer according to the present invention, and the method for transmitting h.265 encoded video data on a transport layer according to the present invention will be described in detail with reference to fig. 4.
Firstly, in step 401, encoding a live video by adopting an H.265 video encoding standard;
h.265 is a new video coding standard established by ITU-T VCEG following H.264. The h.265 standard surrounds the existing video coding standard h.264, retains some of the original techniques, and improves some related techniques, using advanced techniques to improve the relationship between the code stream, coding quality, delay, and algorithm complexity, to achieve an optimal setting. The specific research contents comprise: the method has the advantages of improving compression efficiency, robustness and error recovery capability, reducing real-time delay, reducing channel acquisition time and random access time delay, reducing complexity and the like. Due to algorithm optimization, the H264 can realize standard definition digital image transmission at the speed lower than 1 Mbps; h.265 can realize the transmission of 720P (with the resolution of 1280 x 720) common high-definition audio and video by using the transmission speed of 1-2 Mbps.
At step 402, modifying a data structure of the RTMP protocol;
the Frame type field of the RTMP protocol Header is not changed, and data with a new codec id of 10 is added to the codec id field of the RTMP protocol Header (RTMP Header) to identify the encoding type of the stream as h.265(264 uses 7). And adding codecID of 10 (the adopted 264 code is 7) in metadata information of the RTMP protocol indicates that H.265 code is used for enabling a player to select an H.265 decoder for video data decoding.
If the HEVC packettype field is 0 (indicating the sequence header of HEVC), i.e. some configuration information of 265 Video stream, the VPS data [ VPS: Video Parameter Set ] is added to the sequence header of the original 264 (sps + pps data), to assist decoding.
The video packet payload at RTMP encapsulates 265 frames of data. This mechanism is the same as 264, except that the payload content is different.
In step 403, modifying the data structure of the HTTP-FLV protocol;
the HTTP-FLV protocol supports the same H.265 protocol as the RTMP protocol, and a new codecID is enabled to represent the H.265 encoding mode.
In step 404, the modified RTMP and HTTP-FLV protocols are adopted to transmit H.265 coded video data;
in step 405, the player selects the h.265 decoder to decode and play the video data.
The RTMP protocol and the HTTP-FLV protocol are added with a codecID of 10 to identify the H.265 coder. The need to identify the codec id as 10 in the protocol metadata indicates that h.265 encoding is used to let the player select the h.265 decoder for video data decoding.
RTMP video packet payload data structure RTMP Header + RTMP Body (5 byte Header +4 bytes NALU size + true video data), where the Body Header structure is as follows:
Figure BDA0001317442530000051
byte[0]=[1-byte header]
byte[1]=[1-byte codec config indicator(1-video data,0-codec config packet)]
byte[2..4]=[3-byte time difference between dts and pts in milliseconds]byte[5..8]=[4-byte nalu size]
wherein the NALU field size is determined by length sizeminusone.
The HEVC field is defined as shown in the following table:
Figure BDA0001317442530000061
Figure BDA0001317442530000071
HEVC video decoding configuration information data structure:
Figure BDA0001317442530000072
Figure BDA0001317442530000081
Figure BDA0001317442530000091
the HTTP-FLV protocol supports the same H.265 protocol as the RTMP protocol, and a new codecID is enabled to represent the H.265 encoding mode.
Those of ordinary skill in the art will understand that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims (2)

1. A method of transmitting h.265 encoded video data on a transport layer, comprising the steps of:
1) h.265 coding the live video;
2) adding data with codecID =10 in a protocol header of an RTMP or HTTP-FLV protocol to identify that the editing type of the stream is H.265, adding data with codecID of 10 in metadata of the RTMP or HTTP-FLV protocol to indicate that H.265 coding is used, and modifying a data structure of the RTMP protocol or the HTTP-FLV protocol;
3) the modified RTMP or HTTP-FLV protocol is adopted to transmit H.265 coded video data;
4) and judging that the protocol header of the RTMP protocol or the HTTP-FLV protocol has a codeCID =10 identifier, judging that the identifier of the RTMP protocol or the HTTP-FLV protocol metadata is 10, and selecting an H.265 decoder by the player for decoding the video data.
2. The method for transmitting h.265 encoded video data over a transport layer as claimed in claim 1 further comprising the steps of:
if the HevcPacketType field is 0, increasing VPS data;
the H.265 frame data is encapsulated into video packet payloads of RTMP or HTTP-FLV.
CN201710431382.7A 2017-06-09 2017-06-09 Method for transmitting H.265 coding video data on transmission layer Active CN107147916B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710431382.7A CN107147916B (en) 2017-06-09 2017-06-09 Method for transmitting H.265 coding video data on transmission layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710431382.7A CN107147916B (en) 2017-06-09 2017-06-09 Method for transmitting H.265 coding video data on transmission layer

Publications (2)

Publication Number Publication Date
CN107147916A CN107147916A (en) 2017-09-08
CN107147916B true CN107147916B (en) 2021-01-29

Family

ID=59781060

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710431382.7A Active CN107147916B (en) 2017-06-09 2017-06-09 Method for transmitting H.265 coding video data on transmission layer

Country Status (1)

Country Link
CN (1) CN107147916B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110087084B (en) * 2018-01-25 2022-03-18 联咏科技股份有限公司 Video processing apparatus and video processing method
CN111010593A (en) * 2019-11-08 2020-04-14 深圳市麦谷科技有限公司 Method and device for packaging H.265 video data based on FLV format
CN111083510A (en) * 2019-12-18 2020-04-28 深圳市麦谷科技有限公司 Method and device for pushing HEVC (high efficiency video coding) video
CN111683293A (en) * 2020-05-31 2020-09-18 杭州视在数科信息技术有限公司 Method for playing H.265 video across browsers based on HTTP-FLV protocol
CN112004101B (en) * 2020-07-31 2022-08-26 北京心域科技有限责任公司 Virtual live broadcast data transmission method and device and storage medium
CN114513675A (en) * 2022-01-04 2022-05-17 桂林电子科技大学 Construction method of panoramic video live broadcast system
CN114363662A (en) * 2022-01-07 2022-04-15 深圳看到科技有限公司 Plug flow method, device, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102577403A (en) * 2009-10-13 2012-07-11 Lg电子株式会社 Broadcast receiver and 3D video data processing method thereof
CN104584554A (en) * 2012-09-26 2015-04-29 松下电器(美国)知识产权公司 Image decoding method, image encoding method, image decoding device, image encoding device, and image encoding/decoding device
CN104837022A (en) * 2015-04-29 2015-08-12 中南大学 Nerve image data compression method based on HEVC
CN106412621A (en) * 2016-09-28 2017-02-15 广州华多网络科技有限公司 Video display method and device of network studio, control method and related equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098513A (en) * 2010-12-20 2011-06-15 北京交通大学 Real-time transmission method of wireless video
CN104754349A (en) * 2013-12-25 2015-07-01 炫一下(北京)科技有限公司 Method and device for hardware decoding of audio/video
CN105100954B (en) * 2014-05-07 2018-05-29 朱达欣 A kind of alternate acknowledge system and method based on internet communication and live streaming media

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102577403A (en) * 2009-10-13 2012-07-11 Lg电子株式会社 Broadcast receiver and 3D video data processing method thereof
CN104584554A (en) * 2012-09-26 2015-04-29 松下电器(美国)知识产权公司 Image decoding method, image encoding method, image decoding device, image encoding device, and image encoding/decoding device
CN104837022A (en) * 2015-04-29 2015-08-12 中南大学 Nerve image data compression method based on HEVC
CN106412621A (en) * 2016-09-28 2017-02-15 广州华多网络科技有限公司 Video display method and device of network studio, control method and related equipment

Also Published As

Publication number Publication date
CN107147916A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
CN107147916B (en) Method for transmitting H.265 coding video data on transmission layer
US11706502B2 (en) Segment types as delimiters and addressable resource identifiers
KR101292490B1 (en) Rtp payload format for vc-1
CN104038844B (en) A kind of mobile live broadcast system based on the standards of MPEG 2
US11838564B2 (en) Transmission apparatus, transmission method, reception apparatus, and reception method
US20230035998A1 (en) System and method for data stream fragmentation
JP6344392B2 (en) Encoding device, encoding method, transmitting device, decoding device, decoding method, and receiving device
WO2007045140A1 (en) A real-time method for transporting multimedia data
JP2004534484A5 (en)
CN115943631A (en) Streaming media data comprising addressable resource index tracks with switching sets
CN108632679B (en) A kind of method that multi-medium data transmits and a kind of view networked terminals
CN109104635A (en) The method and system of instant delivery screen picture
CN104796765A (en) Method and device for extracting SPS (standard positioning services) and PPS (precise positioning services) from H264 frames
CN110636387A (en) H.264 network-based video transmission system
KR101249613B1 (en) Network-adaptive variable stream layered method and apparatus for video streaming
WO2008043213A1 (en) A mobile multimedia broadcast system for enhancing transmission efficiency by using variable-length frame and thereof method
US7949052B1 (en) Method and apparatus to deliver a DVB-ASI compressed video transport stream
CN110139144A (en) One kind is based on TV sharing method in smart home
US11758108B2 (en) Image transmission method, image display device, image processing device, image transmission system, and image transmission system with high-transmission efficiency
CN113261283B (en) Video processing method, apparatus and computer readable storage medium
EP4391543A1 (en) Image signal processing method and device
WO2021114305A1 (en) Video processing method and apparatus, and computer readable storage medium
An et al. Synchronous playback technology of airborne network video based on RTP
TW202032998A (en) Multiple decoder interface for streamed media data
TW201521386A (en) Method and system of cross-packet channel coding

Legal Events

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