Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th April 2006, 15:31   #1  |  Link
paviko
Registered User
 
Join Date: Mar 2005
Location: Poland
Posts: 85
HDVInfo v0.93

HDVInfo v0.93

Link

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:
Code:
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
[b]show_error - indicates whether to display error messages (default true)
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).
__________________
HDR AGC - enlighten your clips
HDVSplit - capture High Definition Video
HDVInfo - timestamp your HDV clips

Last edited by foxyshadis; 22nd May 2014 at 03:05. Reason: Archived link
paviko is offline   Reply With Quote
Old 16th April 2006, 01:50   #2  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
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 is offline   Reply With Quote
Old 21st April 2006, 22:14   #3  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
How would I go about making "rec_format" blank?
Backwoods is offline   Reply With Quote
Old 22nd April 2006, 10:07   #4  |  Link
paviko
Registered User
 
Join Date: Mar 2005
Location: Poland
Posts: 85
Quote:
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
__________________
HDR AGC - enlighten your clips
HDVSplit - capture High Definition Video
HDVInfo - timestamp your HDV clips
paviko is offline   Reply With Quote
Old 22nd April 2006, 16:33   #5  |  Link
paviko
Registered User
 
Join Date: Mar 2005
Location: Poland
Posts: 85
Version 0.92
Fixed bug with Daylight Saving Time

Regards
__________________
HDR AGC - enlighten your clips
HDVSplit - capture High Definition Video
HDVInfo - timestamp your HDV clips
paviko is offline   Reply With Quote
Old 22nd April 2006, 18:07   #6  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
I'll test your updates tonight or tomorrow. Thanks again.
Backwoods is offline   Reply With Quote
Old 14th August 2006, 05:16   #7  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
where is sourcecode of hdvinfo (GPL)?
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 2nd September 2006, 21:27   #8  |  Link
paviko
Registered User
 
Join Date: Mar 2005
Location: Poland
Posts: 85
The target license will be GPL. Currently it's just freeware.

Regards
__________________
HDR AGC - enlighten your clips
HDVSplit - capture High Definition Video
HDVInfo - timestamp your HDV clips
paviko is offline   Reply With Quote
Old 3rd September 2006, 16:24   #9  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,299
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.)
Wilbert is offline   Reply With Quote
Old 9th September 2006, 15:40   #10  |  Link
paviko
Registered User
 
Join Date: Mar 2005
Location: Poland
Posts: 85
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
__________________
HDR AGC - enlighten your clips
HDVSplit - capture High Definition Video
HDVInfo - timestamp your HDV clips
paviko is offline   Reply With Quote
Old 27th May 2008, 16:18   #11  |  Link
spyros78
Registered User
 
Join Date: Sep 2006
Posts: 47
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 is offline   Reply With Quote
Old 29th May 2008, 12:08   #12  |  Link
spyros78
Registered User
 
Join Date: Sep 2006
Posts: 47
Managed to make it work by unintalling avisynth, ffdshow and reinstalling them back.

thanks.
spyros78 is offline   Reply With Quote
Old 22nd January 2009, 17:36   #13  |  Link
Andi
Registered User
 
Join Date: Jan 2009
Posts: 1
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
Andi is offline   Reply With Quote
Old 28th April 2011, 06:28   #14  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 309
There is no function named "MPEGsource"

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

Code:
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
nhope is offline   Reply With Quote
Old 28th April 2011, 07:24   #15  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 820
Quote:
Originally Posted by nhope View Post
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)
Code:
LoadPlugin("Path to your DG plugin\DGDecode.dll")
kypec is offline   Reply With Quote
Old 28th April 2011, 08:24   #16  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 309
Thanks kypec, but I still get the same error. Script is now:

Code:
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
nhope is offline   Reply With Quote
Old 28th April 2011, 09:42   #17  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,380
Quote:
Originally Posted by nhope View Post
MPEGsource(file) #open the video content
Should be MPEG2Source(...)
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 28th April 2011, 12:59   #18  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 309
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.
nhope is offline   Reply With Quote
Old 28th April 2011, 13:07   #19  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,380
Set data_code=true?
Quote:
Originally Posted by paviko View Post
data_code - if true, then info about aperture, shutter and gain is added to timestamp
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 28th April 2011, 14:01   #20  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 309
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:

Code:
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
nhope is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.