[YoutubeDL] Include rtmpdump in exe versions -v output
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 2 Nov 2014 09:55:36 +0000 (10:55 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 2 Nov 2014 09:55:36 +0000 (10:55 +0100)
youtube_dl/YoutubeDL.py
youtube_dl/downloader/rtmp.py

index 73a372df4724e05607acd0fb202ad7e774f680cc..f7c996c84f76a907de1c0772f190d10d2f0af8e1 100755 (executable)
@@ -62,6 +62,7 @@ from .utils import (
 from .cache import Cache
 from .extractor import get_info_extractor, gen_extractors
 from .downloader import get_suitable_downloader
+from .downloader.rtmp import rtmpdump_version
 from .postprocessor import FFmpegMergerPP, FFmpegPostProcessor
 from .version import __version__
 
@@ -1321,6 +1322,7 @@ class YoutubeDL(object):
             platform.python_version(), platform_name()))
 
         exe_versions = FFmpegPostProcessor.get_versions()
+        exe_versions['rtmpdump'] = rtmpdump_version()
         exe_str = ', '.join(
             '%s %s' % (exe, v)
             for exe, v in sorted(exe_versions.items())
index 5eb108302339ec1678458fd8572c219a0980200b..17d9631faa54613dcd8c910231a428cad2389c60 100644 (file)
@@ -12,9 +12,15 @@ from ..utils import (
     compat_str,
     encodeFilename,
     format_bytes,
+    get_exe_version,
 )
 
 
+def rtmpdump_version():
+    return get_exe_version(
+        'rtmpdump', ['--help'], r'(?i)RTMPDump\s*v?([0-9a-zA-Z._-]+)')
+
+
 class RtmpFD(FileDownloader):
     def real_download(self, filename, info_dict):
         def run_rtmpdump(args):