EDIT: Another new version (10th Jan) While this isn't actually relevant to MPEG-4 AVC, I'm posting this here because it seems relevant to some of the programs which reside in this subforum, like MeGUI, RealAnime and staxrip. If a mod thinks that this is the wrong forum, then please move it. This post is to share my results with detection of content type (ie progressive, interlaced, film, or a hybrid of those). I would be pleased if you could test the program I've uploaded, and give feedback. I haven't been able to test much, as I have very few sources to work with. Algorithm The algorithm I'm using is a combination of what I could pick up of the AGK algorithm and what I worked out by myself. Given an avs script, my program does a selectrangeevery on it, so it doesn't have to analyse the whole video, and then adds code which is copied straight from AGK's avs scripts, which checks whether the frames are (a) moving; and (b) combed (using Decomb's IsCombed function). These results are written to a file called interlace.log, in the directory of the avs script. My program analyses this file in 5-frame chunks (as len0x said he did. Five is chosen, because telecining is most commonly in a 5-frame cycle). It ignores the chunks in which not every frame is moving, and then declares the chunks in which there is no combing as progressive, and declares the chunks in which there are exactly two consecutive combed frames as telecined, and declares everything else as interlaced. At the end, it counts the number of each type of chunk, and compares the most common one with the second-most-common one. If Code:
I'm so glad you're doing this - I was thinking of reverse-engineering AGK for MeGUI as well, but had been putting it off until the New Year. Now I don't need to bother :).
--------------------------- Squash Air Fresheners! http://forums.bimmerforums.com/forum....php?t=1206513
i have try to work on such tool : and i should still have a few hybrid sample, i will try to find the time to test it once i come back in my house. Bye and happy new year :)
Great work, for average Joe deinterlacing is far to complicated. Besides encoding frondends it makes also sense for any AviSynth user having a standalone application. Instead of mplayer maybe the avifile API could be used, I would be willing to contribute such things, I have a very fast .NET avifile wrapper that might be easy to use for this.
@stax: No problem, I would love it if you contributed. You might find the code disorganised, however -- I wasn't expecting anyone else to work on it. @edit: The code is under GPL.
--------------------------- There is no them on the road. :
Well, the error is pretty simple. Anyway, AviSynth is supposed to be generating that file, so I would guess that the problem is that, for some reason, AviSynth is not running properly. Can you see what happens when you try loading this script in VDub? EDIT: Just in case it isn't clear, you need to specify where mplayer is (and it needs to be able to play avs, which means a more recent build than about half a year ago), and you need Decomb.dll in your AviSynth plugins folder. Also, just for safety's sake, make sure your script ends in a newline. I think that's all you need. Looking at it in VDub should hopefully solve it, but I did get one problem which VDub managed fine, but mplayer crashed on, which had problems.