diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-10-17 19:58:13 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-10-17 19:58:13 -0700 |
commit | 4c07546e7a5e5882abdda896009b744e947df1c4 (patch) | |
tree | 25870ecb94999df109895840810609e1d2167d96 /youtube_dl/downloader/rtsp.py | |
parent | 9abb83fdbc05294f186daeefff8c85cfda06b7d2 (diff) | |
download | yt-local-4c07546e7a5e5882abdda896009b744e947df1c4.tar.lz yt-local-4c07546e7a5e5882abdda896009b744e947df1c4.tar.xz yt-local-4c07546e7a5e5882abdda896009b744e947df1c4.zip |
Extraction: Replace youtube-dl with custom-built watch page extraction
Diffstat (limited to 'youtube_dl/downloader/rtsp.py')
-rw-r--r-- | youtube_dl/downloader/rtsp.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/youtube_dl/downloader/rtsp.py b/youtube_dl/downloader/rtsp.py deleted file mode 100644 index 939358b..0000000 --- a/youtube_dl/downloader/rtsp.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import unicode_literals - -import os -import subprocess - -from .common import FileDownloader -from ..utils import ( - check_executable, - encodeFilename, -) - - -class RtspFD(FileDownloader): - def real_download(self, filename, info_dict): - url = info_dict['url'] - self.report_destination(filename) - tmpfilename = self.temp_name(filename) - - if check_executable('mplayer', ['-h']): - args = [ - 'mplayer', '-really-quiet', '-vo', 'null', '-vc', 'dummy', - '-dumpstream', '-dumpfile', tmpfilename, url] - elif check_executable('mpv', ['-h']): - args = [ - 'mpv', '-really-quiet', '--vo=null', '--stream-dump=' + tmpfilename, url] - else: - self.report_error('MMS or RTSP download detected but neither "mplayer" nor "mpv" could be run. Please install any.') - return False - - self._debug_cmd(args) - - retval = subprocess.call(args) - if retval == 0: - fsize = os.path.getsize(encodeFilename(tmpfilename)) - self.to_screen('\r[%s] %s bytes' % (args[0], fsize)) - self.try_rename(tmpfilename, filename) - self._hook_progress({ - 'downloaded_bytes': fsize, - 'total_bytes': fsize, - 'filename': filename, - 'status': 'finished', - }) - return True - else: - self.to_stderr('\n') - self.report_error('%s exited with code %d' % (args[0], retval)) - return False |