Converting BLF to MF4 might sound like a niche, technical chore, but it's quietly fascinating—an intersection of automotive forensics, data preservation, and tooling ergonomics. Here’s a compact, interesting take.
#!/bin/bash
for file in *.blf; do
base=$(basename "$file" .blf)
echo "Converting $file to $base.mf4"
python -c "from asammdf import MDF; MDF('$file').save('$base.mf4', compression=2)"
done
class BLFHandler(FileSystemEventHandler): def on_created(self, event): if event.src_path.endswith('.blf'): mdf = MDF(event.src_path) mdf.save(event.src_path.replace('.blf', '.mf4'), compression=2) convert blf to mf4 new
You need: Python 3.8+ installed.
blf2mdf.exe --input recording.blf --output result.mf4 --bus CAN --timestamps absolute
Easier: Use the mdf4 command line tool (installed with asammdf) Review — "Convert BLF to MF4 (new)" Converting
Final Recommendation: Do not stick to BLF. The industry has moved. If you are starting a new test campaign today, log natively to MF4 new. If you have a hard drive full of old BLF files, use the asammdf batch script below to convert them all. How it works: It bypasses the GUI entirely
The asammdf library is a powerful tool for reading, writing, and editing MF4 files.
| Tool | BLF size | MF4 size (compressed) | Time (min:sec) | RAM peak | |------|----------|----------------------|----------------|----------| | asammdf (Python) | 500 MB | 380 MB | 1:20 | 1.2 GB | | CANape (native) | 500 MB | 390 MB | 0:45 | 800 MB | | mdf4lib (C) | 500 MB | 370 MB | 0:28 | 450 MB | | PyViSim | 500 MB | 410 MB | 8:10 | 1.8 GB |