add play_rtmpdump_stream()

This commit is contained in:
Mort Yao 2014-05-22 14:21:17 +02:00
parent 94b99128a5
commit 6dd119436b
2 changed files with 6 additions and 1 deletions

View File

@ -679,7 +679,8 @@ def download_rtmp_url(url, playpath, title, ext, total_size=0, output_dir='.', r
return return
if player: if player:
launch_player(player, url) from .processor.rtmpdump import play_rtmpdump_stream
play_rtmpdump_stream(player, url, playpath)
return return
from .processor.rtmpdump import has_rtmpdump_installed, download_rtmpdump_stream from .processor.rtmpdump import has_rtmpdump_installed, download_rtmpdump_stream

View File

@ -29,3 +29,7 @@ def download_rtmpdump_stream(url, playpath, title, ext, output_dir='.'):
subprocess.call(params) subprocess.call(params)
return return
def play_rtmpdump_stream(player, url, playpath):
os.system("rtmpdump -r '%s' -y '%s' -o - | %s -" % (url, playpath, player))
return