summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcomedyGenerator8
1 files changed, 8 insertions, 0 deletions
diff --git a/comedyGenerator b/comedyGenerator
index 19392e0..a5206b1 100755
--- a/comedyGenerator
+++ b/comedyGenerator
@@ -213,12 +213,15 @@ for tags in args.tags:
print("Now running for " + str(video))
urlsplit = video.split('.')
+ if args.verbose:
+ print("url split = " + str(urlsplit))
if len(name) > 200:
if args.verbose:
print("shortening name because its too long")
name = name[0:200]
name = name.replace('"', "")
outputPath = args.output + tags + " - " + name + "." + urlsplit[len(urlsplit)-1]
+ convertedOutputPath = args.output + tags + " - " + name + "." + "webm"
if args.verbose:
print("name read as: " + name)
if os.path.exists(outputPath):
@@ -226,6 +229,11 @@ for tags in args.tags:
else:
print("saving " + video + " as " + name)
urllib.request.urlretrieve(video, outputPath)
+ if args.verbose:
+ print("converting " + outputPath + " to " + convertedOutputPath)
+ os.system("ffmpeg -i \"" + outputPath + "\" \"" + convertedOutputPath + "\"")
+ if args.verbose:
+ print("converting complete!")
if args.jobs > 1 and args.noDownload == False:
pool = Pool(args.jobs)
for video in videos: