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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd February 2003, 20:50   #21  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
DDogg ,
you might wanna replace -2lame( ) with -toolame( ) ..
http://forum.doom9.org/showthread.php?s=&threadid=35480
DSPguru is offline   Reply With Quote
Old 23rd February 2003, 20:54   #22  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
How about I update it so you can do:
testcmd="c:\BeSweet.exe -core( -input `d:\The Matrix\Matrix.ac3' -output `d:\The Matrix\matrix.mp2' )"

and then call will convert all 's into "s before creating the process.

Sound good?

-Nic
Nic is offline   Reply With Quote
Old 24th February 2003, 00:51   #23  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
@DSPguru - Hey, long time. Besweet has just got better and better. Congrats! As to your comment:
Quote:
you might wanna replace -2lame( ) with -toolame( ) ..
Er, I just pasted the command line from DD's GUI..Are you speaking of your new beta version D9 mentioned? I is Cunfoosed

@Nic, Well (scratching head), I don't think you would want to introduce a new convention. If CALL could honor the same convention tex style quotes as Avisynth like `stuff''<note two single 's as per neuron2's post (below) then wouldn't that be more in keeping with AviSynth? Or, am I completely confused yet again? If so, I am sure your suggestion would work just fine.
Quote:
Use two single back-quotes to begin a quotation and two single quotes to end it. The usual double quote symbol doesn't produce the correct result.

Last edited by DDogg; 24th February 2003 at 00:53.
DDogg is offline   Reply With Quote
Old 24th February 2003, 19:57   #24  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
Quote:
Originally posted by DDogg
@DSPguru - Hey, long time. Besweet has just got better and better. Congrats!
thanks, it's great to see you here !

Quote:
Er, I just pasted the command line from DD's GUI..Are you speaking of your new beta version D9 mentioned? I is Cunfoosed
yes. the latest beta supports, in addition to mp2enc encoding, toolame encoding. check out latest DD's GUI (b70 ).
DSPguru is offline   Reply With Quote
Old 6th March 2003, 22:50   #25  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
Echo Hello NIC > d:\test.txt

@Nic

Is this already possible with the CALL command and I am missing it or would there be a way to add calling a dos command? Like:
Code:
testcmd="Echo HELLO NIC > d:\test.txt" 
Call(BlankClip, testcmd,"-2")
DDogg is offline   Reply With Quote
Old 7th March 2003, 15:17   #26  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
Your best bet is to try it and see if it works It might not because CreateProcess may not be able to call echo (as echo is built into command.com or equivalent)

so if it doesnt work try:
testcmd="cmd.exe /c Echo HELLO NIC > d:\test.txt"
Call(BlankClip, testcmd,"-2")

if on a winnt based system or replace cmd.exe with command.com for Win95/98 systems.
That should definitely work.

