Skip to article frontmatterSkip to article content

5.3File inputs

Faery supports reading neuromorphic event data from multiple file formats. This section covers all supported file types and their specific handling requirements.

5.3.1AEDAT4 files (.aedat4)

AEDAT4 is the standard format from iniVation for event camera data. It’s a container format that can hold multiple data streams.

5.3.1.1Command line

# Basic file conversion
faery input file input.aedat4 output file output.es

# Specify a specific track/stream (useful for multi-stream files)
faery input file input.aedat4 --track-id 1 output file output.es

5.3.1.2Python

import faery

# Read from AEDAT4 file
stream = faery.events_stream_from_file("input.aedat4")

# Specify track ID for multi-stream files
stream = faery.events_stream_from_file("input.aedat4", track_id=1)

5.3.1.3Format details

5.3.2ES files (.es)

ES is Faery’s native binary format, optimized for fast reading and minimal overhead.

5.3.2.1Command line

# Convert to ES format
faery input file input.raw output file output.es

# Read from ES with custom start time
faery input file input.es --t0 1000000 output file output.mp4

5.3.2.2Python

import faery

# Read ES file
stream = faery.events_stream_from_file("input.es")

# Specify start time offset (in microseconds)
stream = faery.events_stream_from_file("input.es", t0=1000000 * faery.us)

5.3.2.3Format details

5.3.3Prophesee RAW files (.raw)

Prophesee RAW is the native format from Prophesee event cameras.

5.3.3.1Command line

# Convert Prophesee RAW file
faery input file input.raw output file output.aedat4

# Specify dimensions if not in header
faery input file input.raw --dimensions-fallback 640x480 output file output.es

# Override version detection
faery input file input.raw --version-fallback evt3 output file output.es

5.3.3.2Python

import faery

# Read Prophesee RAW file
stream = faery.events_stream_from_file("input.raw")

# Specify fallback dimensions and version
stream = faery.events_stream_from_file(
    "input.raw",
    dimensions_fallback=(640, 480),
    version_fallback="evt3"
)

5.3.3.3Format details

5.3.4DAT files (.dat)

DAT is another format variant, similar to EVT but with different encoding.

5.3.4.1Command line

# Convert DAT file
faery input file input.dat output file output.aedat4

# Specify fallback parameters
faery input file input.dat --dimensions-fallback 1280x720 --version-fallback dat2 output file output.es

5.3.4.2Python

import faery

# Read DAT file with fallbacks
stream = faery.events_stream_from_file(
    "input.dat",
    dimensions_fallback=(1280, 720),
    version_fallback="dat2"
)

5.3.4.3Format details

5.3.5CSV files (.csv)

For human-readable data or custom formats, Faery supports CSV files with configurable column mapping.

5.3.5.1Command line

# Read CSV with default column mapping (t,x,y,p)
faery input file events.csv output file output.es

# Custom column indices and separator
faery input file events.csv --csv-t-index 0 --csv-x-index 1 --csv-y-index 2 --csv-p-index 3 --csv-separator ";" output file output.es

# CSV without header
faery input file events.csv --no-csv-has-header output file output.es

5.3.5.2Python

import faery

# Read CSV with default settings
stream = faery.events_stream_from_file("events.csv")

# Custom CSV properties
csv_props = faery.CsvProperties(
    has_header=True,
    separator=";",
    t_index=0,
    x_index=1,
    y_index=2,
    p_index=3
)
stream = faery.events_stream_from_file("events.csv", csv_properties=csv_props)

5.3.5.3Format details

5.3.6Format detection

Faery automatically detects file formats based on file extensions:

ExtensionFormat
.aedat4AEDAT4
.esES
.rawProphesee EVT
.datDAT
.csvCSV

5.3.6.1Override format detection

5.3.6.2Command line

# Force interpretation as specific format
faery input file mystery_file --file-type csv output file output.es

5.3.6.3Python

# Override automatic detection
stream = faery.events_stream_from_file("mystery_file", file_type="csv")

5.3.7Common parameters

All file input methods support these common parameters:

5.3.8Troubleshooting

File not recognized: Use --file-type or file_type= to override detection Dimension errors: Specify --dimensions-fallback or dimensions_fallback= Multi-stream confusion: Use --track-id or track_id= for AEDAT4 files CSV parsing issues: Check column indices and separator settings