Change safe_substitute to substitute to prevent silent errors
Fixed ffmpeg and ffprobe parameters to be OS-agnostic