I&#x27;m writing some tools to capture video streams, doing demuxing&#x2F;muxing, decoding, etc. All of the libraries that do these things are written in C.<p>Using another language, aside from c++, would involve using some kind of ffi mapping, made by me or someone else. So now I not only have to understand the semantics of c and the libraries I&#x27;m using I have to understand the semantics of the ffi mapping.<p>Using the ffmpeg libraries I&#x27;ve had to dig into the source to figure out what it&#x27;s doing[0]. If I&#x27;m using python(or whatever) now I have to do that and figure out what the mapping is doing. And I&#x27;m still not safe from segfaults and memory leaks, they&#x27;re just harder to find and understand.<p>Soft realtime is trivial in C. If I&#x27;m capturing a video stream at 10fps I have about 100ms to do everything to handle a frame. This is very easy to do in c. If I&#x27;m using a garbage collected language I have 100ms-X, where X is the longest garbage collection pause.<p>I tried doing a similar project in java and found it very difficult. Using any library, for example to output a jpeg, created tons of garbage, resulting in long gc pauses. I tried a bunch of different -XXasdf options that helped but to really solving the problem would involve reimplementing a bunch of stuff to reuse buffers and avoid garbage. I freely admit this may be because of my ignorance of how to do it correctly but again it&#x27;s trivial to avoid these pauses in c.<p>So I ask sincerely what should I do? I&#x27;ll gladly throw out the years of painfully acquired c knowledge if you have a better solution for me today.<p>[0] I wonder why avformat_find_stream_info is detecting the from framerate? Good luck :) 
<a href="http:&#x2F;&#x2F;ffmpeg.org&#x2F;doxygen&#x2F;trunk&#x2F;libavformat_2utils_8c_source.html#l03123" rel="nofollow">http:&#x2F;&#x2F;ffmpeg.org&#x2F;doxygen&#x2F;trunk&#x2F;libavformat_2utils_8c_source...</a>