🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #363

Re: Date and Time stamp in DV AVI

#363
From: Julio Farias
Date: Sat, 04 Sep 2004 19:54
55 lines
3364 bytes
On Mon, 30 Aug 2004 13:49:15 +1000, "Peter P" <pp1@comrad.com.au>
wrote:

>I would appreciate any assistance with explanation of where the time and
>date stamp of Digital Video (DV) AVI files is placed (in either Type 1 or
>Type 2 DV files). I have checked on MSDN for explanation but cannot find (or
>determine) where the stamp(s) are kept in the file.
>
What I'm going to tell you is in part the result of intensive search
in the net -with no much success, as you've probably seen by yourself-
and own experimentation. This means that in no way will I give general
advice, but simply tell what I've found.

All what follows refers to Type-1 DV AVI files. As you know this is
the format -headers apart- in which the stream is natively stored on
DV tape.

The DV stream is organized into 80-byte so-called DIF blocks; 150 of
them form a DIF sequence; an NTSC frame comprises 10 sequences (120000
bytes), a PAL one 12 (144000 bytes).
Each DIF sequence has 135 proper video blocks (image data), 9
interleaved audio blocks, the remaining 6 being:
	1 header block
	2 subcode blocks, where timecode resides
	3 VAUX blocks, where date/time is recorded, besides other data

To reach the subcode and VAUX blocks I first look for 'data chunks'
(terminology from MS "AVI RIFF File Reference"). In DV these are
identified by a '##dc' FOURCC; in my D8 streams it's normally '00dc'.
(Any decent hex editor will do the task)

Eight bytes past the beginning of the FOURCC, the header block starts,
identified by '1Fh'. 80 bytes beyond, the first subcode block begins
with '3Fh'. Here you can find the recording timecode in the '13h'
field with the format 'frame-second-minute-hour' (you have to subtract
40h, 80h, 80h and C0h respectively to get them in decimal values -BCD
really)

The VAUX blocks start with a '5Xh' identifier. I've seen written
somewhere that it should be '5Fh', but my SONY produces other
identifiers -always starting with 5. Here you'll go for the '62h' and
'63h' fields, to find

	62h: 'FF'-day-month-year (subtract C0h, E0h for day, month)

	63h: 'FF'-second-minute-hour (treat as in timecode)

Other fields in the VAUX give recording data -aperture, etc- I guess
but have no yet experimented with them.

Hope this helps. I'd recommend you to give a look at the 'libdv' free
code. It's easily found through Google and can give interesting info
to the curious.

Julio
Technical Details
Message-ID: <i37kj0p6hhugruv89p0kktsk85d9ippn7u@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4132a3bb$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,e809d7f7e59f5bf3
X-Google-Attributes: gid10d0fc,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Julio Farias <jfariasXXXX@uolsinectis.com.ar>
Newsgroups: borland.public.cppbuilder.multimedia
Subject: Re: Date and Time stamp in DV AVI
Date: Sat, 04 Sep 2004 15:54:23 -0400
Message-ID: <i37kj0p6hhugruv89p0kktsk85d9ippn7u@4ax.com>
References: <4132a3bb$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 216.244.219.212
X-Trace: newsgroups.borland.com 1094327612 216.244.219.212 (4 Sep 2004 12:53:32 -0700)
Lines: 55
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail