How to use c# to download or record RTMP live stream to my computer
I want to use C # WinForm to record live streams from RTMP and save videos for FLV format. Currently, I can call the ffmpeg.exe process through the C # Process class to achieve this, but because I need to build dozens of simultaneous downloads. The task, resulting in some problems, such as during the download process, sometimes the FFMPEG process will suddenly exit, this problem is very troublesome, I viewed through the task manager, this case is that the situation is in sudden CPU utilization to 100 %, Time very short, 1 second, actually my process doesn't do other operations, and I guarantee that my CPU resources are complete enough, that is, suppose that I call 20 FFMPEGs and record RTMP The task, for the 4-core CPU, the total utilization rate is only about 15-20, but I don't know why, suddenly a short 1 second causing 100% and then kill my ffmpeg, I It is unclear what the reason kills, if it is CPU kill, why do you do this, other such as memory, disk, and broadband are complete enough. If you can solve this problem, how can I prevent this behavior? If you can't stop, do I want to ask if there is any other replacement plan? C # itself can do it? Thank you so much