View Full Version : Avisynth-Monitor
johann.Langhofer
24th August 2002, 12:26
Hello,
I've written a small extension to monitor an avs-stream. You can download for free, see links below.
Short description of the usage:
Loadplugin ("avsmon.dll")
{your script here}
MonitorFilter
What is the advantage of this Filter:
- You can prview the video (ie. during cce-conversion)
- You can determine an exact audio delay
Best regards,
johann.langhofer@nextra.at
avsmon.gif (http://members.nextra.at/johann.langhofer/avisynth/avsynthMonitor.gif)
avsmon.dll (http://members.nextra.at/johann.langhofer/avisynth/avsmon/latest/)
sh0dan
24th August 2002, 15:24
Really cool - especially the audio-delay is excellent for me!
I do have some problems:
Loadplugin ("avsmon.dll")
clip=avisource("D:\SH0DAN\MPG\Ice Age.avi").converttoyuy2()
bc=blankclip(1000000,70,32).killaudio().converttoyuy2().ShowFrameNumber().greyscale()
MonitorFilter(clip)
layer(clip,bc,"add",200,10,0)
Does not show any picture, but
Loadplugin ("avsmon.dll")
clip=avisource("D:\SH0DAN\MPG\Ice Age.avi").converttoyuy2()
bc=blankclip(1000000,70,32).killaudio().converttoyuy2().ShowFrameNumber().greyscale()
layer(clip,bc,"add",200,10,0)
MonitorFilter(clip)
works ok.
johann.Langhofer
24th August 2002, 15:43
At the moment I've no idea where the problem could be, but I'll try to fix it..
Best regards
sh0dan
24th August 2002, 16:45
No hurry - it already rocks! It would just be great to be able to preview intermediate stages of the filters.
This gives me all new perspectives on an Avisynth GUI. I should really try to do a design-proposal, if I had the time.
Another nice-to-have would be some info like resolution, colorspace, framerate, samplerate, sample depth, channels.
Also a slide for "second-offset" for audio could be useful, especially with the compressed audio support, which has huge sync-problems when skipping in VBR mp3-material.
... I could go on - you really shouldn't listen to me! :rolleyes:
Koepi
24th August 2002, 17:11
I think that filter rocks, too! I'm reencoding the matrix with it, just to see it work ;)
(Ok, I'm using more aggressive convolution3d settings than in my last test, too ;) ).
I noticed that if you search backwards, the image doesn't get updated... only if you advance above the point where you've already been. Bug or feature?
Best regards,
and thanks for this nice dll :)
Koepi
WarpEnterprises
24th August 2002, 21:28
Maybe silly question, but how do you get the GUI to show up?
(or doesn't it work on win98).
sh0dan
24th August 2002, 21:32
... it just shows up ;) (XP here)
johann.Langhofer
24th August 2002, 21:34
thanks for all the suggestions, I'll see what I can do...
for the actual problem:
Loadplugin ("avsmon.dll")
clip=avisource("D:\SH0DAN\MPG\Ice Age.avi").converttoyuy2()
bc=blankclip(1000000,70,32).killaudio().converttoyuy2().ShowFrameNumber().greyscale()
MonitorFilter(clip)
layer(clip,bc,"add",200,10,0)
I think although I'm not so very familar with scripting the MonitorFilter is an I/O filter that means you must (re)assign the variable you use for the clip. I've tested following versions without problems:
version 1:
clip=avisource("D:\SH0DAN\MPG\Ice Age.avi").converttoyuy2().MonitorFiler
bc=blankclip(1000000,70,32).killaudio().converttoyuy2().ShowFrameNumber().greyscale()
layer(clip,bc,"add",200,10,0)
version 2:
clip=avisource("D:\SH0DAN\MPG\Ice Age.avi").converttoyuy2()
bc=blankclip(1000000,70,32).killaudio().converttoyuy2().ShowFrameNumber().greyscale()
clip=MonitorFilter(clip)
layer(clip,bc,"add",200,10,0)
version 3:
clip=avisource("D:\SH0DAN\MPG\Ice Age.avi").converttoyuy2()
bc=blankclip(1000000,70,32).killaudio().converttoyuy2().ShowFrameNumber().greyscale()
MonitorFilter(clip)
layer(last,bc,"add",200,10,0)
Belgabor
24th August 2002, 23:59
Well, i think its quite logical it shows no picture, as in sh0dans script its kinda a dead end. I imagine avisynth to be operated-by-draw-at-the-end-of-the-chain, and in that example nothing draws at the MonitorFilter. (Well, this is prolly what johann meant by stating its an i/o filter)
Cheers
Belgabor
iago
25th August 2002, 10:53
@Koepi
Originally posted by Koepi
(Ok, I'm using more aggressive convolution3d settings than in my last test, too ;) ). Maybe the wrong thread to ask that, but since you mentioned it here, what convolution3d settings are you trying with Matrix? (I'm also considering to test convolution3d again, using MPEG quantizers and no lumi in both passes, maybe sharp bicubic, with Fight Club aiming for 1CD.)
thanks and best regards ;),
iago
theReal
25th August 2002, 18:34
Very cool !!! Thanks !! Avisynth only needed a preview to be perfect :cool:
johann.Langhofer
25th August 2002, 19:07
thx,
an extended version is now ready for testing...
- more statistics
- histogram switch (works for yuy2 only)
avsmon_vers10a (http://members.nextra.at/johann.langhofer/avisynth/avsmon.dll)
screendump (http://members.nextra.at/johann.langhofer/avisynth/avsynthMonitor10a.gif)
theReal
25th August 2002, 20:21
one question: what is the audio delay switch for?
soulfx
26th August 2002, 07:33
Sw337! This is really cool, awesome work johann.Langhofer.
The Histogram is a nice addition, it seems hard to read, but that's the way AviSynth's default histogram is.
One concern I had/have is effects of this monitor on framerate. I did some tests and what I can tell there really isn't any affect on framerate. Yay.
Peace,
SoulFX
Guest
26th August 2002, 07:44
@johann.Langhofer
Well, what is the verdict on Win98? At least two of us don't get any GUI. Are you blowing off Win98 users?
johann.Langhofer
26th August 2002, 10:26
To Neuron2: It's not the intention to blow off win98 users :sly:
If you can't get any GUI, the reason could be that I've used an api (CreateThread) on which the last argument must not be NULL for Win95/98/Me, but on NT/2000/XP it can be (just found from professor Google).
Sorry, I'll fix that as soon as possible, unfortenatly I'm at work now, so the earliest time to fix is the coming weekend.
To soulfx: I can't believe about the framerate, I've also done tests and was satisfied. The framerate is determined by counting the GetFrame()-calls inbetween a second measured with the multimedia-timer ??!
Best regards,
Johann Langhofer
Guest
26th August 2002, 13:37
@Johann
Thank you. We will look forward to the Win98 compatible version!
Guest
26th August 2002, 14:09
@Defiler
Nice move, Defiler. Make enemies of the people that help you.
vidiot
26th August 2002, 16:02
Just wanted to say:
Glad I´m not the last WIN98SE User in the world...
And I´m sure: Less Problems (except Fat32) and more power with the same system than NT or ME or...
(...more bang for the buck...)
BTW: for the price of a nice Win XP Version I could easily buy an DVD Burner - is that an option? ;)
Harald
Guest
26th August 2002, 17:39
@Defiler
Please do not hijack this valuable thread with off-topic trolls. Otherwise, I'll have to resort to sanctions. Thank you.
iago
1st September 2002, 01:06
@johann.Langhofer
Thanks for this very useful tool, which I'm using now for the first time while doing a rip with XviD to watch the encoded video. However, when using lower resolutions (such as 512*272), imho it is difficult to analyze the quality of the encode using the original resolution. I think it would be very useful (if it is possible of course) to add a "double size" option for the Preview Window.
best regards and thanks again for your great tool,
iago
Belgabor
1st September 2002, 02:30
Although i havent tried it yet (shame on me ;)) i think two additions could be nice.
- some identification option, so if you want to place more than one you know which one is which.
- option of a window handle for output. This filter could be really nice for a upcoming avisynth gui, so if you can give it an optional window handle, the gui can display it.
Cheers
Belgabor
soulfx
2nd September 2002, 06:14
Is there a way to call this function without it defaulting to showing the preview? Something like MonitorFilter(showpreview=false) would be cool.
Peace,
SoulFX
Guest
2nd September 2002, 13:51
Any progress on Win98SE support?
johann.Langhofer
2nd September 2002, 21:34
Sorry for being so late...
Win98 bug should be fixed now, I've updated the file
avsmon.dll (http://members.nextra.at/johann.langhofer/avisynth/avsmon.dll) .
At the moment there is no way for me to test on Win98 I'm very buzy with first tests of a new developed GUI like GraphEdit, you can preview here GraphAvi (http://members.nextra.at/johann.langhofer/avisynth/GraphAvi1.gif) .
I'll present some days later in the thread "Silly idea about future of avisynth".
Be patient for all other requests about AvsMonitor, I'll look forward to resolve them as soon as possible
:cool:
best regards
johann langhofer
sh0dan
3rd September 2002, 09:38
@johann: You rock! Is the graph program directly linked to Avisynth, or do you have external definitions of parameters for instance?
We have to do some structural changes for AviSynth 2.1.x and I've been thinking along the lines of better backend support, so you can better do visual parameter adjustments.
I think we should create a 2.1 branch in the CVS soon, so we can begin to support your visual editor beyond the changes you've already proposed.
What I see we need now:
- Extend parameter types (so the GUI can adjust more precise to the parameter type.
- Parameter names/descriptions, so the GUI can automatically adjust, if filters change.
- Parameter ranges.
- Filter descriptions.
johann.Langhofer
3rd September 2002, 12:53
@sh0dan,
the architecture so far is that "GraphAvi" uses avisynth as client via the Interface CreateEnvironment(). Trough some modifications in avisynth I'm able to read informations like filter chain, filter type and name. BUT: we have to do a lot of discussions, at this time I don't think that it would be possible to make a full reverse Editor because the "real graph" is not the same as supposed by the script, in other words there is no 1:1 mapping...
Anyway, the first goal was to visualze the graph and this is a good input for further disscussions. By the way, "GraphAvi" has now a start/stop/pause/track-support (see updated picture http://members.nextra.at/johann.langhofer/avisynth/GraphAvi1.gif ).
regards
johann langhofer
Guest
3rd September 2002, 13:06
We should have a formal specification analysis period before launching the effort to extend Avisynth. We can begin by reviewing existing plugin interfaces for existing products, such as Premiere. The specs are readily available and we need to learn from others' experiences lest we repeat all the mistakes. :)
Belgabor
3rd September 2002, 13:12
@johann: This looks really cool! One thing you should (imho) add asap is haveing more than one connector for filters which accept multiple clips so it's clear e.g. which chain goes top in StackVertical or which clip provides the video and which the audio in AudioDub. (Yes, I know the prog is just at its start, but i think that its less a hassle adding that now than later)
@sh0dan: One thing should be explicitly added to your list: A way for an app to find out which Filters/Functions are available. (You kinda hint that, I know. Just wanted to have it a 'hard point' ;))
Cheers
Belgabor
sh0dan
3rd September 2002, 17:30
@Belgabor:
Yes - I'm mostly worried about avisynth.h changes ATM, since it'll affect all filters, but you're absolutely right.
@neuron & johann:
Yes, we need a lengthy discussion on how to build 2.1 in the best possible way. I do however think we're well on the way to having the best API possible.
Cache is useable in (my estimation) around 50% of all filter stages. The only thing I can see it hurts is memory impact - perhaps filters could set a "cache-hint", so it can request that x frames before and after the current frame is stored (useful for all temporal filters), and then the rest is used for output buffering. That would as I see it eliminate most redundant caches.
I've been thinking on how adding YV12 to the possible colorspaces could affect performance and compatibility. It's a good colorspace in terms of performance, and it would allow avisynth to be used as a very fast postprocessing engine for displays - even though ffdshow does a very fine thing in this area. Perhaps a merge with ffdshow (in part) could gain us a lot in terms of flexibility and performance.
Any opinions?
hakko504
3rd September 2002, 20:40
Originally posted by sh0dan
I've been thinking on how adding YV12 to the possible colorspaces could affect performance and compatibility. It's a good colorspace in terms of performance, and it would allow avisynth to be used as a very fast postprocessing engine for displays - even though ffdshow does a very fine thing in this area. Perhaps a merge with ffdshow (in part) could gain us a lot in terms of flexibility and performance.
Any opinions? Anything that increases speed of a conversion must be good :D ;)
But seriously, there is a lot going on right now, (or so it seems) and I think you should sit down and look at what you want to get into each new release. Personally I think you should not rush YV12 support into a 2.1 release, but make that the next big release (2.2 or even 3.0) and make 2.1 guaranteed stable, with installer and autoloading of plugins. ATM I think these functions are the most wanted in a new release.
WarpEnterprises
3rd September 2002, 20:53
I'm also heaviliy voting for a stable release frist.
E.g. the error checking is by no means complete (I'm working on tests) - AviSynth should not crash only of wrong parameter usage.
trbarry
4th September 2002, 01:04
I think YV12 support would be great, though a stable release first is still probably a good idea. But if Avisynth supported yv12 it would not be hard to make an mpeg2dec.dll that passed that format.
But apologies for the OT, the Monitor seems quite nifty also. :)
- Tom
sh0dan
4th September 2002, 08:32
Stability is important! Absolutely agree - that's why 2.1 should be created as a seperate branch. I think 2.0.x should be stable. That means, no features will be added, when 2.1 is in alpha/beta stage, but bugs are corrected.
Alpha/Beta development should be independant of a non-beta version.
We could set up milestones, and set release targets for new features. My point is only, that if we change avisynth.h in 2.1 we should NOT change it again in 2.2 and 2.3!
So we should agree on how to do it, as Donald pointed out earlier. As for naming, the "2.1" brach could very well end up as 2.5, or 3.0, but that's not worth discussing now IMO.
Defiler
4th September 2002, 14:07
Perhaps someone should start a new thread for discussing the specification changes that will eventually become 2.1, 2.x, etc?
It sounds like an interesting topic.
BBWoof
30th September 2002, 00:40
Thanks Johann, MonitorFilter is a great addition to the filters already being written here.
I've been working on a tool suite for editing/encoding, and FilterMonitor may make that easier.
BB
RadicalEd
2nd October 2002, 00:42
err.. k, 1 question. In CCE, is the video supposed to blink on and then completely green and then back to the video and then green every second? :/
the script is
SetMemoryMax(40)
LoadPlugin("C:\PROGRA~1\DVD2SVCD\MPEG2Dec\MPEG2DEC.dll")
LoadPlugin("C:\unzipped\decomb400rc6[1]\decomb.dll")
Loadplugin("C:\unzipped\_2DCleanYUY2_v0_8\_2DCleanYUY2.dll")
Loadplugin("C:\Documents and Settings\default\Desktop\avsmon.dll")
mpeg2source("D:\DVD2SVCD\DVD2AV~1.D2V")
trim(299,171211)
Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true)
Decimate(cycle=5)
_2DCleanYUY2(0,4,3,3,0,3,3)
LanczosResize(352,360)
AddBorders(0,60,0,60)
monitorfilter()
ResampleAudio(44100)
I realize monitor filter isnt last because dvd2svcd inserts the resample automatically. Anyway I'm very much hoping this is just a display problem and my end video won't blink green every second (primarily because its going to take 30 more hours to encode out of 40 :/ )
Rrrough
20th November 2002, 19:53
@johann
now that avisynth + YV12 proved to be pretty stable, is there any chance that we see an avisynth 2.5 version of your nifty filter soon ?
cheers & thanks for this great project
johann.Langhofer
21st November 2002, 12:19
@Rrrough
OK, I'll work on it, hope not to need more than a few days....
Regards Johann
Rrrough
21st November 2002, 12:23
@johann
YEEHAW ! great news ! keep up the good work !
cheers
johann.Langhofer
24th November 2002, 13:36
Hi to all,
this filter only works in conjunction with avisynt25_alpha!
comments are welcome,
best regards
Johann Langhofer
the testscript was (one #monitorfilter uncommented at a time):
loadplugin("avsmon.dll")
avisource("thx_rgb32.avi")
swapuv
converttoyuy2
#monitorfilter
converttorgb24
#monitorfilter
converttorgb32
#monitorfilter
converttoyv12
#monitorfilter
avsmon (http://members.nextra.at/johann.langhofer/avisynth/avs25alpha/avsmon.dll)
Rrrough
24th November 2002, 19:13
hi, your filter is working real nice !
just some questions that came to my mind : is the histogram feature disabled in RGB & YV12 because it's too hard to implement ? would it be possible to call more than one instance to visually compare the effects of filters (for example use MonitorFilter before and after denoising).
anyway, thanx for your work, this is a very useful filter for me as is.
cheers
johann.Langhofer
24th November 2002, 19:59
@Rrrough
histogram feature for RGB ans YV12 should not the problem, but adding more than one instance of monitorfilter (maybe with additional comparing feature) is more for raining cats&dogs days.
At the moment I'm porting my own "MPGSOURCE"-Filter, which is based on MEDIATOR and can both, video and audio, to the new avisynth sources.
sorry Rrrrough, but thanx for your comment.
Best regards
Johann
Faceman101
25th November 2002, 02:30
Why not just drop your AVS into Media Player to view it?
Not being rude, just curious the benefits of this filter. I guess to see your AVS during encoding, but couldn't you just preview it in Media Player? Now I am not bashing at all, just want to discuss that aspect.
^^-+I4004+-^^
25th November 2002, 06:23
yes,image can be analyzed from VD too.....
and that's why i said (in post i just erased) that it would be
fun to see decompressed output..
it's not that much fun to see something that can be seen
from wmp or VD or...
input video IS VERY important,but after all isn't it the output that
interests us the most?
(and VD has no preview in fastrepack..hehe)
theReal
25th November 2002, 11:24
just curious the benefits of this filter. I guess to see your AVS during encoding, but couldn't you just preview it in Media Player?I find it very annoying not to have a preview window while encoding - and that is the case when I'm using VDub fast recompress as well as when I'm using Helix producer commandline to convert videos. Call it waste of cpu time, but for me encoding isn't the same when I can't see any preview :D
johann.Langhofer
25th November 2002, 12:55
Im wondering about the discussion, should I remove this filter?
The preview function was intended to have a possibility to check the encoding process to avoid strange results perhaps after some hours. It's up to everyone to turn off the preview after checking and after this time the cpu is not wasted.
Another aspect of this filter was the audio delay, does anybody know a better solution to calc the AV-delay especially with strong delayed material without optical and accoustical feedback? DVD2AVI makes some calculations at the beginning of the stream, but I've some vids where this method isn't sufficient.
Best regards
johann langhofer
Rrrough
25th November 2002, 13:40
I find it very annoying not to have a preview window while encoding - and that is the case when I'm using VDub fast recompress same here ! especially when encoding with AVS2AVI. and it comes with almost no speed penalty here.
adding more than one instance of monitorfilter (maybe with additional comparing feature) is more for raining cats&dogs days. don't worry, I don't want to cause a lot of work, just want to hear your opinion.
should I remove this filter? ABSOLUTELY NO ! Again, thank you very much for your useful filter !!!
cheers
dvd2svcd
25th November 2002, 15:06
I love it J.L. and don't take facemans post seriously, he either haven't read the entire thread or lacks imagination. This is a very cool filter and it works perfect for me (also when used in dvd2svcd so I have no idea why it fails for RadicalEd).
AlexK
25th November 2002, 18:10
Hello,
sorry for my question, but: how can I install and run this avisynth monitor ? I didn't find this. Perhaps I missed something ? And what version of avisynth must be installed to use the filter ?
Thanks in advance
Alex
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.