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
FFmpeg's internal libraries (libavcode, libavformat and a few more) have a pretty complex code structure. You will need time to understand how basic things work, then you should try to write some simple test applications, and only then you will be able to replicate given command.
Hope it helps !
Check examples/muxing.c sources from the latest FFmpeg version. Try to provide an URL instead of output file. Check documentation/sources for
avformat_alloc_output_context2() function. Then you should get the basic idea how to add streaming support