Relative Content

Tag Archive for pythonaudiobyteexiftool

Exiftool doesn’t include all metadata when ran from python

class Metadata(Enum): bit_rate_kbps: int sample_rate: int channel_mode: Literal[‘mono’, ‘audio’] file_name: str # includes extension file_size: int # mb file_ext: Literal[‘wav’] @classmethod def get_metadata_from_bytes(cls, audio: bytes): command = [‘exiftool’, ‘-json’, ‘-‘] try: # Start the exiftool process process = subprocess.Popen( command, stdin=subprocess.PIPE, # Pass data via stdin stdout=subprocess.PIPE, # Capture stdout stderr=subprocess.PIPE, # Capture stderr ) […]