From: Philipp Hagemeister Date: Sun, 2 Nov 2014 09:55:36 +0000 (+0100) Subject: [YoutubeDL] Include rtmpdump in exe versions -v output X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=4c83c96795b1bf469b0e290fc1cbbed6f49f04bf;p=youtube-dl [YoutubeDL] Include rtmpdump in exe versions -v output --- diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 73a372df4..f7c996c84 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -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()) diff --git a/youtube_dl/downloader/rtmp.py b/youtube_dl/downloader/rtmp.py index 5eb108302..17d9631fa 100644 --- a/youtube_dl/downloader/rtmp.py +++ b/youtube_dl/downloader/rtmp.py @@ -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):