Sorry Ive been a bit late with the other version, im swamped with work (& clients who won't pay ) at present

Cheers,
-Nic
Nic is offline   Reply With Quote
Old 7th March 2003, 17:10   #27  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
Nic, thanks for your reply and the solution. I had tried the straight commands as well as putting command.com in front and they did not work. However, when the /c parameter you suggested was added IT WORKS perfectly. Also, I found (on XP) just using CMD /c works as well.

This seemingly small thing will allow the CALL command to open up basic disk output for reportage and, I think, the storing of variables for later use in other scripts via the avisynth import command.

Small and poor example of reportage:
Code:
loadplugin("call_25.dll")
v=avisource("Tape 1 - Clip 001.avi")
r="Report: "+"%time%"+" "+"%date%"+" " "#duh, how LF or CR to put rest of report on new line after report header???
fct= "Framecount: "+ string(v.framecount)+" 
frt="Framerate: "+ string(v.framerate)+" "
w="Width "+ string(v.width)+" "
h="Height "+ string(v.height)+" "
a="Audiorate "+ string(v.audiorate)+" "
sendout=r+fct+frt+w+h+a
testcmd="cmd /c Echo " +sendout+ " > d:\test.txt" 
Call(BlankClip,testcmd,"-2")
return(v)
Maybe somebody that really knows what they are doing can do up a proper example. All the clip properties as well as any internal strings, which could be filter parameters, filenames, etc., would be reportable or available to output as reusable variables (import???)

Last edited by DDogg; 7th March 2003 at 19:18.
DDogg is offline   Reply With Quote
Old 8th March 2003, 15:43   #28  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
before, during and last frame event

Nic, to some degree, the call command introduces a framebased "before, during and after concept", i.e, call("externalprog.exe","0,50,-1") implements the external at frame 0,50, and the last frame of the "video event".

I have some thoughts running around in my head and it would be useful to know if, hypothetically from a code standpoint, would it be possible for CALL to use an internal function as well as an external program,i.e., call ("internalfunction","0,50,-1")?

Oh, a second question, from a code standpoint, what are the ramifications of using the CALL command separately multiple times in a script? Do you see this as a problem? I ran into some problems when I tried something like this:
Code:
LoadPlugin("call_25.dll")
version
testcmd="info.bat" 
Call(testcmd, "0")
Import("info.avs")
starttime=time
Call(testcmd, "-1")
Import("info.avs")
lasttime = time
#Now you would have a start time and a finish time in variables to use to generate a report.txt using Call and CMD /c echo + stuff + > report.txt




Last edited by DDogg; 8th March 2003 at 19:32.
DDogg is offline   Reply With Quote
Old 8th March 2003, 16:16   #29  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Nic,

Just to add another concept to Ddogg's idea, do you think it is possible to call (internal functions or external commands) at certain events, like in a WHILE function?

Example: call(internalfunction,my_variable>1) would run internalfunction while the flag I defined is bigger than 1.

[EDIT]
Oh great Master, please look
here for inspiration


Best regards,
Bilu

Last edited by bilu; 9th March 2003 at 18:52.
bilu is offline   Reply With Quote
Old 9th March 2003, 22:16   #30  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
After reading that thread I get what you mean now lol
Well I know theres an Invoke function I could call in AviSynth but I dont know how flexible it is (or anything about it to be honest). Ill look into it.

At present I dont seem to be able to concentrate on one topic, ive fiddled with my mpeg-2 transcoder/my mpeg-2 directshow filter and dvd2avi_nic today and dont feel like doing any more on any of them. So it may be a while before I look into it, but ill try

Cheers,
-Nic
Nic is offline   Reply With Quote
Old 9th March 2003, 23:19   #31  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
Quote:
So it may be a while before I look into it, but ill try
We couldn't ask any more. You have been real decent about considering some of these more "unusual" ideas. I do think the resulting additional power and flexibility would make it worth your time and who knows, maybe a little fun. It would most certainly be appreciated by many (quite a few of who, at the moment, have no idea what this would be useful for :-) lol)

Best regards,

DD
DDogg is offline   Reply With Quote
Old 10th March 2003, 10:43   #32  |  Link
Wilbert
Super Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,375
Quote:
#duh, how LF or CR to put rest of report on new line after report header???
Did you solve this?
Wilbert is offline   Reply With Quote
Old 10th March 2003, 11:10   #33  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
@Wilbert,

Take a look here.

Haven't tried it yet.


Best regards,
Bilu
bilu is offline   Reply With Quote
Old 10th March 2003, 12:37   #34  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
Well very quickly thrown together:

http://nic.dnsalias.com/Call.zip

Sorry no "while" feature yet, but now you can use ' as " to allow for long filenames etc

also included is a little app called NicEcho which can be used like:

Call(BlankClip, "d:\NicEcho.exe @d:\report.txt 'Appending\nHello\nAppended'", "-2")

Which would append to a text file called d:\report.txt the text:
Appending
Hello
Appended

etc.
Hope this helps some, sorry its not much but its start, sorry for the hurried post. At work at present.

-Nic
Nic is offline   Reply With Quote
Old 10th March 2003, 17:57   #35  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
Nic, all these superman capes are going to get heavy. This is awesome!

Here is a reference for anybody playing with Nic's new toy. I am not quite sure why the two ' used in addqt works, but it does.
Code:
loadplugin("call_25.dll")
loadplugin("chr.dll")
addqt="''"
hdr="'"
systime=(Time("%I:%M:%S"))
MyTextString="Now is the time \nfor all good men\nTime="
stuff=hdr+MyTextString+addqt+systime+addqt+hdr
Call(BlankClip, "nicecho.exe report.txt " + stuff, "-2") 
version()
report.txt contains:
Code:
Now is the time 
for all good men
Time="04:13:00"
@Nic, thinking out loud, if nicecho.exe could grab the present systime and you could provide a variable? (\systime, \sysdate \sysday) in nicecho.exe when it was called ??? Make any sense to you?
I am still after a straightforward way to get elapsed time from "0" to "-1". Maybe this is already in front of me and I have not seen it yet.

Last edited by DDogg; 14th March 2003 at 23:15.
DDogg is offline   Reply With Quote
Old 10th March 2003, 19:33   #36  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Quote:
Originally posted by DDogg
I am still after a straightforward way to get elapsed time from "0" to "-1". Maybe this is already in front of me and I have not seen it yet.
It has allways been if the front of us all but we never used it: the time reported in the AVI stream itself, that you can see in media players where you preview an AVS. We just need a filter to grab it!
(I think)

Best regards,
Bilu
bilu is offline   Reply With Quote
Old 10th March 2003, 20:02   #37  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
Delete

Last edited by DDogg; 11th March 2003 at 02:07.
DDogg is offline   Reply With Quote
Old 10th March 2003, 21:22   #38  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
More reference stuff - added Warpenterprises CHR plugin for date functions. Edit: Well this will definately creates a base report BEFORE the clip starts playing and appends AFTER the last frame. If nicecho could somehow have a \timevariable for use we could do elapsed time.

Code:
loadplugin("call_25.dll")
loadplugin("chr.dll")
avifname="Tape 1 - Clip 001.avi"
v=avisource("Tape 1 - Clip 001.avi")
hdr="'"
FmCt= "\nFramecount = " +string(v.framecount)
FmRt="\nFramerate = "+ string(v.framerate)
W="\nWidth = "+ string(v.width)
H="\nHeight = "+ string(v.height)
A="\nAudiorate = "+ string(v.audiorate)
StTime=(Time("%I:%M:%S %p"))
FinTime=(Time("\nFInish Time %I:%M:%S %p"))# until I can figure out how
FilterParams="nada"
Dte=(Time("Date: %A %x Time: %I:%M:%S %p"))
RptHdr="REPORT: "+dte +"\nFilename: "+avifname + "\nStart Time: " + StTime +"\nParameters: " + FilterParams
stuff=RptHdr+Fmct+FmRt+w+h+a
Call(v,"nicecho.exe report.txt " +hdr + stuff + hdr, "-2")
Call(v,"nicecho.exe @report.txt " +hdr+fintime+hdr, "-1")
Outputs:
Code:
REPORT: Date: Monday 03/10/03 Time: 07:43:30 PM
Filename: Tape 1 - Clip 001.avi
Start Time: 07:43:30 PM
Parameters: nada
Framecount = 25346
Framerate = 29.970030
Width = 720
Height = 480
Audiorate = 48000
FInish Time 07:43:30 PM

Last edited by DDogg; 28th March 2003 at 13:47.
DDogg is offline   Reply With Quote
Old 11th March 2003, 13:11   #39  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Nic,

I hope that this post can be helpful.

Best regards,
Bilu
bilu is offline   Reply With Quote
Old 28th March 2003, 03:25   #40  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
Nic was nice enough to send me another version of NicEcho.exe that now will output the time by using a \t in the output. Just the exe, see the previous package for call.dll and docs. You can get it here:
http://nic.dnsalias.com/NicEcho.exe

I am happy to say you can now do before video and after video events such as start time and end time: This is pretty rough but works well enough for an example.
Code:
#loadplugin("call_25.dll") load not needed if in plugin dir
#loadplugin("chr.dll") from WarpEnterprises Website, used for date but does a whole lot more
hdr="'"
avifname="test_MC.avi"
v=avisource(avifname)
FmCt= "\nFramecount = " +string(v.framecount)
FmRt="\nFramerate = "+ string(v.framerate)
W="\nWidth = "+ string(v.width)
H="\nHeight = "+ string(v.height)
A="\nAudiorate = "+ string(v.audiorate)
StTime="\nStart Time \t"  # < \t outputs the current time
FinTime="\nFinish Time \t" 
Dte=(Time("Date: %A %x Time: %I:%M:%S %p")) #this from chr.dll
RptHdr="REPORT: "+dte +"\nFilename: "+avifname+ StTime 
stuff=RptHdr+Fmct+FmRt+w+h+a
Call(v,"nicecho2.exe report.txt " +hdr + stuff + hdr, "-2") #runs before video
Call(v,"nicecho2.exe @report.txt " +hdr+fintime+hdr, "-1") # after video 
#The @report.txt above appends to previous report.txt
Outputs Report.txt to disk
Code:
REPORT: Date: Thursday 03/27/03 Time: 08:12:16 PM
Filename: test_MC.avi
Start Time 20:12:16
Framecount = 758
Framerate = 29.970030
Width = 720
Height = 480
Audiorate = 48000
Finish Time 20:12:42

Last edited by DDogg; 28th March 2003 at 16:53.
DDogg 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:46.


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