WebRTC with ffmpeg in c# .NET
I have a running web socket server project in .NET, used SIPSorcery.NET and its other dependent packages. i need to get media data from client-side and save it into a playable file, especially in hls format (m3u8 file). i did for audio data actually, but for video data.
I need to do the same logic for the video type. I tried actually, but I could not parse incoming payload into valid NAL Units to handle.
_pc = new PeerConnection(RTCPeerConnectionConfigs);
...
// other configs and event handlers
_pc.OnRTPPacketReceived += async (remoteEndPoint, mediaType, rtpPacket) =>
{
if (mediaType == audio)
{
// OPUS audio handling (done)
}
else if (mediaType == video)
{
// where i could not handle the rtp packet
}
}
Read more here: Source link
