Thread View: borland.public.cppbuilder.multimedia
3 messages
3 total messages
Started by Peter P
Mon, 30 Aug 2004 03:49
Date and Time stamp in DV AVI
Author: Peter P
Date: Mon, 30 Aug 2004 03:49
Date: Mon, 30 Aug 2004 03:49
8 lines
1172 bytes
1172 bytes
Hi All, 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. Thanks for any help, Peter Philippa
Re: Date and Time stamp in DV AVI
Author: Julio Farias
Date: Sat, 04 Sep 2004 19:54
Date: Sat, 04 Sep 2004 19:54
55 lines
3364 bytes
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
Re: Date and Time stamp in DV AVI
Author: Peter P
Date: Sun, 05 Sep 2004 06:09
Date: Sun, 05 Sep 2004 06:09
61 lines
3727 bytes
3727 bytes
BIG Thanks Julio. I'll post the results, Peter "Julio Farias" <jfariasXXXX@uolsinectis.com.ar> wrote in message news:i37kj0p6hhugruv89p0kktsk85d9ippn7u@4ax.com... > 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads