I'm looking to replicate an FFmpeg command-line command in my C code. Specifically I would like to be able to run:
ffmpeg -re -i video.mp4 -f mpegts udp://localhost:7777
One thing I've noticed when looking at people's code who have used the libraries of FFmpeg in their own code is that they often have a few hundred lines of code for a single command similar to an FFmpeg command-line command. I'm guessing this is just because they are doing something very specific, because if I can run that short command on my command line and get what I want it should probably only take about ten lines of code to do the same thing in my C code. This should only take about that much work right? Why would it take much more?
I'm having a bit of difficulty finding explanations on how to use the streaming capabilities of the FFmpeg libraries that aren't overly complex because they're for a very specific purpose. Can anyone explain how I might go about writing the code for the above command? Or at the very least point me to some documentation explaining how to write such a script/program? Thank you much!
EDIT: I do hope to run this from an iPhone app eventually so I won't just be able to straight up call FFmpeg from my program. I'll need to use the libraries used by FFmpeg.