Faster way to write image to Process.StandardInput.BaseStream

前端 未结 1 1023
[愿得一人]
[愿得一人] 2021-02-06 14:05

Im trying to send a lot of desktop captured images to an encoders (FFmpeg) stdin.

The following code example works.

the CaptureScreen() function pro

1条回答
  •  闹比i
    闹比i (楼主)
    2021-02-06 14:39

    The bottleneck here is that ffmpeg reads data at the same speed it compresses it to .avi, which is slow. So your img.Save method blocks until there is some space in the stream's buffer to write its data.

    There is not much you can do. Compressing 60 fps HD video in real time require a huge processing power.

    0 讨论(0)
提交回复
热议问题