mirror of
https://github.com/majmongoose/PageBot.git
synced 2024-11-23 12:58:38 -05:00
allow customizing the background image
This commit is contained in:
parent
b6abcb12a1
commit
7fbd02dff6
@ -36,7 +36,7 @@ def convert_to_mp4(mp3_file):
|
|||||||
try:
|
try:
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
mp4_file = os.path.splitext(mp3_file)[0] + '.mp4'
|
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)
|
subprocess.run(command, shell=True)
|
||||||
os.remove(mp3_file)
|
os.remove(mp3_file)
|
||||||
return mp4_file
|
return mp4_file
|
||||||
|
@ -11,4 +11,6 @@ channel_id = channel_id_number
|
|||||||
## Generally a good idea.
|
## Generally a good idea.
|
||||||
delete_after_upload=True
|
delete_after_upload=True
|
||||||
## This will slow down pages and is unreliable.
|
## 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"
|
Loading…
Reference in New Issue
Block a user