sipsorcery
sipsorcery copied to clipboard
C# media codecs
FYI I was messing with the IKVM project that was just recently updated.
https://github.com/ikvm-revived/ikvm
I then used JCodec.jar file and got it converted to a dll.
https://github.com/jcodec/jcodec
I just successfully wrote a sequence of images to an MP4 file
With no native libraries needed like ffmpeg.
Here is a screen recoder project as an example. screenrecoder.zip
Looks very interesting! I take it the video codec was H264? That's no mean feat of the JCodec project if they've implemented H264, VP8 and more in pure Java! Ah, I see VP8 is IFrames only, that's a big shortcut and means it's not practical for streaming :).
Any idea how the H264 converted codec performs with 30fps streaming at 1080p? If we can ever do that in pure dotnet video would be sooo much easier.
The test I ran was I believe was encoding h264 to an mp4 file. It was a bit slow in debug mode, taking 200-300 ms per frame at 1920x1080. I'm messing around using (dotnet decompilers) like ILSpy and dotpeek to convert the dll to a project I can compile, then maybe I could figure out how to speed it up some more. Those tools will decompile the dll but there are manual issues I'd need to fix.
FYI 300x300 takes 10ms on my machine
Also I wonder if the main page is wrong about being iframes only for vp8 now?
https://github.com/jcodec/jcodec/pull/467/commits
I converted the dll to source code and it builds and I can pass a sequence of images to create an mp4 file, however the output mp4 plays but isn't rendered correctly. Are you interested in the source code?
I'm not currently doing any codec work but it's one of those things that's always useful when you need it. Are you planning on putting the source code on GitHub? I'd certainly like to keep a link to it.
Yeah I plan to, I'll put the link here. I've just been messing around with different decompilers, different versions of ikvm and then even going back to the original java to do some file by file comparison.