Episode #468

Handling Long Running Tasks

Series: Command Line Swift

21 minutes
Published on November 19, 2020

This video is only available to subscribers. Get access to this video and 490 others.

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 uses Swift 5.3, Nova 3, Subprocess 1.1.0.

Comments are temporarily disabled.