Real-time video encoding for mobile devices

Does anyone know how to re-encode in real time (the target formats are 3GP s263 AMR narrowband and MP4 mp4v mp4a, but not at the same time, of course. The input files will be WMV, but the more input data the formats are supported better) ?

We are currently performing asynchronous processing using the C # service, which calls the ffmpeg command line, but the idea of โ€‹โ€‹doing this for a synchronous request is a small suboptimal reason why the user ends up waiting quite a while before playing (Although, if this is the best scenario, give know me, and I think that I will live with him).

It would be great if we could simultaneously maintain the file and save it (so that we could store it for future requests), but that would not be a disaster if we could not do it.

As a side element, I would prefer to avoid a streaming solution, since fewer devices will support it, but if there is no good way to do what I want, I would like to hear alternatives, even if they are connected with streaming.

Update

Just to keep you up to date with the latest events that Iโ€™ve gotten to, Iโ€™m now playing with the idea of โ€‹โ€‹writing a wrapper that directly accesses the FFmpeg DLL and not the exe, starting to think that I can be able to get the functionality after that. (Data capture gradually, and not once, all this will make me close enough to be enough in real time).

Keep playing whether this will work and trying to find good examples of how to do it (even those written in c, not C #, because it will show how to interact with the DLL).

+4
source share
2 answers

As for the streaming solution, we used MediaCuite.net StreamCoders . It worked fine for us to stream any MPG-based video to 3GP / H263. However, you must know exactly what you are doing in terms of specifications, formats, encodings, etc. The huge field and their product do not "explain" some of the basic terms, they assume that you already know what you are doing. In addition, as far as I remember, you need to manually synchronize the audio and video channels. Their demo application shows how to do this (but again, this is just a demo application, so you can complete your optimization).

I think you can use it for re-encoding, as well as for streaming, I have not tried this myself lately. How do you plan to output the result? How is System.IO.MemoryStream ?

Another streaming solution is to have a well-known streaming server, such as Xenon , and use it using "back-to-back": your handler receives the request and creates a request to the streaming server. The response of the streaming server is passed to the client. This is a kind of hack, but it did a great job for us for a while.

Your ffmpeg solution is fine, and you may find it easier to implement and not to convert in near real time at a lower level. If you can "endure" it, it might be better to leave it as it is.

Update . If you end up wrapping ffmpeg with a .Net library, which seems like a great solution, since ffmpeg is a great library, it would be great if you could share your solution. We tried to play with him, but we did not have enough time.

+1
source

I played with real-time encoding for presentations and user group meetings. The best solution I found was Microsoft Expression Encoder. The included SDK is fairly easy to use and should provide most of the necessary features.

+1
source

All Articles