Refactor code to utils and ffmpeg-builder.