allow customizing the background image

This commit is contained in:
ceb515 2024-03-02 11:52:02 -05:00
parent b6abcb12a1
commit 7fbd02dff6
2 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,7 @@ def convert_to_mp4(mp3_file):
try:
time.sleep(10)
mp4_file = os.path.splitext(mp3_file)[0] + '.mp4'
command = f'ffmpeg -loop 1 -i img/blacksmall.jpg -i "{mp3_file}" -c:a aac -b:a 192k -c:v libx264 -pix_fmt yuv420p -shortest "{mp4_file}"'
command = f'ffmpeg -loop 1 -i "{secrets_file.image_path}" -i "{mp3_file}" -c:a aac -b:a 192k -c:v libx264 -pix_fmt yuv420p -shortest "{mp4_file}"'
subprocess.run(command, shell=True)
os.remove(mp3_file)
return mp4_file

View File

@ -11,4 +11,6 @@ channel_id = channel_id_number
## Generally a good idea.
delete_after_upload=True
## This will slow down pages and is unreliable.
speech_to_text = True
speech_to_text = True
## The background image for the video.
image_path = "img/blacksmall.jpg"