Click here to Skip to main content
15,891,719 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using an API which gives live images from different sources (mainly from IP cameras). So I have few jpg images coming in each second.
My requirement is to produce a H.264 encoded MP4 live stream, that will be displayed in a browser (in HTML5 <video> element).
So, transform this live 'stream' of individual images, into a MP4 live stream.
The implementation must be done in C# (as frontend, but C/C++ can also be used), on Windows.
I have found some promising resources, but I don't know which to choose, nor it is clear to me if these have the capability to do what I want:
1) ffmpeg
2) MS Media Foundation

Also, maybe there is another useful resource to use?

Please advise.
Thank you in advance!
Posted
Comments
Sergey Alexandrovich Kryukov 23-Nov-15 17:18pm    
I would advise FFMpeg, it always worked for me; and yes, I did assemble video from individual images and extracted images from video.
—SA

1 solution

Please see my comment to the question. I cannot tell you for sure what to choose, not sure myself, but I can give your some words in favor or FFMpeg. I did not use Media Foundation, but I often heard the opinions that FFMpeg offers a much broader set of features compared to Media Foundation.

Please see some of my links in my past answers:
video (mp4) to Mp3 convert[^],
how to convert image to video in C#[^],
How to trim the video using Directshow!?[^],
How can I allow mp4 files to play in my software[^].

FFMpeg is highly universal, cross-platform, and it does not depend on 3rd-party products. Note that you can use FFMpeg (or libav) as just conversion utility, via starting a process, but you also can use one of the available .NET wrappers to use as a library; I provided some links in first 3 answers.

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900