dcase_util.utils.FileFormat

class dcase_util.utils.FileFormat[source]
__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

detect(filename[, use_content_for_unknown])

Detect file format.

detect_based_on_content(filename)

Detect file format based on content by using python-magic.

detect_based_on_filename(filename)

Detect file format based on filename.

validate_label(label)

Validate file format label against labels known by this class

Attributes

AAC

Audio file (compressed), Advanced Audio Coding file

AC3

Audio file (compressed), Audio Codec 3 file

AIFF

Audio file, Audio Interchange File Format file

AMR

Audio file, Adaptive Multi-Rate audio codec file

ANN

Annotation file

AU

Audio file, AU file format

AVI

Video file, Audio Video Interleave File

CPICKLE

pickled Python object

CSV

Comma-separated values (CSV) file

FLAC

Audio file, Free Lossless Audio Codec (FLAC) file

FLV

Video file, Flash video

GIF

Image file, Graphical Interchange Format File

GZ

Compressed file, Gnu Zipped Archive

JPG

Image file, JPEG Image

JSON

JavaScript Object Notation (JSON) file

M4A

Audio file (compressed), MPEG-4 codec audio file

MARSHAL

Marshal Data Migration Model File

META

Annotation file

MKA

Audio file, Matroska audio

MKV

Video file, Matroska video

MOV

Video file, Apple QuickTime Movie

MP3

Audio file (compressed), MPEG-2 Audio Layer III file

MP4

Video file, MPEG-4 Video File

MPG

Video file, MPEG Video File

MSGPACK

MessagePack

NUMPY

Numpy data object

NUMPYZ

Numpy zip data object

OGG

Audio file (compressed)

PDF

Document file, Portable Document Format File

PNG

Image file, Portable Network Graphic

RA

Audio file (compressed), RealAudio files

RAR

Compressed file, WinRAR Compressed Archive

RAW

Raw binary file

SVG

Image file, Scalable Vector Graphics File

TAR

Consolidated Unix File Archive

TXT

TXT file

UNKNOWN

Unknown format

VOC

Audio file, Creative voice file

WAV

Audio file, Waveform Audio File Format (WAVE) file

WEBM

Video file

WMA

Audio file, Windows Media Audio File

WMV

Video file, Windows Media Video File

XML

Extensible Markup Language (XML) file

YAML

YAML file

ZIP

Compressed file, Zipped File