PDA

View Full Version : Newbie / simple question


wertert
11th January 2006, 18:12
Hi all

Can someone please point in the direction of a simple script that will allow me to open an avi file ( avisource ) then simply output the height and width of the clip to a text file, plus any other usful info ie fps.

Thx in advance

J

Manao
11th January 2006, 19:47
@echo off

set TMPAVS="__temp__.avs"
set TMPTXT="__temp__.txt"
set AVS2AVI="avs2avi.exe"

REM create the avs file

echo source = avisource("%1") > %TMPAVS%
echo return source.writefilestart(%TMPTXT%, string(framecount(source))).trim(0,1) >> %TMPAVS%

REM launch avs2avi

%AVS2AVI% %TMPAVS% -p 2 -c null -q -o n > nul

REM read the txt file

type %TMPTXT%

REM clean created file

del %TMPAVS%
del %TMPTXT%It's a batch file. You'll need avisynth and avs2avi. It returns the framecount, but can easily be adapted to display width, height, framerate, colorspace.

Wilbert
11th January 2006, 21:07
Please you can appropriate title (rule 9). Thanks!

wertert
12th January 2006, 15:08
Many thanks for the reply. I've been having a rethink and maybe avisynth is a bit ott for what I'm wanting to do. I'm basically writing a perl script to create batch files for format conversion. Very simple but I need a way of running <something> against an avi file to get the frame sizes. I could even use perl directly but I fear this may be a little tricky ( unless anyone knows of a suitable module ). I know this is going slight off this forum but I'm basically after some sort of command-line-tool that will dump out avi information to stdout.

Thx again

J