HeadlessBat hat kommentiert
08.06.2018 18:10 UhrDie Magenta Streams sind im übrigen relativ einfach herunterzuladen, man bekommt teilweise sogar noch die aus den Vorjahren, mit den richtigen Zahlen. Die Videos werden wohl alle unter
https://streaming-magenta-music-360.akamaized.net/vod/RAR2018_Bandname/hd/../
Der Bandname steht immer etwas komisch drin, also aus alt-J wird z.B. AltJ und aus Bullet for my Valentine BulletForMyValentine.
Auch findet man dann z.B. unter
https://streaming-magenta-music-360.akamaized.net/vod/RAR2017_FiveFingerDeathPunch/hd/../
Dann kann man sich weiter unter
https://streaming-magenta-music-360.akamaized.net/vod/RAR2017_FiveFingerDeathPunch/hd/6000/segment0.ts
unter
https://streaming-magenta-music-360.akamaized.net/vod/RAR2017_FiveFingerDeathPunch/hd/6000/index.m3u8
Mit dem Playlist File und den segment ts dateien (pro video knapp 600 Stück) kann man dann mit cmd
copy /b segment0.ts+segment1.ts+...
Ich hab dazu aber auch mal ein Python Skript geschrieben, weil das von Hand sehr aufwendig ist:
from urllib import request
import shutil
import os
quality = '0'
parts = 0
baseurl = "https://streaming-magenta-music-360.akamaized.net/vod/"
band = 'video'
def examineSizeAndData():
global parts
global quality
newpath = r'./temp/'
if not os.path.exists(newpath):
os.makedirs(newpath)
request.urlretrieve (baseurl+"index.m3u8", "temp/baseIndex.m3u8")
with open("temp/baseIndex.m3u8", 'r') as baseIndex:
if '6000/index.m3u8' in baseIndex.read():
quality = '6000'
print("quality 6000 kbit/s")
elif '3400/index.m3u8' in baseIndex.read():
quality = '3400'
print("quality 3400 kbit/s")
request.urlretrieve (baseurl+quality+"/index.m3u8", "temp/indexBitRate.m3u8")
with open("temp/indexBitRate.m3u8", 'r') as indexBitrate:
parts = indexBitrate.read().count('segment')
print(str(parts)+" segments")
def downloadAndMergeTs():
url = baseurl+quality+"/segment"
with open( band+'.ts', 'wb') as merged:
for i in range(0, parts):
with request.urlopen (url+str(i)+".ts") as part:
shutil.copyfileobj(part, merged)
def downloadVideo():
global baseurl
global band
band = input('Please name your wished concert in style like Bullet for my Valentine to BulletForMyValentine, no spaces every new word uppercase, example alt-j would be AltJ, so there are no minus or special character neither: \n'+
'Bitte nennen deinen gewünschten Künstler gemäß des Stream Namens, dabei keine Leerzeichen und jedes neue Wort groß, aus alt-J wird AltJ aus Bullte for my Valentine wird BulletForMyValentine usw. :')
baseurl = baseurl+"RAR2017_"+band+"/hd/"
examineSizeAndData()
downloadAndMergeTs()
downloadVideo()