def main():
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    p = ArgumentParser()
    p.add_argument('outfn', help='video file to save to disk.')
    p.add_argument('-i', '--ini', help='*.ini file with stream parameters')
    p.add_argument('-y',
                   '--yes',
                   help='no confirmation dialog',
                   action='store_true')
    p.add_argument('-t',
                   '--timeout',
                   help='stop streaming after --timeout seconds',
                   type=int)
    P = p.parse_args()

    s = pls.SaveDisk(P.ini, P.outfn, yes=P.yes, timeout=P.timeout)
    # %%
    if P.yes:
        print('saving screen capture to', s.outfn)
    else:
        input(f"Press Enter to screen capture to file {s.outfn}"
              "Or Ctrl C to abort.")

    s.save()
Ejemplo n.º 2
0
def test_disk(site):
    p = pls.SaveDisk(inifn, '')
    assert p.site == 'file'
    assert p.video_kbps == 3000
Ejemplo n.º 3
0
def test_props(site):
    p = pls.SaveDisk(inifn=None, outfn="")
    assert p.site == "file"
    assert p.video_kbps == 2000
Ejemplo n.º 4
0
def test_props(site):
    p = pls.SaveDisk(inifn=None, outfn='')
    assert p.site == 'file'
    assert p.video_kbps == 2000