Handling Long Running Tasks

Episode #468 | 21 minutes | published on November 19, 2020 | Uses Swift-5.3, Nova-3, Subprocess-1.1.0
Subscribers Only
When dealing with long running tasks it would be nice to be able to gather output as the task runs and not hang until the entire process is done. In this episode we will extract some useful information out of ffprobe, so we can get the total number of frames in a video file, and then kick off ffmpeg to encode the video. We'll use the Subprocess package to provide a simpler interface over gathering output from a pipe as it is sent, rather than waiting for the end.

Episode Links

blog comments powered by Disqus