Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 2nd August 2014, 11:56   #1801  |  Link
simcut
Registered User
 
Join Date: Mar 2012
Posts: 38
Hi guys, quick question, with solely interlaced footage, in my avisynth script, do I need to add AssumeTFF() or AssumeBFF() depending on what DGIndex detects as the field order, or does it not matter at all, does QTGMC detect the field order anyway so I dont need those commands in, or do I have to have them in.

Currently I have an avisynth script each set up, one for TFF and another for BFF.

Thanks
simcut is offline  
Old 2nd August 2014, 12:25   #1802  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
I only add AssumeTFF/BFF when the sequence is clearly out of order.
Reel.Deel is offline  
Old 2nd August 2014, 12:44   #1803  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
QTGMC will rely on the field order AviSynth assumes after loading the source clip.

Not all source filters are able to determine the field order correctly (e.g. AviSource will probably assume BFF because the AVI container does not flag it, each VfW codec may have its own default, and BFF is the most common default for DV in AVI); sometimes even the encoding studio flagged the material wrong. In general, better be safe than sorry (to have wasted hours due to QTGMC creating motion "holes" because the assumed order was wrong).

Furthermore, never use QTGMC if there is no regular interlacing (e.g. don't use it on Telecine with 3:2 or worse pulldowns, or even on norm conversion results with blending).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 2nd August 2014, 13:03   #1804  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
Quote:
Originally Posted by LigH View Post
Furthermore, never use QTGMC if there is no regular interlacing (e.g. don't use it on Telecine with 3:2 or worse pulldowns, or even on norm conversion results with blending).
Out of interest, what is a good way to bob when redoing blended crap? I've been using QTGMC since it provides good quality even with non-purely interlaced material. Maybe it's just some of the post-processing stuff there that works well, I don't know.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline  
Old 2nd August 2014, 14:00   #1805  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by Boulder View Post
Out of interest, what is a good way to bob when redoing blended crap? I've been using QTGMC since it provides good quality even with non-purely interlaced material. Maybe it's just some of the post-processing stuff there that works well, I don't know.
Blended crap = blended fields or blended frames?
Dependiong on the root cause for the blending srestore() often helps. It might be a bit tricky (trial and error) to find the original (progressive) framerate if it is not compliant with one of the common (standard) rates.
Blended fields are more difficult or hopeless to fix, I think ....
Sharc is offline  
Old 2nd August 2014, 14:05   #1806  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
Oh, I meant preprocessing (=bobbing) the clip to feed to SRestore. SRestore itself works quite well in most cases if the pattern is constant.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline  
Old 2nd August 2014, 14:21   #1807  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
I normally use tdeint(mode=1) as a bobber,
or QTGMC(input type=0)
followed by srestore(omode="pp3"), possibly followed by
tdecimate() for removing double-blended fields.

You may already have tried this though ....

Last edited by Sharc; 2nd August 2014 at 14:44. Reason: mode=1
Sharc is offline  
Old 4th August 2014, 07:16   #1808  |  Link
DJ-1
Registered User
 
Join Date: May 2009
Posts: 328
Hi, if I want a good analysis of source material I need to have trimmed my source from time to time. I usually use dvd shrink & use its cut feature but have read about programs not doing 'clean-cuts'.
Can someone recommend a 'clean-cutting' cutter?, thanks.
DJ-1 is offline  
Old 4th August 2014, 07:23   #1809  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
For MPEG2 sources like on DVD Video: Cuttermaran or MPEG2Schnitt. They will be able to cut GOP-wise, or even frame-accurate with smart re-encoding if you use one of the MPEG2 encoder "provider" modules (e.g. for HC).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 4th August 2014, 12:38   #1810  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Dvd-Shrink cuts correctly on I-frames because it can not re-encode (no smart rendering).
Music Fan is offline  
Old 4th August 2014, 12:41   #1811  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Quote:
Originally Posted by Sharc View Post
I normally use tdeint(mode=1) as a bobber,
or QTGMC(input type=0)
followed by srestore(omode="pp3"), possibly followed by
tdecimate() for removing double-blended fields.
What does "double-blended fields" mean ?
Does your script work with blended fields from interlaced videos (resized without de-interlacing) ?
Music Fan is offline  
Old 4th August 2014, 19:33   #1812  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by Music Fan View Post
What does "double-blended fields" mean ?
Both fields of a frame are blended.
Quote:
Does your script work with blended fields from interlaced videos (resized without de-interlacing) ?
I don't know, but I doubt. You would have to try and see whether you get some improvement. There are probably better scripts for that purpose. Resizing of interlaced content without prior deinterlacing is bad.
Perhaps someone else could chime in ....
Sharc is offline  
Old 10th August 2014, 19:19   #1813  |  Link
simcut
Registered User
 
Join Date: Mar 2012
Posts: 38
Quote:
Originally Posted by LigH View Post
QTGMC will rely on the field order AviSynth assumes after loading the source clip.

Not all source filters are able to determine the field order correctly (e.g. AviSource will probably assume BFF because the AVI container does not flag it, each VfW codec may have its own default, and BFF is the most common default for DV in AVI); sometimes even the encoding studio flagged the material wrong. In general, better be safe than sorry (to have wasted hours due to QTGMC creating motion "holes" because the assumed order was wrong).

Furthermore, never use QTGMC if there is no regular interlacing (e.g. don't use it on Telecine with 3:2 or worse pulldowns, or even on norm conversion results with blending).
Thank you for your advice man, much appreciated!
simcut is offline  
Old 22nd September 2014, 22:11   #1814  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Would it be normal for QTGMC to be slower when working with non-mod16 video than if it's mod16?

I've been re-encoding some old video which is mostly 720x576 and running QTGMC in progressive mode to clean it up a little.
QTGMC(InputType=1, Ezdenoise=1)

I noticed every so often one of the encodes would take much longer. A little investigating seems to indicate it's due to a mod4 width. If I resize to mod16 in the script before QTGMC the speed goes back to normal, but that's not ideal as I'm also resizing after QTGMC.

It's not the end of the world and something I probably only noticed because the old dual-core I'm using is pretty slow anyway. When the resolution is 720x576 it only manages about 5.5fps, but CPU usage sits on 90%-100%. When the width is mod4 (ie 716x576) it drops to about 2.8fps and CPU usage hovers around 70%. There's a couple of encodes which I think ran even slower and they may have also had a mod4 height. I'd need to go back and do some more testing to confirm that.

I've tried QTGMC 3.32 and 3.33. I've checked to see whether I'm still using the QTGMC recommended versions of the various plugins and went back to the recommended versions where I wasn't but that didn't seem to make any difference. Avisynth 2.6.0.4, Windows XP.

Thanks.
hello_hello is offline  
Old 23rd September 2014, 07:10   #1815  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
It could be memory alignment playing tricks on you (see Crop in Avisynth's documentation). You could try using Crop with the align=true option to get around it. Or Crop(0,0,-0,-0,true) if you've already cropped the video elsewhere.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline  
Old 23rd September 2014, 08:04   #1816  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Thanks Boulder.

I ran a test with a source video with a resolution of 716x576.

With this script it runs at about 2.8fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
crop(0,0,-0,-0,true)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

With this script it runs at 5.1fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
Spline36Resize(720,576)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

I even tried a second PC (quadcore). Being slow and running in single threaded mode, I'd normally run two QTGMC encodes at the same time. When I do, the encode of the video with a mod16 resolution runs a fair bit faster (close to 2x) than the one with the mod4 resolution.
I've tested without fpsnum=25, fpsden=1 and threads=1, but they don't seem to be causing it. QTGMC's Ezdenoise doesn't seem to be the culprit either.
hello_hello is offline  
Old 23rd September 2014, 08:24   #1817  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
Uh, scaling twice... I may rather have added a border and cropped as much more.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 23rd September 2014, 08:25   #1818  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by hello_hello View Post
Thanks Boulder.

I ran a test with a source video with a resolution of 716x576.

With this script it runs at about 2.8fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
crop(0,0,-0,-0,true)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

With this script it runs at 5.1fps

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
Spline36Resize(720,576)
QTGMC(InputType=1, Ezdenoise=1)
crop(4, 4, -4, -6)
Spline36Resize(656,480)

I even tried a second PC (quadcore). Being slow and running in single threaded mode, I'd normally run two QTGMC encodes at the same time. When I do, the encode of the video with a mod16 resolution runs a fair bit faster (close to 2x) than the one with the mod4 resolution.
I've tested without fpsnum=25, fpsden=1 and threads=1, but they don't seem to be causing it. QTGMC's Ezdenoise doesn't seem to be the culprit either.
Instead of Spline36Resize(720,576), why not just AddBorders (4, 0, 0, 0) or something? The way you do it now, you're losing data.

Several QTGMC options even require mod16; so, always best to pad your source up to mod16 to begin with, I'd say.
__________________
Gorgeous, delicious, deculture!
asarian is offline  
Old 23rd September 2014, 08:28   #1819  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
In the end, I've used this script to solve the slowdown problem, while wondering why I didn't just think of it in the first place......

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\video.mkv", cachefile="D:\video.ffindex", fpsnum=25, fpsden=1, threads=1)
AddBorders(4,0,0,0)
QTGMC(InputType=1, Ezdenoise=1)
crop(8, 4, -4, -6)
Spline36Resize(656,480)

I use QTGMC for noise reduction quite a bit and I've not paid much attention to the source video dimensions in the past. Next time I'll try something similar if the source isn't mod16 to test whether the speed difference is normal.

Edit: I found the solution while you guys were suggesting it too, but I didn't see your posts until I submitted this one.
Thanks!

Last edited by hello_hello; 23rd September 2014 at 08:32.
hello_hello is offline  
Old 4th November 2014, 01:01   #1820  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Kudos to the VapourSynth guys for getting QTGMC native. Wonder how well it works.

Just passing by to say hello - happy to see the script still being used. My avisynth development fell by the wayside when other things came up. Today I needed to do some video processing for first time in a long time. I found I didn't even have a working avisynth setup, lol. I seem to have lost the latest QTGMC version I had been working on. Probably for the best, it was getting even more complex...
-Vit- is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.