is_video = True
-filename = "3x14x9 4x4 Piston Door.mp4"
+filename = "Rick Astley - Never Gonna Give You Up (Official Music Video) (online-video-cutter.com).mp4"
input_filename = os.path.join(input_path, filename)
output_filename = os.path.join(output_path, filename)
-output_filename_no_audio = os.path.join(output_path, "no audio" + filename)
+output_filename_no_audio = os.path.join(output_path, "no audio " + filename)
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
# density = "Ñ@#W$9876543210?!abc;:+=-,._ "
-# density = density[::-1]
density = ' .:-i|=+%O#@'
+# density = density[::-1]
density_length = len(density)
font = cv2.FONT_HERSHEY_COMPLEX_SMALL
font_size = 1
thick = 1
+# scale = 10
+# font_size = 1
+# thick = 1
+
def get_number(filename: str):
return int(filename[5:-4])
if (x % scale) or (y % scale):
continue
- if y == 0 and x > 0:
+ line += density[math.floor(find_index(image[index], 0, 255, 0, density_length - 1))]
+ if x == 0 and y > 0:
line += '\n'
# Write to txt file
- with open(os.path.join(text_art_txts_path,f"frame{get_number(path)}.txt"), "w") as f:
+ with open(os.path.join(text_art_txts_path, f"frame{get_number(path)}.txt"), "w") as f:
f.write(line)