summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-01-11 20:51:08 -0600
committermsglm <msglm@techchud.xyz>2023-01-11 20:51:08 -0600
commit1d89ab4ab4325604a95b665faac83184a0e3f7e8 (patch)
tree6eebc1f1b6139b0cfee7d23367d1a046069d256a
parentf36ab6a55613b1ced7b414a8c16210943b422e16 (diff)
downloadcomedyGenerator-1d89ab4ab4325604a95b665faac83184a0e3f7e8.tar.gz
comedyGenerator-1d89ab4ab4325604a95b665faac83184a0e3f7e8.tar.bz2
comedyGenerator-1d89ab4ab4325604a95b665faac83184a0e3f7e8.zip
videos now convert to webm instead of being mp4
Justification for thsi is that ifunny has swapped to hvec for its encoding. This is a problem as hvec is not widely adopted and proprietary, so the videos are now being converted to webm instead. I greatly await the day we get av1 normalization so we can abandon these shitty codecs.
-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: