Added support for webm videos
This commit is contained in:
@@ -39,14 +39,19 @@ for i in rjson['posts']:
|
||||
except SystemExit:
|
||||
os._exit(130)
|
||||
except:
|
||||
print("Cant convert data to image maybe not an image format")
|
||||
print("NO:" + str(i['no']))
|
||||
"""
|
||||
|
||||
try:
|
||||
ffmpeg.input(bstream).output(args.o + "/" + str(i['tim']) + ".mp4").run()
|
||||
#os.mkdir(args.o + "/" + ".temp/")
|
||||
#print("Bytes: " + str(bstream))
|
||||
with open(args.o + "/" + str(i['tim']) + i['ext'], 'wb') as f:
|
||||
f.write(bstream.getbuffer())
|
||||
f.close()
|
||||
#ffmpeg.input(args.o + "/" + ".temp/" + str(i['tim'])).output(args.o + "/" + str(i['tim']) + ".mp4").run()
|
||||
print("Saved video")
|
||||
except:
|
||||
print("Cant convert to Video")
|
||||
"""
|
||||
|
||||
except Exception as err:
|
||||
print("Cant convert data to image or video maybe not an image or video format")
|
||||
print("NO: " + str(i['no']))
|
||||
print(err)
|
||||
|
||||
time.sleep(1)
|
||||
print("Done!!")
|
||||
|
||||
Reference in New Issue
Block a user