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 18th September 2003, 12:09   #1  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
New Filter: DVInfo

This FILTER grabs the timestamp and recording date info out of a DV-AVI.
It should work with Type-1 and Type-2, standard AVI and openDML.

You can specify the time/date as an expression which is then Subtitle'ed on the video clip.

Simplest example:
Code:
LoadPlugin("c:\myprojects\dvinfo\release\dvinfo.dll")

file="c:\myprojects\type2.avi"  # so you don't need to type the filename twice

Avisource(file) #open the video content
DVInfo(file, "rec_time") # reads the recording timestamp
The filter does NOT read the video content, it only reads the timestamps of the framenumber currently passed through!

You may also look here for something closely related...


Technical note:
it uses AVI-file code from "kino", which I had to modify a little.

Last edited by WarpEnterprises; 21st September 2003 at 21:20.
WarpEnterprises is offline   Reply With Quote
Old 21st September 2003, 21:23   #2  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
Small Update:
* added parameter "show_error" to switch off error messages
* updated AVI code to latest version of kino
* added default value for "output" so it's enough to write DVInfo(filename)
* made docs nicer
WarpEnterprises is offline   Reply With Quote
Old 22nd September 2003, 02:29   #3  |  Link
tempetai
Registered User
 
tempetai's Avatar
 
Join Date: Apr 2003
Posts: 49
WarpEnterprises,

Thanks for the filter. It is really cut down a lot of step to have recording time and date inserted into the clip. Before this I used DVSubmaker, subresync, textsub for this job. BTW, is there anyway to have AM/PM instead of 24-hours time format? Perhaps, it is good to have this feature inserted as well as different language option.

Thanks.
tempetai is offline   Reply With Quote
Old 22nd September 2003, 07:30   #4  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
it's there, well hidden, read the readme

It uses the current (windows) localisation!

Example for result like: "26.Juli 2003 04:01 PM"

dvinfo(file,"rec_time",rec_format="%d.%B %Y %I:%M %p")

Here are all format specifiers:

Code:
Codes for output formatting 
%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) 
%YYear 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).
WarpEnterprises is offline   Reply With Quote
Old 23rd September 2003, 01:58   #5  |  Link
tempetai
Registered User
 
tempetai's Avatar
 
Join Date: Apr 2003
Posts: 49
Great...

Thanks.
tempetai is offline   Reply With Quote
Old 29th October 2003, 08:36   #6  |  Link
Basilik
Registered User
 
Join Date: Nov 2002
Posts: 14
As an alternative the same kind of plugin which I have done for myself long time ago but didn't announce widely: http://mvideo.nm.ru
Unlike DVInfo, my plugin has function for automatic time stamping when date/time changes by some value more than given threshold.
Basilik is offline   Reply With Quote
Old 7th January 2004, 23:45   #7  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
New version (2003-12-16): I added the autoframe-features to DVInfo, too.

http://www.avisynth.org/warpenterprises/
WarpEnterprises is offline   Reply With Quote
Old 1st June 2004, 15:25   #8  |  Link
Basilik
Registered User
 
Join Date: Nov 2002
Posts: 14
New features added to my plugin DVTimeStampEx (note, name changed a bit):
1) you can define a timeoffset from original taping time
2) you can force the timestamp to appear in auto mode if no DV time change occured for a long period
3) multiline support
4) font is fully customisable
5) visual effects added (same as in my SubtitleEx plugin)

See all details on my site.
Basilik is offline   Reply With Quote
Old 17th July 2005, 06:48   #9  |  Link
whwhwhwh9
Registered User
 
Join Date: Jul 2005
Posts: 13
does DVinfo support DV files larger than 4GB? I have problems with it when processing a 6GB DV AVI, but it works OK on files smaller than 4GB...
whwhwhwh9 is offline   Reply With Quote
Old 18th July 2005, 22:51   #10  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
1) how did the error / problems look like? (error messages or the like)
2) What AVI Type (1 or 2) did you use?
3) Was there any sound inside?
WarpEnterprises is offline   Reply With Quote
Old 6th August 2005, 03:41   #11  |  Link
whwhwhwh9
Registered User
 
Join Date: Jul 2005
Posts: 13
#LoadPlugin("decomb521.dll")
LoadPlugin("TDeint.dll")
LoadPlugin("DVinfo.dll")
#LoadPlugin("MPEG2Dec3dg.dll")

filename = "g:\uvs050806-003.AVI"

v = DirectShowSource(filename)

### for mpeg2: DirectShowSource("test.mpg")
### for DV AVI: DirectShowSource("test.avi")

AssumeFieldBased(v)
AssumeBFF(v)

v2 = TDeint(v)
v3 = BilinearResize(v2, 352, 288)

DVinfo(v3, filename) # <---- Line 19
Attached Images
  
whwhwhwh9 is offline   Reply With Quote
Old 8th August 2005, 11:19   #12  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
two more questions:
- does the error occur when you open the AVS or after you do some seeking beyond a frame?
- does it crash without AssumeFieldBased(v) ...BilinearResize(v2, 352, 288) ?
WarpEnterprises is offline   Reply With Quote
Old 10th August 2005, 03:38   #13  |  Link
whwhwhwh9
Registered User
 
Join Date: Jul 2005
Posts: 13
To your question #1: I didn't even have chance to seek. I just opened the AVS file in VirtualDub, then it took 100% CPU cycles, then about 2~3 minutes later, error message pops up.

To your question #2:

LoadPlugin("decomb521.dll")
LoadPlugin("dvinfo.dll")
LoadPlugin("TDeint.dll")
filename = "\tt.AVI"
v = DirectShowSource(filename)

#AssumeFieldBased(v)
#AssumeBFF(v)

#v2 = TDeint(v)
#v2 = FieldDeinterlace(v)
#v3 = BilinearResize(v2, 352, 288)

dvinfo(v, filename) # <==== line 14
Attached Images
 
whwhwhwh9 is offline   Reply With Quote
Old 12th August 2005, 08:07   #14  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
get the new version (2005-08-11)
http://www.avisynth.org/warpenterpri...ex.html#dvinfo

Thanks for reporting, it was indeed a bug for files > 4GB.

Last edited by WarpEnterprises; 12th August 2005 at 08:18.
WarpEnterprises is offline   Reply With Quote
Old 14th August 2005, 08:15   #15  |  Link
whwhwhwh9
Registered User
 
Join Date: Jul 2005
Posts: 13
got the new version, and it works great.
whwhwhwh9 is offline   Reply With Quote
Old 9th December 2005, 17:31   #16  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,717
WarpEnterprises: Could you (or possibly someone else) make it possible to display the timecode whenever the day of month changes?
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 10th December 2005, 22:07   #17  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
Isn't that the same if you use a large "threshold" value (e.g. 10000 seconds) or do you really want to display the timecode exactly at midnight with your video actually spanning over midnight?
WarpEnterprises is offline   Reply With Quote
Old 11th December 2005, 06:32   #18  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,717
I sometimes have stuff that is shot before midnight and then continued during the early hours of day. It would be much easier to have a single option for displaying when the day of month changes than calculating the threshold for each instance
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 23rd December 2005, 21:39   #19  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
After some thought it turned out to be trivial AND general, check it:

http://www.avisynth.org/warpenterprises/#dvinfo
WarpEnterprises is offline   Reply With Quote
Old 23rd December 2005, 22:11   #20  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Is it still GPL (since source is not included)?
Wilbert 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 03:52.


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