I need a way to be able to make a video file from H.264 RTPFrames (Payload Type 96) that I receive using the Managed Media Aggregation - https://net7mma.codeplex.com/.
I am trying to use media foundation in managed code.
I saw http://mfnet.sourceforge.net/ but I couldn't find how to do it. I saw that someone said in some forum that it is better to use the Media Foundation dlls in C# managed code.
Does anybody have any experience working with this?
EDIT:
I an trying to use the VLCDotNet to put the h264 frames into a video file - here is my code
private void StoreFile()
{
Vlc.DotNet.Core.VlcContext.LibVlcDllsPath = @"C:\Users\Ofek\Desktop\VideoLAN\VLC";
Vlc.DotNet.Core.VlcContext.Initialize();
media1 = new Vlc.DotNet.Core.Medias.LocationMedia("rtsp://192.168.30.11/1.mkv");
media1.AddOption(":sout=#transcode{vcodec=theo,vb=800,
scale=1,acodec=flac,ab=128,channels=2,samplerate=44100}:std{access=file,mux=ogg,
dst=D:\\123.mp4}");
VlcControl control = new VlcControl();
control.Media = media1;
control.Play();
}
The Issue is that the file is created, but its not playable. I am looking for the command to save the H264 stream to a mp4 file without decoding it. any ideas?
Try playing the stream in the background as a process.