Most modern smartphones (iPhone and Android) have "Portrait Video" or "Cinematic Mode." Use the "Blur" effect under the lens category. After Focus: Great for adding depth post-production.
Below is a basic Python example using libraries like tkinter for GUI, pytube for YouTube video downloading, and PIL for image handling: