View Full Version : Output HDVInfo rec_time to text file
trevorharris
6th March 2007, 15:27
Please can someone tell me how I can output HDVInfo's rec_time to a textfile. I tried outputing rec_time using writefile but the output does not make sense. I assumed that rec_time was an ordinary string.
Regards Trevor Harris
Eshkhmed
6th March 2007, 15:46
u can try a something like this batch, that i use for similar task with DV files...
@echo off
setlocal enabledelayedexpansion
set PluginsPath=c:\Videoedit\avisynth\
for /R %%x in (*.avi) do (
echo LoadPlugin^("%PluginsPath%dvinfo.dll"^)
echo LoadPlugin^("%PluginsPath%GetSystemEnv.dll"^)
echo LoadPlugin^("%PluginsPath%DirectShowSource.dll"^)
echo Current="%%x"
echo DirectShowSource^(Current^)
echo global path=chr^(34^) + GetWorkingDir
echo global add_ext=".avi" + chr^(34^)
echo global src_file="move " + chr^(34^) + current + chr^(34^) + " "
echo dvtsr=last.ReduceBy2.ConvertToRGB32^(interlaced=true^)
echo dvtsr=DVInfo^(dvtsr,Current, "rec_time", x=100,y=100, rec_format="%%y%%m%%d-%%H%%M%%S"^).trim^(0,5^)
echo dvtsr=FrameEvaluate^(FrameEvaluate^(ScriptClip^(dvtsr, "subtitle(dvts)"^), "dvts = String(text)"^), "text = rec_time"^)
echo return WriteFileIF^(dvtsr, "ReNaming.cmd", "current_frame == 3","src_file+path + dvts + add_ext"^)
) > "%%~nx.avs"
for /R %%x in (*.avs) do ( "c:\videoedit\tools\avs2avi.exe" "%%x" -p 0 -c "null" -o n )
for /R %%x in (*.avs) do ( del /f /q "%%x")
P.S. don't forget to enter correct paths...
trevorharris
6th March 2007, 23:49
This is my script but rec_time does not make sense.
file="j:\hd\dubrovnic.d2v"
MPEG2Source(file) #open the video content
HDVInfo(file,"rec_time") # reads the recording timestamp
WriteFile("j:\hd\dubrovnic.txt", "current_frame", "rec_time")
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.