Open antonioaguilar opened 2 weeks ago
Hi @antonioaguilar
The Rtp packets are extracted and transform to annexb format (see https://github.com/mpromonet/rtsp2web/blob/master/inc%2Frtspcallback.h), concatening SPS+PPS+IDR. This format could be used directly by VideoDecode.
I tried an implementaion in Rust https://github.com/mpromonet/rtsp2web-rs, it might helps, that convert avcc to annexb.
Best Regards Michel
@mpromonet Great work on implementing the
rtsp2web
server, the code is quite minimalist. I'm implementing a RTP/h264 relay server in Golang similar to yours.I'm wondering if you might be able to clarify some questions on how the
rtsp2web
server is able to relay h264 media to the browser webcodecs:1) is the server just relaying the RTP packets that contain the h264 media as-is to the Websocket connection? or,
2) is the server capturing the RTP packets, then decodes part or all of the h264 media into frames and then sends these decoded frames over the Websocket connection?
The
EncodedVideoChunk()
method of the Webcodecs API expects thedata
parameter to be anArrayBuffer
but doesn't specify if this data should be plain RTP packets or already decoded h264 media?I'm asking all these because I'm not familiar (yet) how h264 or the Webcodecs API should work together.