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 |
|
|
#21 | Link |
|
BeSweet Author
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
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
|
|
#22 | Link |
|
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 |
|
|
|
|
|
#23 | Link | ||
|
Retired, but still around
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:
![]() @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:
Last edited by DDogg; 24th February 2003 at 00:53. |
||
|
|
|
|
|
#24 | Link | ||
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
Quote:
!Quote:
).
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
||
|
|
|
|
|
#25 | Link |
|
Retired, but still around
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") |
|
|
|
|
|
#26 | Link |
|
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 |
|
|
|
|
|
#27 | Link |
|
Retired, but still around
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)
Last edited by DDogg; 7th March 2003 at 19:18. |
|
|
|
|
|
#28 | Link |
|
Retired, but still around
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. |
|
|
|
|
|
#29 | Link |
|
Registered User
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. |
|
|
|
|
|
#30 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,285
|
After reading that thread I get what you mean now
lolWell 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 |
|
|
|
|
|
#31 | Link | |
|
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Quote:
Best regards, DD |
|
|
|
|
|
|
#34 | Link |
|
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 |
|
|
|
|
|
#35 | Link |
|
Retired, but still around
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()
Code:
Now is the time for all good men Time="04:13:00" 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. |
|
|
|
|
|
#36 | Link | |
|
Registered User
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
|
Quote:
![]() (I think) Best regards, Bilu |
|
|
|
|
|
|
#38 | Link |
|
Retired, but still around
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")
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. |
|
|
|
|
|
#40 | Link |
|
Retired, but still around
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
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. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|