Log in

View Full Version : HDVInfo v0.93


paviko
15th April 2006, 15:31
HDVInfo v0.93

Link (https://web.archive.org/web/20120419204535/http://strony.aster.pl/paviko/hdvinfo0.93.zip)

This FILTER grabs the timestamp and recording date info out of a M2T-D2V file. You can specify the time/date as an expression which is then subtitled on the video clip. It reads also for HDV camcorder setting during capture - aperture, shutter speed, gain.
HDVInfo use .d2v files created by DGIndex.

Known supported HDV camcorders:
Sony HDR-HC3, HDR-HC1, HVR-A1, HDR-FX1, HVR-Z1

Usage for HDV:
file="c:\clip.d2v" # so you don't need to type the filename twice

MPEGsource(file) #open the video content
HDVInfo(file) # reads the recording timestamp

Version changes:
Version 0.93 - 09.09.2006
- removed DVInfo code till license clarification
Version 0.92 - 22.04.2006
- fixed bug with Daylight Saving Time
Version 0.91 - 22.04.2006
- fixed bug with local time conversion

Limitation to solve for version 1.0:
- only first file is read from d2v file (so there is a need to create separate d2v file for every m2t file)
- timestamp accuracy is 2-3 frames, so there is a need to add scene change detection to overcome this limitation

Syntax:
HDVInfo(filename, output, x, y, font, size, text_color, halo_color,
rec_format, tc_format, show_error, threshold, autoframes, autodelay, align,
data_code, correct)

filename - name of the input file, it can be .avi or .d2v file extension
x - x position within frame
y - y position within frame
font - font name (defult "Arial")
size - size of the text (default 18)
text_color - color of the text in hexadecimal 0xRGB, where R,G,B is from 00 to ff (default 0xe0e0e0 - gray)
halo_color - color of the halo around text in hexadecimal 0xRGB, where R,G,B is from 00 to ff (default 0x000000 - black)
rec_format - format of the display text - look below (default "%#x, %X")
tc_format - time code format, not supported for HDV now
show_error - indicates whether to display error messages (default true)
[b]threshold - With "threshold">0 the output is switched on if there is a difference of the recording date between
current and last frame which is bigger than "threshold" seconds (default 0)
autoframes - number of frames to display text in auto mode (for threshold > 0)
autodelay - number of frames in auto mode after which text will be displayed (for threshold > 0)
align - alignment of the text (default 3):
1 - left-bottom
2 - center-bottom
3 - right-bottom
4 - left-baseline
5 - center-baseline
6 - right-baseline
7 - left-top
8 - center-top
9 - right-top
data_code - if true, then info about aperture, shutter and gain is added to timestamp
correct - correction of the timestamp in seconds
output - variable to which output timestamp (default "rec_time")

Set Avisynth variables:
current_frame - frame number
rec_time - string of time and date
tc_time - string of timecode (only DV)
aperture - camcorder setting aperture in F stops (only HDV)
gain - camcorder setting gain in dB (only HDV)
shutter - camcorder setting shutter - denominater, eg. for 1/100 the value is 100 (only HDV)


Formats for "rec_format" parameter:
%a Abbreviated weekday name
%A Full weekday name
%b Abbreviated month name
%B Full month name
%c Date and time representation appropriate for locale
%d Day of month as decimal number (01 ? 31)
%H Hour in 24-hour format (00 ? 23)
%I Hour in 12-hour format (01 ? 12)
%j Day of year as decimal number (001 ? 366)
%m Month as decimal number (01 ? 12)
%M Minute as decimal number (00 ? 59)
%p Current locale?s A.M./P.M. indicator for 12-hour clock
%S Second as decimal number (00 ? 59)
%U Week of year as decimal number, with Sunday as first day of week (00 ? 53)
%w Weekday as decimal number (0 ? 6; Sunday is 0)
%W Week of year as decimal number, with Monday as first day of week (00 ? 53)
%x Date representation for current locale
%X Time representation for current locale
%y Year without century, as decimal number (00 ? 99)
%Y Year with century, as decimal number
%z, %Z Time-zone name or abbreviation; no characters if time zone is unknown
%% Percent sign
The # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows:
%#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#% # flag is ignored.
%#c Long date and time representation, appropriate for current locale. For example: ?Tuesday, March 14, 1995, 12:41:29?.
%#x Long date representation, appropriate to current locale. For example: ?Tuesday, March 14, 1995?.
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y Remove leading zeros (if any).

Backwoods
16th April 2006, 01:50
That's great! I PMed Warp about something like this, but he was not sure how to go about or I think uninterested. I'm glad you did this, thank you very much.

Backwoods
21st April 2006, 22:14
How would I go about making "rec_format" blank?

paviko
22nd April 2006, 10:07
How would I go about making "rec_format" blank?
Backwoods what do you mean by blank? Without stamp? Then rec_format = "" should not display any text on clip.

Version 0.91
Fixed error with UTC time conversion. The date was wrongly changing according to localization (the farther from GMT 0, the more hours were shifted).

Regards

paviko
22nd April 2006, 16:33
Version 0.92
Fixed bug with Daylight Saving Time :)

Regards

Backwoods
22nd April 2006, 18:07
I'll test your updates tonight or tomorrow. Thanks again.

Fizick
14th August 2006, 05:16
where is sourcecode of hdvinfo (GPL)?

