> Would it be worthy feature request to allow drawtext to accept > integer values N > 1, and then reload the text file every Nth frame? > It seems like a win for CPU and I/O loading, with the benefit of > being fully backward compatible with existing scripts that read in > every 1 frame (e.g. reload=1). > > Or are there downsides to this that I’m not seeing?
I thought about something similar as I'm also overlaying infrequently changed data (temperature) onto video. However I ended up putting the file on a tmpfs partition so there's no actual disk IO, the whole thing sits in memory anyway. Have you tried benchmarking to see how much benefit you'd get from this optimisation? You could check CPU usage and I/O load with reload=1 and again with reload=0 and see what the difference is. Let us know what you find, as I haven't actually tried this myself so it would be interesting to know what the impact is of reading the file on every frame. > * and yes, I’m writing to weather.tmp and cping to weather.txt to > prevent a file I/O collision. Do you mean "mv" instead of "cp"? I don't think "cp" is atomic but "mv" is. Using "cp" won't break anything but you might get a frame here or there with incomplete data. Cheers, Adam. _______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
