refactor video-processing stuff into its own file