MiniGlome / Tiktok-uploader

Python3 script to upload and schedule TikTok videos
195 stars 26 forks source link

Exporting in Spanish #8

Closed Azulitoquintero closed 1 year ago

Azulitoquintero commented 1 year ago

The issue I experienced is that when exporting the file in Spanish, for some reason, the filename still contained the characters "¿" and "?" which prevented me from creating the file.

The solution I applied to this was to change the following code in "final_video.py":

ffmpeg_extract_subclip( f"assets/temp/{reddit_id}/temp.mp4", 0, length, targetname=f"results/{subreddit}/{filename}.mp4",

to:

ffmpeg_extract_subclip( f"assets/temp/{reddit_id}/temp.mp4", 0, length, targetname=f"results/{subreddit}/{name_normalize(filename)}.mp4"

This change removes the mentioned punctuation marks from the filename, allowing me to name the file without any issues.