<div dir="ltr">Hi,<div>I'm trying to create a server application for video conference, working in a following way:</div><div>get incoming H264 data on RTP protocol from multiple clients, decode data to get seperate frames, manipulate frames, encode frames to H264 and finally stream data to multiple clients.</div>
<div><br></div><div>For now I have two separate parts working together:</div><div>H264 live streamer - gets frames from camera (using opencv), encodes them to H264 (with x264lib) and streams as RTP multicast.</div><div>H264 receiver - collects incoming H264 data from multicast RTP, decodes them (with ffmpeg) and displays in window (using opencv).</div>
<div><br></div><div>My current idea for stitching theese two parts and creating my server is to create a sequence of sources (filters) with a single sink at the end:</div><div><br></div><div>inputRTPSource = H264VideoRTPSource(rtpGroupsockIn) <- collects incoming data from clients<br>
</div><div>computingSource = H264ComputingSource(inputRTPSource); <- this is where decoding, manipulating frames and encoding takes place; it takes inputRTPSource as input source<br></div><div>videoSource = H264VideoStreamDiscreteFramer(computingSource);<br>
</div><div>sink = H264VideoRTPSink(rtpGroupsockOut); <- streams data to clients<br></div><div><br></div><div>start two (for incoming and outcoming stream) RTCP sessions:</div><div><br></div><div><div>rtcpInstanceIn<span style="white-space:pre"> </span>= RTCPInstance(rtcpGroupsockIn, inputRTPSource);</div>
</div><div>rtcpInstanceOut<span style="white-space:pre"> </span>= RTCPInstance(rtcpGroupsockOut, sink);<br></div><div><br></div><div>and play whole thing like this:</div><div><br></div><div>sink->startPlaying(*videoSource, afterPlaying, NULL);<br>
</div><div><br></div><div>Is this the way to go? Am I on the right track? I'd be grateful for any insight!</div></div>