[ Web Proxy ]
URL:
Viewing: https://thepythoncode.com/code/extract-media-metadata-in-python [Back]  [Original]

Code for How to Extract Video Metadata in Python - Python Code
Python Code [Python Code]  The Python Code Menu

Code for How to Extract Video Metadata in Python Tutorial


View on Github

extract_media_metadata.py

import ffmpeg
import sys
from pprint import pprint # for printing Python dictionaries in a human-readable way

# read the audio/video file from the command line arguments
media_file = sys.argv[1]
# uses ffprobe command to extract all possible metadata from the media file
pprint(ffmpeg.probe(media_file)["streams"])


Enter your email:
Python Code [Python Code]  The Python Code

Web Proxy Viewer  |  New URL  |  Original Page