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. |
|
3rd April 2004, 16:05 | #1 | Link |
Registered User
Join Date: Jan 2004
Location: Thailand
Posts: 23
|
How to print contents from "info()" to text file
I can check file information using "info()" .It show only on left side of screen.Please help me,how to print these information to a text file.
... I try "chr.dll" in conjunction with "Write()" but no luck. Thnaks, |
4th April 2004, 03:23 | #3 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
This should get you started:
Code:
function InfoToFile(clip c, string filename) { endl = Chr(10) colorspaceStr = "Colorspace: " \ + (c.IsYUY2() \ ? "YUY2" \ : (c.IsYV12() \ ? "YV12" \ : (c.isRGB32() \ ? "RGB32" \ : (c.IsRGB24() \ ? "RGB24" \ : "Unknown")))) \ + endl frameSizeStr = "Frame size: " \ + String(c.Width()) + "x" + String(c.Height()) \ + endl fpsStr = "FPS: " + String(c.FrameRate()) + endl fieldBasedStr = (c.IsFieldBased() \ ? "field-based (separated)" \ : "frame-based") \ + endl audioStr = "Audio: " \ + ((c.AudioRate() == 0) \ ? "none" \ : (String(c.AudioRate()) + " Hz, " \ + String(c.AudioBits()) + "-bit, " \ + String(c.AudioChannels()) + " channels")) \ + endl return c.WriteFileStart(filename, "colorspaceStr", \ "frameSizeStr", "fpsStr", \ "fieldBasedStr", "audioStr") } Is it useful to have this information in a text file? Last edited by stickboy; 4th April 2004 at 05:41. |
4th April 2004, 17:41 | #7 | Link |
Registered User
Join Date: Jan 2004
Location: Thailand
Posts: 23
|
@stickboy
Is it useful to have this information in a text file? ...I use these information from info() to feed information to mencoder to encode to VCD.Mencoder has no ability to find out what frame rate,frame size.Therefore,every time i have to type commandline to introduce frame rate and others infomatiomn to mencoder.With assistant of your script ,i wrote another commandline to read infomation from text file and feed to mencoder. ...Apologize me for my English.It took me long way just to explain a simple need.If in Thai i bet only 2 sentences. Regards, |
Thread Tools | Search this Thread |
Display Modes | |
|
|