import mimetypes
file_path = '/mnt/data/stock-footage-shiny-particles-sparks-rotating-magic-circle-fire-portal-spinning-fireworks-waving-sparklers-in.webm' file_type, _ = mimetypes.guess_type(file_path)
file_type