
This video is only available to subscribers. Start a subscription today to get access to this and 469 other videos.
Handling Long Running Tasks
Episode
#468
|
21 minutes
| published on
November 19, 2020
| Uses Nova-3, Subprocess-1.1.0, Swift-5.3
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.
This episode is part of a series: Command Line Swift.