implement same, different files

This commit is contained in:
Xaloc 2020-05-13 15:20:11 +02:00
parent 7a40b46f81
commit d5e186d574

View File

@ -9,13 +9,13 @@ sep = input("Are audio and video in the Same or Different files? [S|D]")
sep = sep.lower() sep = sep.lower()
if not(sep=='s' or sep=='d'): if not(sep=='s' or sep=='d'):
raise ValueError("The answer should be S or D") raise ValueError("The answer should be S or D")
#video #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)
@ -34,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: