refactor FFmpeg command execution