Log in

View Full Version : Getting info about video spit out by an avisynth script...


ramicio
10th July 2011, 18:42
I have a perl script to encode my movies. I rely on copying my AVS script to a temporary one and add a line to make it one frame long, then use AVS2AVI to make me an AVI, then MediaInfo to give me the width and height. To get the number of frames I need the DGI created by DGDecNV to be alongside with my AVS script and I search for CODED and then get the number of frames from that. I would like to not have to make any temporary files or need a copy of the DGI, I would just like to read all the info from what the AVS would create. Any suggestions? I'm using the 64-bit version of AviSynth, too.

The perl script can be seen here. (http://timramich.com/movie-script.html)

Chikuzen
10th July 2011, 21:22
avs2pipe or avs2pipemod ?
http://forum.doom9.org/showthread.php?t=160383

$ avs2pipemod -info ./foo.avs
script_name ./foo.avs
v:width 640
v:height 480
v:fps 30000/1001
v:frames 107892
v:duration[sec] 3599.996
v:image_type framebased
v:field_order not specified
v:pixel_type RGB32
a:sample_rate 48000
a:format float
a:bit_depth 32
a:channels 2
a:samples 172799827
a:duration[sec] 3599.996

I think that you can easily parse these information.

ramicio
10th July 2011, 21:51
It doesn't work with 64-bit AviSynth. Even so, I JUST found a working solution AVS2AVI can be run to just give info.

The script has been updated and considerably shortened. (http://timramich.com/movie-script.html)