AVAssetWriter fail in background

We are using AVAssetWriter to write a movie file.
All works fine, but when the app goes into the background
and pauses operations, we would expect the writer to come back to life when you bring the app back into the foreground.
However, it does not, it fails with this error code.

Any hints, workarounds?

Error Domain=AVFoundationErrorDomain Code=-11847 "Operation Interrupted" UserInfo={NSLocalizedRecoverySuggestion=Stop other operations and try again., NSLocalizedDescription=Operation Interrupted, NSUnderlyingError=0x2820356b0 {Error Domain=NSOSStatusErrorDomain Code=-16121 "(null)"}}

This is expected behavior. The asset writer must give up encoding resources when your app goes into the background, and there is no way to reliably pick up where you left off once that happens.
Yes I have seen notes about this behavior in Stackoverflow etc. Thanks for the response! Do you know offhand if it is allowed to run the AVAssetWriter from a true background process: BGTaskScheduler? Apparently those allow more time than the app just going off into the background. Another alternative might be a software implementation of an MP4 writer that takes an AVAsset as input. Something like ffmpeg or something. Not as efficient, but pausing due to app sleeping might be less of an issue then.

Can you please explain more about this situation? What should be the workflow once the user goes into the background?

AVAssetWriter fail in background
 
 
Q