What I noticed is that if you shared the video directly to my mobile, it would not play the sound because the audio_codec needs to be set on aac ( audio_codec="aac" ) in your init.py file, this can cause confusion and would be great practice to implement that little line over there :
"video_with_text.write_videofile(
filename=output_file,
codec="libx264",
audio_codec="aac", # Ensure phone-compatible audio
fps=video.fps,
logger="bar" if print_info else None,
)
"
Other than that the code is pure gold. Congrats!