Compare commits

..

2 Commits

Author SHA1 Message Date
d5e186d574 implement same, different files 2020-05-15 16:58:11 +02:00
7a40b46f81 add logic for joined or separated audio and video 2020-05-03 03:54:39 +02:00

View File

@ -5,13 +5,17 @@ import wget as wget
from urllib.request import urlopen from urllib.request import urlopen
from urllib.error import HTTPError from urllib.error import HTTPError
#video sep = input("Are audio and video in the Same or Different files? [S|D]")
sep = sep.lower()
if not(sep=='s' or sep=='d'):
raise ValueError("The answer should be S or D")
#video o video+so si junt
i=0 i=0
while True: while True:
v = i v = i
i += 1 i += 1
#url del video!!!!!!!!!!!!!! #url del video!!!!!!!!!!!!!! o video+so si junt
url= 'https://house-fastly-signed-us-east-1-prod.brightcovecdn.com/media/v1/hls/v4/clear/3695997568001/0df46668-c157-40a2-aeab-845c32d4eae3/d7cb636b-ca37-4bed-9248-0e494c526027/5x/segment'+str(v)+'.ts?fastly_token=NWUxNzNiNWFfMmM3NDk0NGU1NjE4NWM0MTE3MWQ4NjY1MGIwMGNhOGE2ZWI2NTc1NmQ2N2E1ODc3YjhjNzkxMjlhOWQyZTUzM18vL2hvdXNlLWZhc3RseS1zaWduZWQtdXMtZWFzdC0xLXByb2QuYnJpZ2h0Y292ZWNkbi5jb20vbWVkaWEvdjEvaGxzL3Y0L2NsZWFyLzM2OTU5OTc1NjgwMDEvMGRmNDY2NjgtYzE1Ny00MGEyLWFlYWItODQ1YzMyZDRlYWUzL2Q3Y2I2MzZiLWNhMzctNGJlZC05MjQ4LTBlNDk0YzUyNjAyNy8%3D' #url from media request without de number and .ts at the end url= 'https://house-fastly-signed-us-east-1-prod.brightcovecdn.com/media/v1/hls/v4/clear/3695997568001/0df46668-c157-40a2-aeab-845c32d4eae3/d7cb636b-ca37-4bed-9248-0e494c526027/5x/segment'+str(v)+'.ts?fastly_token=NWUxNzNiNWFfMmM3NDk0NGU1NjE4NWM0MTE3MWQ4NjY1MGIwMGNhOGE2ZWI2NTc1NmQ2N2E1ODc3YjhjNzkxMjlhOWQyZTUzM18vL2hvdXNlLWZhc3RseS1zaWduZWQtdXMtZWFzdC0xLXByb2QuYnJpZ2h0Y292ZWNkbi5jb20vbWVkaWEvdjEvaGxzL3Y0L2NsZWFyLzM2OTU5OTc1NjgwMDEvMGRmNDY2NjgtYzE1Ny00MGEyLWFlYWItODQ1YzMyZDRlYWUzL2Q3Y2I2MzZiLWNhMzctNGJlZC05MjQ4LTBlNDk0YzUyNjAyNy8%3D' #url from media request without de number and .ts at the end
url=str(url) url=str(url)
print(url) print(url)
@ -30,8 +34,11 @@ while True:
os.system("cat *"+str(v)+".ts >> all.ts") os.system("cat *"+str(v)+".ts >> all.ts")
os.system("ffmpeg -i all.ts -acodec copy -vcodec copy video.mp4") os.system("ffmpeg -i all.ts -acodec copy -vcodec copy video.mp4")
if sep=='s':
os.system("mv video.mp4 output.mp4")
os.system("rm *.ts") os.system("rm *.ts")
if sep=='d':
#so #so
i=0 i=0
while True: while True: