View Full Version : Get avi information into a text document
Davinator
10th August 2006, 23:47
I was hoping to find a way to take some of the avi information, such as the dimensions or framerate, into a text document. I would want the document to be something as simple as this for the vertical resolution:
480
I am hoping to do this for automation purposes. Has anyone else tried to do this... and if so, how did you do it? Thanks a lot in advance =)
matrix
11th August 2006, 00:40
I don't know if you can do this with avisynth, but you can do it with Gspot.
You get a text file with all this information.
C:\Capture\clip.avi
Duration: 01:43:35 (186,262 fr)
Codec: Huffman Lossless Codec
File Size: 3,686 MB (or 3,775,348 KB or 3,865,956,864 bytes)
Aspect Ratio: 688x480 (1.43:1) [~33:23]
Video Bitrate: ?
Frame Rate: 29.971
Audio Bitrate: 1536 kb/s (768/ch, stereo)
Audio Samplerate: 48000 Hz
Audio Codec: PCM Audio
D.S.Video Source Type: 4cc: HFYU
D.S.Video Path: (S) --> AVI Splitter --> [VFW: Huffyuv v1.3.1 CCESP Patched v0.01] --> Color Space Converter --> (R)
D.S.Audio Path: (S) --> AVI Splitter --> (R)
The size is wrong, but everything else seems to be correct.
You just have to configure it in options> export settings.
Davinator
11th August 2006, 02:15
This is getting close to what I need, but it doesn't look like Gspot is the right program for this. Although the information it gives is the type of information I am hoping to get, Gspot requires you to manually open the file into the gui to create the text document.
I need either a program that can place this information into a text document only using a command line interface, or a command within avisynth to do this. Currently I have created a streamlined command line interface that will create avisynth scripts, and write the avi files. By getting this information into a text file via command line, I'll be able to write in some error detection based on vertical resolution, video length, etc...
Pookie
11th August 2006, 04:21
2 Command Line Apps come to mind:
MediaInfo - http://mediainfo.sourceforge.net/en/Download
and maybe AviMaster
http://www.thozie.de/dnn/AVIMaster.aspx
Lokean
11th August 2006, 04:22
You can do that with midentify (part of the MPlayer package). For example I would do this (on Linux of course) to get the width:
midentify clip.avi | grep ID_VIDEO_WIDTH | sed 's/ID_VIDEO_WIDTH=//'
stickboy
11th August 2006, 09:19
http://forum.doom9.org/showthread.php?s=&threadid=73814
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.