Parallel.ForEach(Enumerable.Range(1, 10), i => { ExecuteFFmpegCommand("-i " + i + ".mp4 -vf \"select = eq(n\\, 0)\" -vframes 1 first_frame" + i + ".jpg -y"); });