diff options
Diffstat (limited to 'src/livestreamer')
-rw-r--r-- | src/livestreamer/cli.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py index 429c43d..5ce15c5 100644 --- a/src/livestreamer/cli.py +++ b/src/livestreamer/cli.py @@ -2,7 +2,7 @@ import sys, os, argparse, subprocess import livestreamer -from livestreamer.compat import input, stdout +from livestreamer.compat import input, stdout, is_win32 exampleusage = """ example usage: @@ -130,6 +130,10 @@ def output_stream(stream, args): if not out: exit("Failed to open a valid stream output") + if is_win32: + import msvcrt + msvcrt.setmode(out.fileno(), os.O_BINARY) + try: write_stream(fd, out, progress) except KeyboardInterrupt: |