CN105530453A - Video data sending method and device and video data receiving method and device for WebRTC - Google Patents
Video data sending method and device and video data receiving method and device for WebRTC Download PDFInfo
- Publication number
- CN105530453A CN105530453A CN201511017695.5A CN201511017695A CN105530453A CN 105530453 A CN105530453 A CN 105530453A CN 201511017695 A CN201511017695 A CN 201511017695A CN 105530453 A CN105530453 A CN 105530453A
- Authority
- CN
- China
- Prior art keywords
- video data
- webrtc
- encoded video
- data
- framing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000009432 framing Methods 0.000 claims abstract description 46
- 238000012856 packing Methods 0.000 claims description 5
- 238000004806 packaging method and process Methods 0.000 abstract 1
- 230000008569 process Effects 0.000 description 11
- 230000005540 biological transmission Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000006854 communication Effects 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 239000000969 carrier Substances 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/15—Conference systems
-
- 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/440227—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 decomposing into layers, e.g. base layer and one or more enhancement layers
-
- 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/4405—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 video stream decryption
-
- 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/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/6437—Real-time Transport Protocol [RTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/141—Systems for two-way working between two video terminals, e.g. videophone
- H04N7/147—Communication arrangements, e.g. identifying the communication as a video-communication, intermediate storage of the signals
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention provides a video data sending method and device and a video data receiving method and device for WebRTC. The video data sending method for the WebRTC comprises the following steps: obtaining uncoded video data; inputting the uncoded video data to an H.264 coder to be coded; obtaining coded video data coded by the H.264 coder; packaging the coded video data in a packet cutting mode of an H.264 format to form a coded video data packet; and sending the coded video data packet. According to the video data sending method provided by the invention, the H.264 standard coding and decoding algorithm and specific packet cutting and framing modes based on the H.264 standard are added in the WebRTC, so that the WebRTC can be compatible with the existing mainstream video conference products of the H.264 standard. Thus, WebRTC better play the advantages per se in the field of plug-in free video conferences based on web.
Description
Technical field
The present invention relates to video conferencing technology field, be specifically related to a kind of video data transmitting method for WebRTC and device, method of reseptance and device.
Background technology
WebRTC is the abbreviation being derived from webpage real time communication (WebReal-TimeCommunication), be the technology that a supported web page browser of google company carries out exempting from the dialogue of plug-in unit real-time audio and video, it is boundless in the application prospect in video conference field.
The final purpose of WebRTC allows Web developer can go out abundant multimedia real-time, interactive application based on Development of Web Browser, and without the need to downloading and installing any plug-in unit.It provide the core technology of video conference, comprise the functions such as the collection of audio frequency and video, encoding and decoding, Internet Transmission, display, and support cross-platform (windows linux mac andriod) application.This means, Web developer only needs just can to realize complicated video conference core technology by simple javascript statement and calls, and greatly reduces the development difficulty of multimedia interactive application.
Fig. 1 shows the frame structure of whole webRTC: webRTC is originally one and carries out the technology of real-time video and voice communication in browser inside, so it is exposed to outermost interface is WebAPI, stay again and be only WebRTCC++API (also can be described as WebRTCNativeC++API), NativeAPI completes it at different platform (Windows, Linux, Mac, Android) functional realiey of upper modules, it comprises the collection of audio frequency and video, encoding and decoding, Internet Transmission, display, the function such as to play up, in fact google sets this one deck is the interface used to browser developers, but other want to use the developer of WebRTC modules also can be transferred to the function of each exhibits excellent in WebRTC by NativeAPI.
In order to the function making developer use video communication more easily, a set of video flowing control module VideoEngine that can directly use is achieved in WebRTC, be illustrated in figure 2 the association situation of modules in VideoEngine inside, comprise the relation between coding/decoding module (VideoCodingModule), RtpRtcp module, network transceiving module, and how VideoEngine organizes these modules.
VideoEngine contains the operand of the modules that will call in primary video communication process, the control of video flowing all realizes in VideoEngine inside, developer is not needed to be concerned about how acquisition module links with video encoding module, how video encoding module links with network transceiving module, developer only needs to start this process, as shown in Figure 3, comprising:
1) from coding in transmission data whole process, video flowing is in the flow direction of VideoEngine inside;
2) unwrap the beginning to the whole process of decoding from reception RTP, video flowing is in the flow direction of VideoEngine inside.
But current video conference field uses the most general code decode algorithm still based on the algorithm of H.264 standard, and it cuts bag and framing mode is also based on H.264 standard is distinctive, and the development trend in future can determine it is H.265.With the popularity rate that video conference is current, do not consider that compatible video conferencing product cannot commercially be survived.And WebRTC is primary does not support H.264/H.265, its default codec uses the VP8 increased income.This makes WebRTC no matter from code decode algorithm or the reception transfer characteristic of Media Stream, all cannot be mutually compatible with the H.264 video conferencing product of present main flow.
Summary of the invention
Therefore, the technical problem to be solved in the present invention be WebRTC due to use codec be the VP8 increased income, but not the H.264 codec of major video meeting product use at present, and no matter the WebRTC caused sends from code decode algorithm or the reception of Media Stream, all cannot be mutually compatible with the video conferencing product of present main flow.
For this reason, following technical scheme is embodiments provided:
For a video data transmitting method of WebRTC, comprise the following steps:
Obtain uncoded video data;
Uncoded coding video data is inputted in H.264 encoder;
Obtain the encoded video data after H.264 encoder encodes;
Pack to form encoded video packets of data to encoded video data according to the packet mode of cutting of H.264 form;
Send encoded video packets of data.
Preferably, H.264 encoder carrys out dynamic registration by external codec Registering modules, and external codec Registering modules is provided by the video engine in WebRTC.
Preferably, after obtaining the step of the encoded video data after H.264 encoder encodes, also comprise:
Encoded video data is sent to the RtpRtcp module in WebRTC by call back function when utilizing the coding pre-set in H.264 encoder to complete, to carry out packing and sending.
Preferably, according to the packet mode of cutting of H.264 form, the step that encoded video data is packed is comprised:
Encoded video data is packaged as multiple (slice);
Judge whether the size of each sheet (slice) is greater than default MTU;
If so, then by slicing mode, this sheet (slice) is cut into multiple bag.
For a video data recipient method of WebRTC, comprise the following steps:
Receive encoded video packets of data;
According to the framing mode of H.264 form, received encoded video packets of data is resolved, framing;
Encoded video data after H.264 decoder inputs framing is decoded.
Preferably, H.264 decoder carrys out dynamic registration by external codec Registering modules, and external codec Registering modules is provided by the video engine in WebRTC.
Preferably, according to the framing mode of H.264 form, received encoded video packets of data is resolved, the step of framing comprises:
Obtain and resolve the header packet information of received encoded video packets of data;
Framing is carried out according to header packet information.
Preferably, after the encoded video data after H.264 decoder input framing carries out the step of decoding, also comprise:
The video data of having decoded is delivered in display module and shows by call back function when completing according to the decoding pre-set in H.264 decoder.
Video data for WebRTC sends a device, comprising:
First acquiring unit, for obtaining uncoded video data;
Coding unit, for inputting uncoded coding video data in H.264 encoder;
Second acquisition unit, for obtaining the encoded video data after H.264 encoder encodes;
Packaged unit, packs to form encoded video packets of data to encoded video data for the packet mode of cutting according to H.264 form;
Transmitting element, for sending encoded video packets of data.
For a video data receiving system of WebRTC, comprising:
Receiving element, for receiving encoded video packets of data;
Framing unit, resolves received encoded video packets of data for the framing mode according to H.264 form, framing;
Decoding unit, for decoding to the encoded video data after H.264 decoder input framing.
Technical solution of the present invention, tool has the following advantages:
1. the video data transmitting method for WebRTC that provides of the embodiment of the present invention and device, by adding the support to H.264 form in webRTC, namely add the encryption algorithm of H.264 standard and cut packet mode based on H.264 standard is distinctive, thus make WebRTC from the transfer characteristic of encryption algorithm and Media Stream, mutually compatible with the H.264 video conferencing product of present main flow.In conjunction with the network adaptability that WebRTC self is good, it can be made more extensive in the application in video conference field.
2. the video data transmitting method for WebRTC that provides of the embodiment of the present invention and device, H.264 encoder carrys out dynamic registration by external codec Registering modules (ViEExternalCodec), can need to switch encoder dynamically according to use in utilization process.
3. the video data recipient method for WebRTC that provides of the embodiment of the present invention and device, by adding the support to H.264 form in webRTC, namely add H.264 standard decoding algorithm and based on the H.264 distinctive framing mode of standard, thus make WebRTC from the receiving feature of decoding algorithm and Media Stream, mutually compatible with the H.264 video conferencing product of present main flow.In conjunction with the network adaptability that WebRTC self is good, it can be made actual in the application in video conference field.
4. the video data recipient method for WebRTC that provides of the embodiment of the present invention and device, H.264 decoder carrys out dynamic registration by external codec Registering modules (ViEExternalCodec), this method adding new decoder, makes the change of decoder meeting more flexible.Dynamic switching encoding/decoding device can be needed according to use in practice process.
Accompanying drawing explanation
In order to be illustrated more clearly in the specific embodiment of the invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the Organization Chart of WebRTC;
Fig. 2 is VideoEngine (video engine) internal structure schematic diagram;
Fig. 3 is that video flowing flows to schematic diagram in VideoEngine (video engine) inside;
Fig. 4 is the flow chart for the video data transmitting method of WebRTC in the embodiment of the present invention 1;
Fig. 5 be in the embodiment of the present invention in 1 and 2 video flowing flow to schematic diagram;
Fig. 6 is the flow chart for the video data transmitting method of WebRTC in the embodiment of the present invention 2;
Fig. 7 is the theory diagram sending device in the embodiment of the present invention 4 for the video data of WebRTC;
Fig. 8 is the theory diagram for the video data receiving system of WebRTC in the embodiment of the present invention 5.
Embodiment
Be clearly and completely described technical scheme of the present invention below in conjunction with accompanying drawing, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
In addition, if below in the described different execution mode of the present invention involved technical characteristic do not form conflict each other and just can be combined with each other.
Embodiment 1
As shown in Figures 4 and 5, present embodiments provide a kind of video data transmitting method for WebRTC, function used in the present embodiment is all the function in WebRTC, comprises the following steps:
S11: obtain uncoded video data, in the present embodiment, this uncoded video data is mainly YUV (I420) data.
S12: input uncoded coding video data in H.264 encoder.YUV (I420) data specifically utilizing function Encode (...) to send to inside H.264 encoder to gather and obtain are to encode.H.264, also be MPEG-4 Part X simultaneously, it is the high compression digital video coding-coding device standard that the joint video team (JVT, JointVideoTeam) constituted jointly by ITU-T Video Coding Experts group (VCEG) and ISO/IEC dynamic image expert group (MPEG) proposes.H.264 encoder is namely for being undertaken compressing so that transmit by gathering the uncorrected data obtained.
S13: obtain the encoded video data after H.264 encoder encodes.
S14: pack to form encoded video packets of data to encoded video data according to the packet mode of cutting of H.264 form, i.e. RTP bag.
S15: send encoded video packets of data.
The above-mentioned video data transmitting method for WebRTC, what add H.264 form by the sending point adding H.264 encoder and the RtpRtcp module in WebRTC in WebRTC cuts packet mode, as shown in Figure 5, in WebRTC, add the support to H.264 standard.Be mainly concerned with VideoCoding and the RtpRtcp module in webRTC, these two modules are managed by VideoEngine, thus realize the encapsulation of simple and easy calling interface.
The video data transmitting method for WebRTC that the present embodiment provides, by adding the support to H.264 form in webRTC, namely add the encryption algorithm of H.264 standard and cut packet mode based on H.264 standard is distinctive, thus make WebRTC from the transfer characteristic of encryption algorithm and Media Stream, mutually compatible with the H.264 video conferencing product of present main flow.In conjunction with the network adaptability that WebRTC self is good, it can be made more extensive in the application in video conference field.
As the preferred implementation of the present embodiment, H.264 encoder carrys out dynamic registration by external codec Registering modules (ViEExternalCodec), external codec Registering modules is by the video flowing control module in WebRTC, and namely video engine (VideoEngine) provides.This mode adding new encoder in WebRTC, make the change of encoder meeting more flexible, such as H.264 encryption algorithm can be packaged into an encoder, also the code database of developer oneself can be packaged into an encoder simultaneously, the encoder that will use can be switched dynamically in utilization process.
Particularly, the process adding H.264 encoder in WebRTC is as follows:
First, H.264 encoder is write;
Then, the function RegisterExternalSendCodec (...) directly calling external codec Registering modules (ViEExternalCodec) registers this H.264 encoder.Have the integer value of a video_channel in the parameter of function RegisterExternalSendCodec (...), this value is directly linked to that current which code stream what will register be, i.e. the unique identification of this channel Zhi Shige road code stream.
In addition, also need to add more corresponding process with reference to VP8 in WebRTC inside and just complete the support adding and H.264 encode at last.Such as, how the data after how the video uncorrected data (yuv format) of collection gives coding buffering, coding pass to network sending module, decoded data cached mechanism of how to give these cache managements such as display module and transmission all needs with reference to realizing in VP8.
As the replaceable execution mode of the present embodiment, also H.264 encoder directly can be joined the inside of WebRTC.
Before step S12, also need to utilize initialization function InitEncode (...) to carry out initialization H.264 encoder, fill in complete corresponding parameter.
As concrete execution mode, above-mentioned steps S13, after namely obtaining the step of the encoded video data after H.264 encoder encodes, also comprises:
Encoded video data is sent to the RtpRtcp module in WebRTC by call back function when utilizing the coding pre-set in H.264 encoder to complete, to carry out packing and sending.That is, mixed-media network modules mixed-media (comprising RtpRtcp module) will be sent to by call back function after the uncoded video data of each frame (uncorrected data) is encoded into encoded video data.
Specifically utilize function RegisterEncodeCompleteCallback (...) that readjustment when having encoded is set in H.264 encoder.
After whole encoding tasks completes, function Release (...) is also utilized to discharge encoder, some resources of mainly release busy.
RTP packing mode H.264 has multiple, preferably adopt with single NAL (network abstract layer in the present embodiment, data after formating coding, ensure that it transmits on various network medium) be unit send, for H.264 namely with a slice for unit sends.Particularly, above-mentioned steps S14, namely comprises the step that encoded video data is packed according to the packet mode of cutting of H.264 form:
First, encoded video data is packaged as multiple (slice).For encoded video data, wherein a frame can be cut into multi-disc (slice), and slice is made up of macro block (MB), and macro block is the minimum unit of Video coding.
Then, judge whether the size of each sheet (slice) is greater than default MTU (MTU), and this MTU is normally defined 1500, but also can carry out some adjustment according to different networks.
If so, then by slicing mode, this sheet (slice) is cut into multiple bag; So just need not cut into slices if the size of slice (sheet) is not more than default MTU, directly add RTP bag and send.H.264 slicing mode is specially FU-A slicing mode, and FU-A comes from RFC3984 standard, defines the section form of video data, FU and FragmentationUnit.
Based on calling each functional module in WebRTC easily by NativeAPI, and wherein some function (being similar to the functions such as audio frequency preliminary treatment, Internet Transmission) has excellent performance, so these function package can be become general, modular assembly, so that sundry item is convenient to use, illustrate the module that can be packaged into assembly in a little WebRTC as follows:
1) medianet (Internet Transmission): rtp_rtcp & udp_transport;
2) mediaSDK (media control): video_engine & voice_engine;
3) audio frequency preliminary treatment (AEC...): audio_processing;
4) video pre-filtering (Denoise...): video_processing.
Embodiment 2
As illustrated in Figures 5 and 6, present embodiments provide a kind of video data recipient method for WebRTC, function used in the present embodiment is all the function that WebRTC carries, and comprises the following steps:
S21: receive encoded video packets of data, i.e. RTP bag.
S22: according to the framing mode of H.264 form, received encoded video packets of data to be resolved, framing;
S23: the encoded video data after H.264 decoder inputs framing is decoded.The encoded video packets of data specifically utilizing function Decode (...) to send to inside H.264 decoder to receive is to decode.
The above-mentioned video data recipient method for WebRTC, as shown in Figure 5, added the framing mode of H.264 form by the acceptance point adding H.264 decoder and the RtpRtcp module in WebRTC in WebRTC, in WebRTC, add the support to H.264 standard.Be mainly concerned with VideoCoding and the RtpRtcp module in webRTC.
The video data recipient method for WebRTC that the present embodiment provides, by adding the support to H.264 form in webRTC, namely add H.264 standard decoding algorithm and based on the H.264 distinctive framing mode of standard, thus make WebRTC from the receiving feature of decoding algorithm and Media Stream, mutually compatible with the H.264 video conferencing product of present main flow.In conjunction with the network adaptability that WebRTC self is good, it can be made actual in the application in video conference field.
As the embodiment of the present embodiment, above-mentioned steps S22, namely resolves received encoded video packets of data according to the framing mode of H.264 form, the step of framing comprises:
First, obtain and resolve the header packet information of received encoded video packets of data.
Then, framing is carried out according to header packet information.
Particularly, as shown in Figure 5, the framing mode for H.264 form is added in the acceptance point of the RtpRtcp module of the present embodiment in WebRTC.But, framing is not herein that real realization is by multiple bag composition one frame, just parse the effective information in WebRTC by corresponding header packet information and be configured to RTPPayload structure objects, whether can comprise in this structure objects is the information such as first bag of frame, these information can be delivered in the coding and decoding video module (video_coding) of WebRTC, complete real framing operation in coding and decoding video module again.
As the preferred implementation of the present embodiment, H.264 decoder carrys out dynamic registration by external codec Registering modules (ViEExternalCodec), and external codec Registering modules is provided by the video engine (VideoEngine) in WebRTC.With to add H.264 encoder in embodiment 1 in WebRTC the same, this method adding new decoder, makes the change of decoder can be more flexible.
Particularly, the process adding H.264 decoder in WebRTC is as follows:
First, H.264 decoder is write;
Then, the function RegisterExternalReceiveCodec (...) directly calling external codec Registering modules (ViEExternalCodec) registers this H.264 decoder.The integer value of a video_channel is had in the parameter of function RegisterExternalReceiveCodec (...), this value is directly linked to that current which code stream what will register be, namely this channel value is the unique identification of each road code stream.
In addition, also need to add more corresponding process with reference to VP8 in WebRTC inside and just complete the support added H264 decoding at last.
As the replaceable execution mode of the present embodiment, also H.264 decoder directly can be joined the inside of WebRTC.
Particularly, before above-mentioned steps S23, also need to utilize initialization function InitDecode (...) to carry out initialization H.264 decoder, to complete filling in of relevant parameter.
When whole decoding task completes, function Release (...) is also utilized to discharge decoder, mainly the more corresponding resources of release.
As concrete execution mode, above-mentioned steps S23, namely to after the encoded video data after H.264 decoder input framing carries out the step of decoding, also comprises:
The video data of having decoded is delivered in display module and carries out playing up to show by call back function when completing according to the decoding pre-set in H.264 decoder.
Specifically utilize function RegisterDecodeCompleteCallback (...) that readjustment when having decoded is set in H.264 decoder.
Embodiment 3
Present embodiments provide a kind of video data transmitting method and video data recipient method, for WebRTC, comprise the video data transmitting method for WebRTC described in embodiment 1 and the video data recipient method for WebRTC described in embodiment 2.
The above-mentioned video data transmitting method for WebRTC and video data recipient method, by adding H.264 codec in WebRTC, add H.264 standard in the sending point of its RtpRtcp module cut the framing mode that packet mode and acceptance point add H.264 standard, in WebRTC, add the support to H.264 standard.Thus WebRTC is sent from the reception of code decode algorithm and Media Stream, mutually compatible with the H.264 video conferencing product of present main flow.Again in conjunction with the network adaptability that WebRTC self is good, it can be made more extensive in the application in video conference field.
Be applied in Android phone by above-mentioned for WebRTC video data transmitting method and video data recipient method, can with standard h.323 video conference terminal set up and call out, the video code flow of H.264 form is received and dispatched by ip network, can successfully decode in mobile phone side and display video conference terminal camera collection encode the video data sended over, and also successfully can decode and show the video data that mobile phone camera collection sends in video conference terminal side.So far, the simple video conference terminal media network layer based on webRTC realizes substantially.In addition, the method also can be applied in other carriers such as ipad and computer, with formed based on browser, without the need to download and install any plug-in unit and can be compatible mutually with major video meeting product video conferencing product.
Embodiment 4
As shown in Figure 7, present embodiments provide a kind of video data for WebRTC and send device, comprising:
First acquiring unit U11, for obtaining uncoded video data;
Coding unit U12, for inputting uncoded coding video data in H.264 encoder;
Second acquisition unit U13, for obtaining the encoded video data after H.264 encoder encodes;
Packaged unit U14, packs to form encoded video packets of data to encoded video data for the packet mode of cutting according to H.264 form;
Transmitting element U15, for sending encoded video packets of data.
The video data for WebRTC that the present embodiment provides sends device, by adding the support to H.264 form in webRTC, namely add the encryption algorithm of H.264 standard and cut packet mode based on H.264 standard is distinctive, thus make WebRTC from the transfer characteristic of encryption algorithm and Media Stream, mutually compatible with the H.264 video conferencing product of present main flow.In conjunction with the network adaptability that WebRTC self is good, it can be made more extensive in the application in video conference field.
As the preferred implementation of the present embodiment, H.264 encoder carrys out dynamic registration by external codec Registering modules (ViEExternalCodec), external codec Registering modules is by the video flowing control module in WebRTC, and namely video engine (VideoEngine) provides.This mode adding new encoder in WebRTC, make the change of encoder meeting more flexible, such as H.264 encryption algorithm can be packaged into an encoder, also the code database of developer oneself can be packaged into an encoder simultaneously, the encoder that will use can be switched dynamically in utilization process.
The said apparatus that the present embodiment provides, also comprises:
First readjustment unit, encoded video data is sent to the RtpRtcp module in WebRTC by call back function when completing for utilizing the coding pre-set in H.264 encoder, to carry out packing and sending.
As concrete execution mode, packaged unit U14 comprises:
Cut steamed stuffed bun unit, for encoded video data is packaged as multiple slice;
Judgment sub-unit, for judging whether the size of each slice is greater than default MTU;
Section subelement, if the size of slice is greater than default MTU, then for this slice being cut into multiple bag by slicing mode.
Embodiment 5
As shown in Figure 8, present embodiments provide a kind of video data receiving system for WebRTC, comprising:
Receiving element U21, for receiving encoded video packets of data;
Framing unit U22, resolves received encoded video packets of data for the framing mode according to H.264 form, framing;
Decoding unit U23, for decoding to the encoded video data after H.264 decoder input framing.
The video data receiving system for WebRTC that the present embodiment provides, by adding the support to H.264 form in webRTC, namely add H.264 standard decoding algorithm and based on the H.264 distinctive framing mode of standard, thus make WebRTC from the receiving feature of decoding algorithm and Media Stream, mutually compatible with the H.264 video conferencing product of present main flow.In conjunction with the network adaptability that WebRTC self is good, it can be made more extensive in the application in video conference field.
As concrete execution mode, above-mentioned Framing unit U22 comprises:
Resolve subelement, for obtaining and resolving the header packet information of received encoded video packets of data;
Framing subelement, for carrying out framing according to header packet information.
The said apparatus that the present embodiment provides, also comprises:
Second readjustment unit, the video data of having decoded is delivered in display module and shows by the call back function when decoding for pre-setting in basis H.264 decoder completes.
Obviously, above-described embodiment is only for clearly example being described, and the restriction not to execution mode.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here exhaustive without the need to also giving all execution modes.And thus the apparent change of extending out or variation be still among the protection range of the invention.
Claims (10)
1. for a video data transmitting method of WebRTC, it is characterized in that, comprise the following steps:
Obtain uncoded video data;
Described uncoded coding video data is inputted in H.264 encoder;
Obtain the encoded video data after described H.264 encoder encodes;
Pack to form encoded video packets of data to described encoded video data according to the packet mode of cutting of H.264 form;
Send described encoded video packets of data.
2. the method for claim 1, is characterized in that, described H.264 encoder carrys out dynamic registration by external codec Registering modules, and described external codec Registering modules is provided by the video engine in WebRTC.
3. method as claimed in claim 1 or 2, is characterized in that, after the step of the encoded video data of described acquisition after described H.264 encoder encodes, also comprise:
Described encoded video data is sent to the RtpRtcp module in WebRTC by the call back function when coding H.264 pre-set in encoder described in utilization completes, to carry out packing and sending.
4. the method according to any one of claim 1-3, is characterized in that, the described packet mode of cutting according to H.264 form comprises the step that described encoded video data is packed:
Described encoded video data is packaged as multiple (slice);
Judge whether the size of each sheet (slice) is greater than default MTU;
If so, then by slicing mode, this sheet (slice) is cut into multiple bag.
5., for a video data recipient method of WebRTC, it is characterized in that, comprise the following steps:
Receive encoded video packets of data;
According to the framing mode of H.264 form, received encoded video packets of data is resolved, framing;
Encoded video data after H.264 decoder inputs framing is decoded.
6. method as claimed in claim 5, it is characterized in that, described H.264 decoder carrys out dynamic registration by external codec Registering modules, and described external codec Registering modules is provided by the video engine in WebRTC.
7. the method as described in claim 5 or 6, is characterized in that, the described framing mode according to H.264 form is resolved received encoded video packets of data, the step of framing comprises:
Obtain and resolve the header packet information of received encoded video packets of data;
Framing is carried out according to described header packet information.
8. the method according to any one of claim 5-7, is characterized in that, described encoded video data after H.264 decoder input framing also comprises after carrying out the step of decoding:
The video data of having decoded is delivered in display module and shows by call back function when completing according to the decoding pre-set in described H.264 decoder.
9. the video data for WebRTC sends a device, it is characterized in that, comprising:
First acquiring unit, for obtaining uncoded video data;
Coding unit, for inputting described uncoded coding video data in H.264 encoder;
Second acquisition unit, for obtaining the encoded video data after described H.264 encoder encodes;
Packaged unit, packs to form encoded video packets of data to described encoded video data for the packet mode of cutting according to H.264 form;
Transmitting element, for sending described encoded video packets of data.
10., for a video data receiving system of WebRTC, it is characterized in that, comprising:
Receiving element, for receiving encoded video packets of data;
Framing unit, resolves received encoded video packets of data for the framing mode according to H.264 form, framing;
Decoding unit, for decoding to the encoded video data after H.264 decoder input framing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511017695.5A CN105530453B (en) | 2015-12-29 | 2015-12-29 | Video data transmitting method and device, method of reseptance and device for WebRTC |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511017695.5A CN105530453B (en) | 2015-12-29 | 2015-12-29 | Video data transmitting method and device, method of reseptance and device for WebRTC |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105530453A true CN105530453A (en) | 2016-04-27 |
CN105530453B CN105530453B (en) | 2019-06-28 |
Family
ID=55772397
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511017695.5A Active CN105530453B (en) | 2015-12-29 | 2015-12-29 | Video data transmitting method and device, method of reseptance and device for WebRTC |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105530453B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107040458A (en) * | 2017-03-23 | 2017-08-11 | 中国南方电网有限责任公司 | A kind of method and system for realizing video conference intercommunication |
CN108156414A (en) * | 2017-12-27 | 2018-06-12 | 惠州Tcl家电集团有限公司 | WebRTC data-encoding schemes, equipment and computer readable storage medium |
CN108173863A (en) * | 2017-12-29 | 2018-06-15 | 深圳市泛海三江科技发展有限公司 | Establish the method and system of the lightweight WebRTC systems suitable for internet of things equipment |
CN108769616A (en) * | 2018-06-21 | 2018-11-06 | 泰华智慧产业集团股份有限公司 | A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system |
CN112491924A (en) * | 2020-12-09 | 2021-03-12 | 威创集团股份有限公司 | Cross-platform face recognition login method, system and storage medium |
CN112533075A (en) * | 2020-11-24 | 2021-03-19 | 湖南傲英创视信息科技有限公司 | Video processing method, device and system |
CN112738644A (en) * | 2021-04-01 | 2021-04-30 | 浙江华创视讯科技有限公司 | Video stream transmission method and device based on WebRTC |
CN113206888A (en) * | 2021-05-10 | 2021-08-03 | 创新奇智(上海)科技有限公司 | Real-time video streaming transmission method and device based on RTSP (real time streaming protocol) |
CN113727113A (en) * | 2020-05-26 | 2021-11-30 | 网易(杭州)网络有限公司 | Video decoding method, stream pushing method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102868939A (en) * | 2012-09-10 | 2013-01-09 | 杭州电子科技大学 | Method for synchronizing audio/video data in real-time video monitoring system |
CN103414835A (en) * | 2013-07-24 | 2013-11-27 | 佳都新太科技股份有限公司 | Method for achieving call center video seating through WebRTC technology |
WO2015172454A1 (en) * | 2014-05-13 | 2015-11-19 | 中兴通讯股份有限公司 | Method and gateway for communication between browser and telecommunication network |
-
2015
- 2015-12-29 CN CN201511017695.5A patent/CN105530453B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102868939A (en) * | 2012-09-10 | 2013-01-09 | 杭州电子科技大学 | Method for synchronizing audio/video data in real-time video monitoring system |
CN103414835A (en) * | 2013-07-24 | 2013-11-27 | 佳都新太科技股份有限公司 | Method for achieving call center video seating through WebRTC technology |
WO2015172454A1 (en) * | 2014-05-13 | 2015-11-19 | 中兴通讯股份有限公司 | Method and gateway for communication between browser and telecommunication network |
Non-Patent Citations (4)
Title |
---|
LIUHONGXIANGM: "WebRTC VideoEngine超详细教程(二)--集成OPENH264编解码器", 《CSDN博客》 * |
ZHANGHUI_CUC: "WebRTC VideoEngine超详细教程(一)-视频通话的基本流程", 《CSDN博客》 * |
何小海: "《数字图像通信及其应用》", 30 September 2006, 四川大学出版社 * |
王振中: "WebRTC代码走读(十一):video_coding模块分析", 《CSDN博客》 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107040458A (en) * | 2017-03-23 | 2017-08-11 | 中国南方电网有限责任公司 | A kind of method and system for realizing video conference intercommunication |
CN107040458B (en) * | 2017-03-23 | 2020-10-16 | 中国南方电网有限责任公司 | Method and system for realizing intercommunication of video conference |
CN108156414A (en) * | 2017-12-27 | 2018-06-12 | 惠州Tcl家电集团有限公司 | WebRTC data-encoding schemes, equipment and computer readable storage medium |
CN108173863B (en) * | 2017-12-29 | 2021-08-17 | 深圳市泛海三江科技发展有限公司 | Method and system for establishing lightweight WebRTC system suitable for Internet of things equipment |
CN108173863A (en) * | 2017-12-29 | 2018-06-15 | 深圳市泛海三江科技发展有限公司 | Establish the method and system of the lightweight WebRTC systems suitable for internet of things equipment |
CN108769616A (en) * | 2018-06-21 | 2018-11-06 | 泰华智慧产业集团股份有限公司 | A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system |
CN113727113A (en) * | 2020-05-26 | 2021-11-30 | 网易(杭州)网络有限公司 | Video decoding method, stream pushing method and system |
CN112533075A (en) * | 2020-11-24 | 2021-03-19 | 湖南傲英创视信息科技有限公司 | Video processing method, device and system |
CN112491924A (en) * | 2020-12-09 | 2021-03-12 | 威创集团股份有限公司 | Cross-platform face recognition login method, system and storage medium |
CN112491924B (en) * | 2020-12-09 | 2022-03-22 | 威创集团股份有限公司 | Cross-platform face recognition login method, system and storage medium |
CN112738644A (en) * | 2021-04-01 | 2021-04-30 | 浙江华创视讯科技有限公司 | Video stream transmission method and device based on WebRTC |
CN113206888A (en) * | 2021-05-10 | 2021-08-03 | 创新奇智(上海)科技有限公司 | Real-time video streaming transmission method and device based on RTSP (real time streaming protocol) |
CN113206888B (en) * | 2021-05-10 | 2022-12-13 | 创新奇智(上海)科技有限公司 | Real-time video streaming transmission method and device based on RTSP (real time streaming protocol) |
Also Published As
Publication number | Publication date |
---|---|
CN105530453B (en) | 2019-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105530453A (en) | Video data sending method and device and video data receiving method and device for WebRTC | |
CN1910926B (en) | Method and apparatus for handling video communication errors | |
TWI311422B (en) | Enhanced video streaming using dual network mode | |
KR101065649B1 (en) | system and method for providing redundancy management | |
CN101427573B (en) | System and method for thinning of scalable video coding bit-streams | |
KR101122143B1 (en) | Signaling buffer parameters indicative of receiver buffer architecture | |
JP6333949B2 (en) | Improved RTP payload format design | |
CN105359515B (en) | Video pause instruction in visual telephone | |
CN107087138A (en) | A kind of video conferencing system based on H.265 video code model | |
CN104270594A (en) | Data packet sending and receiving method and device | |
CN111327580A (en) | Message transmission method and device | |
KR100937060B1 (en) | Two-way communication method and device, system and storage medium storing program | |
CN101155095B (en) | Method, system and gateway for negotiation of data signal detector ability | |
CN107852479A (en) | The switching display device in visual telephone | |
EP4356593A1 (en) | Real-time augmented reality communication session | |
WO2006054206A2 (en) | Method of determining a corruption indication of a sequence of encoded data frames | |
Paulsen et al. | MPEG-4/AVC versus MPEG-2 in IPTV. | |
KR100704116B1 (en) | Multiple Real-time Encoding method for Multi-media Service And Server Apparatus Thereof | |
WO2022266457A1 (en) | Real-time augmented reality communication session | |
TW202423095A (en) | Automatic generation of video content in response to network interruption | |
Zhuo et al. | Wireless media streaming system over CDMA networks | |
KR20070013595A (en) | Method for transmitting moving picture experts group multi layered video and its using method for decoding it | |
Radnosrati | Trading-off Compression, Energy Efficiency, and QoE in Wireless Networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |