diff --git a/pagebot.py b/pagebot.py index f1927f8..5fcc557 100644 --- a/pagebot.py +++ b/pagebot.py @@ -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 diff --git a/sample-secrets_file.py b/sample-secrets_file.py index f5802dd..541ff8d 100644 --- a/sample-secrets_file.py +++ b/sample-secrets_file.py @@ -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 \ No newline at end of file +speech_to_text = True +## The background image for the video. +image_path = "img/blacksmall.jpg" \ No newline at end of file