Relative Content

Tag Archive for c#ffmpegcrash

ffmpeg crash when updating overlay file (c# console app)

I am trying to develop a colsole app that can record the screen and have cpu/ram/gpu usage of the machine noted on the recording. The problem i am facing is that after a while (2-3 hours) the recording stops because ffmpeg is trying to read the filetext while my C# code tries to update the file. I managed to find out that I should use a temp file and replace the original instead of rewriting the whole file but that way I encounter another problem, ffmpeg will try to read the file while the file is replaced or even for that split second when is considered deleted. Any ideas what I should do? How should the method with the temp file be managed or how can I make the method that updates the same file stable? I was even thinking to increment the ffmpeg reload frames since it might narrow the chances of crashing but it’s not a 100% crash proof solution.