View Full Version : Avisynth clip information via stdout?
Marsu42
12th December 2005, 22:57
I have made some shell scripts with my default x264 settings to simplify usage w/o gui clutter. However, I still have to manually calculate and input the bitrate while this could be very well automated knowing the target size (1CD).
- Is there any way to get avisynth output plain text from the Framecount/Framerate functions (not MessageClip) for grep'ing?
- If not, does anyone know any tool that is able to read the framerate and framecount from an avs file and print the result to stdout?
TIA
foxyshadis
12th December 2005, 23:52
makeavis -i script.avs -o new.avi
grep -E 'Frame rate\s*: ([\d.]+)' | mediainfo -f new.avi 2>nul
This is 100% seat of my pants and I'm sure it'll take tweaking (plus mediainfo isn't available on *nix, if you're using that, but I'm sure there's alternatives to read avi info), but it should give you a place to start. Makeavis is in the ffdshow package.
Marsu42
13th December 2005, 00:48
:-)) thx a lot for the prompt reply, that did it under Win32.
My command sequence w/o regular expressions :-p is:
makeAVIS.exe -i test.avs -v test.avi
mediainfo test.avi | grep 'Frame rate' | awk '{print $4}'
ficofico
23rd June 2007, 22:09
Can avisynth read a part of a txt file and put information into a part of avs file? I think no, but I think that other person know How to do.
I've made a batch file program, that use mp4box and x264 under a script avs. Using directshowsource for opening mp4 file I have seen that the framerate is wrong. Mediainfo give me the true framerate, and it's possible to export .txt file with info. How can I catch the framerate from the txt file and put into the string directshowsource(" ...... ,mediainfo framerate)??
I've used the gui version of mediainfo. Wich parameters for command line must I use for exporting txt file with info?
Very very very thanks.
stickboy
23rd June 2007, 22:26
Can avisynth read a part of a txt file and put information into a part of avs file? I think no, but I think that other person know How to do.There's no built-in mechanism to do so (exactly what do you want?), but it writing a plug-in to do it would be straightforward.
Possibly my GetSystemEnv plug-in (http://www.avisynth.org/stickboy/) would be useful to you.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.