def playback_settings(framecount, days, sleep_sec):
    """Determine how many frames to skip based on days for total movie
       playtime and sleep time between screen refreshes.
       Returns tuple of (sec-to-sleep, frames-to-skip).
    """
    sec_to_play = days * 24 * 60 * 60
    frames_to_display = sec_to_play / sleep_sec
    frames_to_skip = framecount / frames_to_display
    adjusted_sleep_sec = sleep_sec
    # If there aren't enough frames to last 'days',
    # determine how long we should sleep in order to
    # stretch it out.
    if frames_to_skip < 1:
        adjusted_sleep_sec = (sec_to_play / framecount)
        frames_to_skip = 0
    return (adjusted_sleep_sec, frames_to_skip)