mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
2.8k stars 581 forks source link

[question]Send h264 video stream directly #216

Closed DuanJieDong closed 5 years ago

DuanJieDong commented 5 years ago

I read your code carefully. [onData] function: Get video stream data [DecoderThread]: Decoding data [Decoded]:After calling broadcaster_.OnFrame(frame), the data is encoded and rtp transmitted. the code is good, and I found that you are familiar with the webrtc process.

I want to send the data directly without decoding and encoding. The source code of webrtc: VideoSendStreamImpl::OnEncodedImage can get the encoded data directly, and then send date to RTP for sending. But I don't know how to add it to the code. Can you give me some ideas?

thanks!

mpromonet commented 5 years ago

Hi DuanJieDong, I close the issue, if you have some implementation that you like to share, feel free to submit a pull request. I answer many time to this subject, it you like to avoid uncompressing, compressing, look to janus-gateway, the WebRTC SDK seems to use I420 as a pivot format. Best Regards, Michel.