Sometimes it’s due to local resource bottlenecks: network speed (from Recorders to client) and disk performance on the Recorders as well as on the client workstation.
In case of using privacy masks with exporting to .MKV or .AVI containers (or via MIP SDK), the footage will be re-encoded to MJPEG video, which is very CPU-intensive and as a result, it takes very long time and extreme amounts of disk space for the exports created.
In some cases, we have managed to speedup the performance using the RecorderConfig tool and increasing the Read Buffer values (requires some experimentation and restarting the Recorder multiple times). Regarding this, please check this KB: https://supportcommunity.milestonesys.com/KBRedir?art=000033266&lang=en_US
Regarding the export speed it is important to understand that the export, to work reliably and not break the recording, opens the media database and reads it the same way playback of the video does. Tweaking the speed is not an SDK question as the MIP SDK can only use the same methods as does the Smart Client. As this is rather a general issue please ask again in the support community, you should get better help from the partners using the support community.