EmguFFmpeg
EmguFFmpeg copied to clipboard
From RTP packet (Audio and or Video) create MediaFame
I wondering it's its possible to decode RTP packets (Audio and/or Video) ?
I have already them in memory - RTP Header and RTP Payload. I have the SDP associated (if necessary).
But I'm wondering how to create an MrdiaFrame using all that ...
Do you have any idea / hints about this ?
Thanks.
How do I implement the same test environment as you? Can you provide more specific information about your scenario?
I have a SIP or WebRTC communication created using a SDP (with Audio and/or Video) Then I receive from the Peer RTP packets. I would like to decode this packets using MediaFrame.
If you want I can share with you:
- a SDP File
- a file which contains a "List<byte[]>": Audio RTP packets (with Header + Payload)
- a file which contains a "List<byte[]: Video RTP packets (with Header + Payload)
I have a SIP or WebRTC communication created using a SDP (with Audio and/or Video) Then I receive from the Peer RTP packets. I would like to decode this packets using MediaFrame.
If you want I can share with you:
- a SDP File
- a file which contains a "List<byte[]>": Audio RTP packets (with Header + Payload)
- a file which contains a "List<byte[]: Video RTP packets (with Header + Payload)
Yes, I am very interested in your application scenario, please share it with me.
In both VideoRTP.zi and AudioRTP.zip you'll find RTP stored as "List<byte[]>" in 3 files: RTP headers only, RTP payloads only and RTP packets (Header + Payload). Just in case.
The video is a screen sharing of video clips(low fps). The audio is a recording from them using a microphone from my headset... The sound should be bad ...
And two SDP files, from the remote and the local Peer.
Audio is using OPUS Video is using VP8
If you need any other info don't hesitate. And thank you for your help !
videoRTP.zip AudioRTP.zip SDPFileFromLocalPeer.txt SDPFileFromRemotePeer.txt
Just in case the code used to save data to file
private List<byte[]> audioRTPPayloadList = new();
...
using (Stream stream = File.Open(fileNameRTPPayload, FileMode.OpenOrCreate, FileAccess.Write))
{
var bformatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
bformatter.Serialize(stream, audioRTPPayloadList);
}
There is 10000 RTP Audio packets and 5000 RTP Video packets