def mk_sample_video(dst, dur, w, h, rate, sar=None, dar=None):
    if os.path.exists(dst):
        return
    call = [
        settings['avutil'],
        '-loglevel', 'error',
        '-y',
        '-f', 'lavfi',
        '-i', 'smptebars=duration={}:size={}x{}:rate={}'.
        format(dur, w, h, str(rate))]
    vf = []
    if sar is not None:
        vf.append('setsar={}:{}'.format(sar.numerator, sar.denominator))
    if dar is not None:
        vf.append('setdar={}:{}'.format(dar.numerator, dar.denominator))
    if len(vf) > 0:
        call.extend(['-vf', ','.join(vf)])
    call.append(dst)
    if subprocess.call(call) == 1:
        raise RuntimeError
dataset/ETHPy150Open dthpham/butterflow/tests/test_avinfo.py/mk_sample_video/original