Skip to content

Instantly share code, notes, and snippets.

@mikeyaworski
Last active January 12, 2025 09:22
Show Gist options
  • Save mikeyaworski/1e849a03923e202c838f110c79bca68f to your computer and use it in GitHub Desktop.
Save mikeyaworski/1e849a03923e202c838f110c79bca68f to your computer and use it in GitHub Desktop.
FFplay Launcher
import subprocess
filtergraph_option = r'"drawtext=text=\'%{pts\:hms\}\':fontsize=48:fontcolor=white:box=1:boxborderw=6:[email protected]:x=(w-text_w)/2:y=h-text_h-20"'
# filtergraph_option = '"drawtext=text=\'%{pts\\:hms\\}\':fontsize=48:fontcolor=white:box=1:boxborderw=6:[email protected]:x=(w-text_w)/2:y=h-text_h-20"'
file_name = input('File: ')
if file_name:
try:
subprocess.run(f'ffplay -i "{file_name}" -vf {filtergraph_option}')
except Exception as e:
input(e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment