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 3rd April 2004, 16:05   #1  |  Link
itcth
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,
itcth is offline   Reply With Quote
Old 3rd April 2004, 20:09   #2  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Not possible - sorry.

Many of the properties are available as clip properties, though.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 4th April 2004, 03:23   #3  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
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")
}
(There's a bug in AudioBits(); right now it returns bytes per channel, not bits. The script above does not correct for it, since I assume it will be fixed real soon. )

Is it useful to have this information in a text file?

Last edited by stickboy; 4th April 2004 at 05:41.
stickboy is offline   Reply With Quote
Old 4th April 2004, 04:44   #4  |  Link
itcth
Registered User
 
Join Date: Jan 2004
Location: Thailand
Posts: 23
@ stickboy

Thanks a lot.I will try it now.
itcth is offline   Reply With Quote
Old 4th April 2004, 05:06   #5  |  Link
itcth
Registered User
 
Join Date: Jan 2004
Location: Thailand
Posts: 23
@stickboy

With little modification.Your script works great.

Thank again.
itcth is offline   Reply With Quote
Old 4th April 2004, 09:17   #6  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
AudioBits fixed.

I also added isAudioFloat and isAudioInt to the next version.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 4th April 2004, 17:41   #7  |  Link
itcth
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,
itcth 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 05:10.


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