aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-06-18 18:02:06 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-06-18 18:02:06 +0200
commitecb020250d89b6a25b9b6b4fadb33b585994e094 (patch)
tree0b5627dd994c5fea3888937c1f5feb56602557d2
parent48be679ec6cd31208c66e1d93cef213b0e44fce2 (diff)
Use "rtmpdump.exe" on Windows.
-rw-r--r--src/livestreamer/compat.py3
-rw-r--r--src/livestreamer/stream.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/livestreamer/compat.py b/src/livestreamer/compat.py
index 4e007fa..a0a055d 100644
--- a/src/livestreamer/compat.py
+++ b/src/livestreamer/compat.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
-import sys
+import sys, os
is_py2 = (sys.version_info[0] == 2)
is_py3 = (sys.version_info[0] == 3)
+is_win32 = os.name == "nt"
if is_py2:
input = raw_input
diff --git a/src/livestreamer/stream.py b/src/livestreamer/stream.py
index 486e620..a6aac3b 100644
--- a/src/livestreamer/stream.py
+++ b/src/livestreamer/stream.py
@@ -1,6 +1,6 @@
from livestreamer import options
from livestreamer.utils import urlopen
-from livestreamer.compat import str
+from livestreamer.compat import str, is_win32
import os
import pbs
@@ -48,7 +48,7 @@ class RTMPStream(StreamProcess):
def __init__(self, params):
StreamProcess.__init__(self, params)
- self.rtmpdump = options.get("rtmpdump") or "rtmpdump"
+ self.rtmpdump = options.get("rtmpdump") or (is_win32 and "rtmpdump.exe" or "rtmpdump")
self.params["flv"] = "-"
try: