1 | initial version |
I think your problem is not a opencv problem but I hope this answer will help you.
In this program I make a screen copy at 20 fps and send image to ffmpeg. i don't use pipe but socket. I use this command line :
ffmpeg -f rawvideo -pixel_format rgb24 -video_size 640x480 -i "tcp://127.0.0.1:2345" -codec:v libx264 -pix_fmt yuv420p Video.mp4
to run ffmpeg and then send data to port 2345 using socket
sock->Write(b.GetData(), nb);
I don't encode frame it is raw data