[File] [PATCH] of Magdir/riff for VirtualDub link *.vdr + *.avi *.divx

Jörg Jenderek joerg.jen.der.ek at gmx.net
Fri Jul 10 15:30:56 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
some days ago i handled some video files.
When i run file command version 5.39 on VirtualDub links with file
name extension vdr and related videos i get an output like:

my-avi.avi:              RIFF (little-endian) data,
			 AVI, 640 x 480, 30.00 fps,
			 video: Motion JPEG
SharkTaleHD.divx:        RIFF (little-endian) data,
			 AVI, 720 x 384, 24.00 fps,
			 video: DivX 5,
			 audio: MPEG-1 Layer 3 (stereo, 44100 Hz)
virtualDub-3.vdr:        RIFF (little-endian) data
VirtualDub-Signpost.vdr: RIFF (little-endian) data
virualdub-mpg.vdr:       RIFF (little-endian) data

All samples are at least general described by Magdir/riff  with line
 0	string		RIFF		RIFF (little-endian) data
but sub type classification is missing for VirtualDub links.
Furthermore with --extension option only ??? is displayed.

Some information about such VirtualDub links is found on file
formats archive team website. That is now expressed by comment line
like:
 # URL:	http://fileformats.archiveteam.org/wiki/VDR_(VirtualDub)

More file formation information can be get from sources of
VirtualDub. This is expressed by reference comment line like
 # Ref.: sourceforge.net/projects/virtualdub/files/virtualdub-win/
 #	1.10.4.35491/VirtualDub-1.10.4-src.7z/src/vdremote/Main.cpp
According to documentation the second RIFF tag for VirtualDub link
is VDRM. That is expressed by additional line
 >8	string		VDRM		\b, VirtualDub link
Afterwards show a user defined mime type and file name extension by
lines like:
 !:mime	video/x-vdr
 !:ext	vdr
After that characteristic string comes the upcased phrase PATH,
that is followed by pascal string with remote-path to video file.
That information is shown by lines like:
 >>12	string		PATH		\b, PATH
 >>16	pstring/l	x		%s

To display file name extension for AVI videos i add after line with
mime type video/x-msvideo a line like:
 !:ext	avi/divx

After applying the above mentioned modifications by patch
file-5.39-riff-vdr_avi.diff then all VirtualDub links are
identified and i get also an extension output like:

my-avi.avi:              RIFF (little-endian) data,
			 AVI, 640 x 480, 30.00 fps,
			 video: Motion JPEG
SharkTaleHD.divx:        RIFF (little-endian) data,
			 AVI, 720 x 384, 24.00 fps,
			 video: DivX 5,
			 audio: MPEG-1 Layer 3 (stereo, 44100 Hz)
virtualDub-3.vdr:        RIFF (little-endian) data,
			 VirtualDub link, PATH
			 My-PC3/lc-record-2020-04-15.avi
VirtualDub-Signpost.vdr: RIFF (little-endian) data,
			 VirtualDub link, PATH
			 MyPC2/my-avi2.avi
virualdub-mpg.vdr:       RIFF (little-endian) data,
			 VirtualDub link, PATH
			 MyPC4/centaur_1.mpg

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

With best wishes
Jörg Jenderek
- --
Jörg Jenderek




-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXwiJjQAKCRCv8rHJQhrU
1leOAJwP6HuGLdQZCyhYsxM03Ww8EhcBIwCfWPXXhyzcqnZvK4imtBKoN9cSflI=
=Dg7z
-----END PGP SIGNATURE-----
-------------- next part --------------
--- file-5.39/magic/Magdir/riff.old	2020-06-15 00:01:01 +0000
+++ file-5.39/magic/Magdir/riff	2020-07-10 15:00:11 +0000
@@ -151,4 +151,9 @@
 # AVI == Audio Video Interleave
+# Reference:	http://fileformats.archiveteam.org/wiki/AVI
 >8	string		AVI\040		\b, AVI
+# https://reposcope.com/mimetype/video/x-msvideo
 !:mime	video/x-msvideo
+# https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml
+#!:mime	video/vnd.avi
+!:ext	avi/divx
 >>12    string          LIST
@@ -267,2 +272,13 @@
 >>>>>>>>(92.l+192)      lelong  x       %d Hz)
+# From:		Joerg Jenderek
+# URL:		http://fileformats.archiveteam.org/wiki/VDR_(VirtualDub)
+# Reference:	http://sourceforge.net/projects/virtualdub/files/virtualdub-win/
+#		1.10.4.35491/VirtualDub-1.10.4-src.7z/src/vdremote/Main.cpp
+# VirtualDub link handler
+>8	string		VDRM		\b, VirtualDub link
+!:mime	video/x-vdr
+!:ext	vdr
+>>12	string		PATH		\b, PATH
+# remote-path to video file
+>>16	pstring/l	x		%s
 # Animated Cursor format
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.39-riff-vdr_avi.diff.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20200710/27580d38/attachment.obj>


More information about the File mailing list