[File] [PATCH] Magdir/iff AIFF audio *.aiff *.aif *.aff

Jörg Jenderek (GMX) joerg.jen.der.ek at gmx.net
Sun Jul 23 22:16:25 UTC 2023


Hello,

Some days ago i run Pirisoft ccleaner. Under item for file extension
under registry cleaner i can scan for errors. There it complains
about file name suffix AFF.

So i looked for such files on my systems. Some samples are audio files.
In this session i will only consider such audio samples. When running
file command version 5.44 on such audio samples i get an output like:

SCREAM.AFF:   IFF data, AIFF audio
example.aiff: IFF data, AIFF audio
ring_in.aif:  IFF data, AIFF audio

With option --extension only 3 byte sequence ??? is shown and with -i
option audio/x-aiff is shown.

For comparison reason i also run the file format identification
utility DROID ( See https://sourceforge.net/projects/droid/). It does
recognize the samples. These are here described as "Audio Interchange
File Format" by PUID fmt/414. Here 2 suffix AIFF/AIF are considered as
valid, but AFF not (See EXTENSION_MISMATCH true in appended
droid-aiff.csv.gz).

For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). All examples are
described with low priority as "Generic IFF container" with
mime type application/x-iff by iff-gen.trid.xml. The audio samples are
described with highest priority as "AIFF Audio Interchange File Format"
with mime type audio/x-aiff by audio-aiff.trid.xml. Here 3 suffix
(AIF/AIFF/AFF) are listed (See appended trid-v-aiff.txt.gz).

TrID list the used file name extension and often with -v option the
related URL pointing to used file format information. With the help
of these tools i found a page about IFF and AIFF on file formats archive
team. So this is now expressed inside Magdir/iff by additional comment
lines like:

# URL:	http://fileformats.archiveteam.org/wiki/IFF
#	http://fileformats.archiveteam.org/wiki/AIFF
#	https://en.wikipedia.org/wiki/Audio_Interchange_File_Format
# Reference:	http://mark0.net/download/triddefs_xml.7z
#	defs/a/audio-aiff.trid.xml

The detection happens inside Magdir/iff by first looking for keyword
FORM and then for AIFF. This looks like:
0	string		FORM		IFF data
  >8	string		AIFF		\b, AIFF audio
!:mime	audio/x-aiff

On many sites also mime type audio/aiff is mentioned, but when i look at
IANA there is such type not officially registered.  On Linux machines by
shared mime database the other type is used. This is also shown by file
command. So i mentioned it in comment line.

Often only 2 file name extensions (AIF/AIFF) are listed. On the new
reference site also a third suffix AFF is listed. On the site you can
also download such samples. It is not explained why but i assume that
are for historical reasons. The file format apparently starts on Amiga
systems and on Apple Macintosh computer systems. There the 4 byte suffix
aiff could be used. Because of limitations of old FAT file systems on
DOS only 3 byte suffix can be used. So in most cases here the suffix
shrinks now to AIF. Apparently on such file systems also the other 3
byte variant AFF is also used. So now all 3 possible file name suffix
are expressed by additional line like:
!:ext	aiff/aif/aff

After applying the above mentioned modifications by patch
file-5.44-iff-aiff.diff then my samples are now described like before
but with correct name suffix. This now then looks with option
--extension like:

SCREAM.AFF:   aiff/aif/aff
example.aiff: aiff/aif/aff
ring_in.aif:  aiff/aif/aff

I hope my diff file can be applied in future version of file
utility.

There is something to do. The suffix AFF is also used for other file
formats. I will try to handle these in a future session.

With best wishes,
Jörg Jenderek
--
Jörg Jenderek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: droid-aiff.csv.gz
Type: application/x-gzip
Size: 354 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20230724/44e1a9d2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trid-v-aiff.txt.gz
Type: application/x-gzip
Size: 499 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20230724/44e1a9d2/attachment-0001.bin>
-------------- next part --------------
--- file-5.44/magic/Magdir/iff.old	2022-04-11 16:07:12.000000000 +0200
+++ file-5.44/magic/Magdir/iff	2023-07-23 21:36:10.274281700 +0200
@@ -12,2 +12,3 @@
 
+# URL:		http://fileformats.archiveteam.org/wiki/IFF
 0	string		FORM		IFF data
@@ -15,4 +16,13 @@
 # audio formats
+# Update:	Joerg Jenderek
+# URL:		http://fileformats.archiveteam.org/wiki/AIFF
+#		https://en.wikipedia.org/wiki/Audio_Interchange_File_Format
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/a/audio-aiff.trid.xml
+# Note:		called "AIFF Audio Interchange File Format" by TrID and
+#		"Audio Interchange File Format" by DROID via PUID fmt/414
 >8	string		AIFF		\b, AIFF audio
 !:mime	audio/x-aiff
+# not officially registered
+#!:mime	audio/aiff
+!:ext	aiff/aif/aff
 >8	string		AIFC		\b, AIFF-C compressed audio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.44-iff-aiff.diff.sig
Type: application/octet-stream
Size: 608 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20230724/44e1a9d2/attachment.obj>


More information about the File mailing list