url = https://…/index_48k.m3u8
subprocess.call(['streamlink', url, 'best', '--hls-duration', time, '-o', 'out.ts'])