-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_short.py
More file actions
51 lines (35 loc) · 1.7 KB
/
Copy pathgenerate_short.py
File metadata and controls
51 lines (35 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from create_short_video import create_video_short_with_image
from filter_content import filter_images_short
from generate_filename import generateFileName
from generate_short_description import generate_short_description
from generate_subtitles import generate_subtitle_file
from move_file_folder import move_file_to_folder
from script_short_writer import script_short_writer
from generate_voice import generateVoice
from srt_to_video import add_subtitles_to_video
def generate_short(url):
title, text = script_short_writer(url)
description = generate_short_description(text)
print(description)
print(title)
# # voice creation
# audio_file_name = generateFileName()
# generateVoice(audio_file_name, text, voice)
# # srt file
# # Write the combined video to a file
# print("\n\033[94mGenerating speech file...\033[0m\n")
# generate_subtitle_file(title, audio_file_name, channel)
# # create short video
# image_files = filter_images_short(images_short_directory)
# print(image_files)
# images_used = create_video_short_with_image(image_files, 7, audio_file_name, title, backgroundMusicShort, images_short_directory, channel)
# # add subtitles
# base_video_path = "output/videos/" + channel + "/" + title + "/"
# video_file = base_video_path + title + ".mp4"
# output_file = base_video_path + "short.mp4"
# add_subtitles_to_video(base_video_path, video_file, output_file)
# print('\nMoving images to history...\n')
# for image in images_used:
# file_path = images_short_directory + image
# move_file_to_folder(file_path, deleted_path + "images/")
# print("Title: " + title.capitalize().replace("_", " "))