paviko
2nd September 2006, 21:27
The target license will be GPL. Currently it's just freeware.

Regards

Wilbert
3rd September 2006, 16:24
If it is based on DVInfo you will have to make it GPL once you distribute it.

As a separate question, are you going to make you wonderful plugin HdrAgc GPL? (I know you talked about it before and you were not sure about it.)

paviko
9th September 2006, 15:40
Hi.
I've removed DVInfo code till license clears up. Reasons are the same as with HDRAGC.
I was sure to release HDRAGC as GPL, but now there is possibility that the code will be used in commercial application, so GPL doesn't fit here. If it won't be used commercially then I'll switch to GPL.

Version 0.93
- removed DVInfo code till license clarification


Thank you

spyros78
27th May 2008, 16:18
Hi all,

has anyone managed to make this plugin work? I get the following error:

CAVIStreamSynth: System exception - Access Violation at 0x0, reading from 0x0

Apparently other users have had this issue before with other plugins and its related to memory but I haven't found any way to resolve it.

Any ideas?

Many thanks
sp.

spyros78
29th May 2008, 12:08
Managed to make it work by unintalling avisynth, ffdshow and reinstalling them back.

thanks.

Andi
22nd January 2009, 17:36
Hi there,
I have a problem with using HDVInfo to implement the timestamp into my video. I captured the video from my sony hdr-hc1 PAl by using HDVSplit 0.77, then ran DGIndex 1.53 to extract the timestamp. When I then insert the timestamp via virtualdub and avisynth it looks like success but damn it... watching the video I realize, the the timestamp is drifting... it is slower than it has to be. It's a difference of about 10%.

Is there anyone able to help me out?

Thank's
Andi

nhope
28th April 2011, 06:28
I would like to use this plug-in to get the aperture, shutter speed and gain values of my HDV clips shot with a Sony Z1.

I opened a myvideo.m2t in DGIndex and made myvideo.d2v by choosing "File > save project".

I then saved the following text as HDVInfo1.avs

file="D:\My Videos\myvideo.d2v" # so you don't need to type the filename twice
MPEGsource(file) #open the video content
HDVInfo(file) # reads the recording timestamp

When I open HDVInfo1.avs in VirtualDub I get the message There is no function named "MPEGsource".

So apparently I need to load MPEGsource from somewhere, but I don't know where. Can anyone help?

Thanks

kypec
28th April 2011, 07:24
So apparently I need to load MPEGsource from somewhere, but I don't know where. Can anyone help?
Thanks
Include this line to your AVS script (above the MPEGSource call)
LoadPlugin("Path to your DG plugin\DGDecode.dll")

nhope
28th April 2011, 08:24
Thanks kypec, but I still get the same error. Script is now:

LoadPlugin("C:\Program Files\DGMPGDec\DGDecode.dll")
file="D:\My Videos\0-HDV-50i-sample.d2v" # so you don't need to type the filename twice
MPEGsource(file) #open the video content
HDVInfo(file) # reads the recording timestamp

Gavino
28th April 2011, 09:42
MPEGsource(file) #open the video content
Should be MPEG2Source(...)

nhope
28th April 2011, 12:59
Thanks Gavino, and now I have it displaying the date and time.

Does anyone know how I would get it to display aperture, gain and shutter? The instructions are not clear to me.

Gavino
28th April 2011, 13:07
Set data_code=true?
data_code - if true, then info about aperture, shutter and gain is added to timestamp

nhope
28th April 2011, 14:01
Thanks again Gavino. Now I have it working on clips that I have captured using Paviko's own HDVSplit. This script is useful for seeing the aperture, shutter and gain of clips once they are on the computer, escpecially clips shot with auto settings. Previously I could only see that info on the camera while the tape was playing back.

However this process is quite laborious. If anyone knows of an easier way to dig that info out of an HDV .m2t file then please let us know.

It's a shame that Paviko stopped development of this and HDVSplit. I'm sure it would have been pretty easy to get HDVSplit to output aperture, shutter and gain info into a text file or something while capturing.

Anyway this is the script I have ended up with:

LoadPlugin("C:\Program Files\DGMPGDec\DGDecode.dll")
file="D:\My Videos\myvideo.d2v" # so you don't need to type the filename twice
MPEG2source(file) # open the video content
HDVInfo(file, size=48, align=2, data_code=true) # reads the recording timestamp

shpitz
21st May 2014, 16:40
Can someone provide a link to the zip? looks like Paviko's site is dead.

Thanks!

Reel.Deel
22nd May 2014, 01:43
Can someone provide a link to the zip? looks like Paviko's site is dead.

Oops, I had posted the links to HDVSplit and not HDVInfo :o (I deleted that post to avoid confusion).
Here's the correct link to HDVInfo v0.93:
https://web.archive.org/web/20120419204535/http://strony.aster.pl/paviko/hdvinfo0.93.zip

Edit: While I'm at it, I also updated paviko's links over at AviSynth wiki. Maybe one of the moderators can update the link to the first post.

Edit 2: ↓↓↓ Thanks foxyshadis.

foxyshadis
22nd May 2014, 03:05
Edit: While I'm at it, I also updated paviko's links over at AviSynth wiki. Maybe one of the moderators can update the link to the first post.

Sure, no problem. Thanks for tracking it down.