I have a c++ program that reads rendered images from shared-memory and writes them into a pipe(mkfifo), so that I can capture them with ffmpeg and stream them as live-video over ffserver. For my stream to work I have to start the program and the ffmpeg-command seperately. I asked myself if there isn't a possibility to include the ffmpeg into the program and avoid the pipe.
My ffmpeg command:
ffmpeg -re -f -rawvideo -s 800x600 -pix_fmt rgb24 -i myfifo http://localhost:8090/feed1.ffm
My question is:
What would be the best way to include the ffmpeg-command into the c++-program? Is there some other idea to improve this solution?
Any help is greatly appreciated. Thanks in advance.