Forum

Forum



SearchSearch   Users   Registration   Entrance
Today: 05.12.2025 - 14:20:48
Pages:  1  2  

Automatic interlace detection

MessageAuthor

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:




hotdog19d

users




Statistics:
Messages: 139
Registration: 12.16.2002
14.02.20 - 18:17:33
Message # 1
RE: Automatic interlace detection

I suspect I chose wrongly when posting this in the AVC forum. Could someone please move this to the AviSynth forum?


---------------------------
'06 Tundra - Toy Hauler -- '89 325is, 24v Track Rat --'76 2002, Summer wannabe DD/restomod thing -- '03 Z4, GI Joe Roadster playset -- '01 R1100S, Beemer -- '07 Mini Cooper S -- '10 328xi

Charlie

users




Statistics:
Messages: 65
Registration: 03.03.2002
14.02.20 - 18:28:19
Message # 2
RE: Automatic interlace detection

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

stupenal

users




Statistics:
Messages: 38
Registration: 05.10.2002
14.02.20 - 18:36:33
Message # 3
RE: Automatic interlace detection

Perhaps could you ask Neuron2 if it kown some usefull tips to improve your algo.


---------------------------
: euro E30

PETER LEE

users




Statistics:
Messages: 138
Registration: 08.26.2002
14.02.20 - 18:44:56
Message # 4
RE: Automatic interlace detection

tritical and scharfis_brain, too, should be consulted. Unfortunately I cannot even download the files until I return from vacation.


---------------------------
no

Fraser

users




Statistics:
Messages: 16
Registration: 12.05.2002
14.02.20 - 18:50:54
Message # 5
RE: Automatic interlace detection

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 :)


---------------------------
-Brandon

alpinewhite98

users




Statistics:
Messages: 160
Registration: 09.25.2003
14.02.20 - 18:58:26
Message # 6
RE: Automatic interlace detection

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.


---------------------------
Greco540 '98 540i/6 Biarritz Blue/Beige Mods:CDV, Rogue Engineering Octane Short Shifter w/ WSR, Rogue Engineering Performance Transmission Mounts, Royal Purple Synchromax Transmission Fluid, GruppeM Filter Ram Charger

Greco540

users




Statistics:
Messages: 762
Registration: 01.15.2003
14.02.20 - 19:06:43
Message # 7
RE: Automatic interlace detection

@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. :

DarkM3

users




Statistics:
Messages: 554
Registration: 08.24.2003
14.02.20 - 19:10:40
Message # 8
RE: Automatic interlace detection

Using the latest version, it crashes with the error Could not find file 'C:\MyVideos\interlace.log' Code:




MC28REPSOL

users




Statistics:
Messages: 25
Registration: 10.18.2002
14.02.20 - 19:14:42
Message # 9
RE: Automatic interlace detection

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.




6piston

users




Statistics:
Messages: 316
Registration: 12.18.2002
14.02.20 - 19:25:22
Message # 10
RE: Automatic interlace detection
Do I have the latest version of AVISynth supported by DVD-RB Pro? : Previous topic
Pages:  1  2  

Message
Name
Message

Click on the dot next to the name to address the participant

           
   
The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants

Created with: XenForo 5.1.1