Log in

View Full Version : Filter Problems?


trance
10th July 2003, 17:59
I'm trying to implement some filters for Band of Brothers Eps2 but I get different results when doing previews (from GKnot Compression test previewer), AVScompare and even a small clip of the cloud scene. In all three cases, the result look really good (no banding in the cloud scene). However, when I finally encode the whole movie, it comes outs with mosquito noise and banding. I use the exact settings in the script for the three test run and for the final encode.

This is the script I used (which includes convultion 3D as the filter):

#
# Created with Gordian Knot
#
# http://gknot.doom9.org
#
# PLUGINS
SetWorkingDir("D:\PROGRA~1\DVD\GORDIA~1\")
LoadPlugin("mpeg2dec3.dll")
LoadPlugin("decomb.dll")
#LoadPlugin("dgbob.dll")
LoadPlugin("Convolution3d.dll")
#LoadPlugin("FluxSmooth.dll")
#LoadPlugin("TomsMoComp.dll")
#LoadPlugin("VSFilter.dll")
#LoadPlugin("SimpleResize.dll")
#
# SOURCE
mpeg2sourcempeg2source("E:\DVD\Band of Brothers\Projects\Band of Brothers Disc1 Episode 2\Brothers.d2v")
#
# TRIM
#trim(startframe,endframe)
#
# IVTC
Telecide(guide=1).Decimate(5)
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
#
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
#
# CROPPING
crop(0,0,720,480)
#
# DEINTERLACING (2)
#SeparateFields().SelectEven()
# or maybe
#DGBob(order=0,single=true)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
#
#
# SUBTITLES
#VobSub("FileName")
Convolution3d("moviehq")
# RESIZING
LanczosResize(640,352)
#
# DENOISING: choose one combination (or none)
# 1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmooth(5,7)
#
# 2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmooth(7,7)
#
# 3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmooth(10,15)
#
# BORDERS
#AddBorders(left,top,right,bottom)
#
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
#
# FOOL CCEnc
#ResampleAudio(44100)

KpeX
10th July 2003, 18:09
Sounds like you're not giving the video enough bitrate. What bitrate are you using for the final movie? Oh and btw when posting your script, delete any line that starts with a '#', that's a commented line in an AviSynth script.

trance
10th July 2003, 18:27
Bitrate is around 1700kb/s

7/9/2003 7:56:15 PM: Job "cloud scene test" started.

o Xvid - First Pass: E:\DVD\EP2 C3D HQ\Brothers.avs
o Xvid - Second Pass: E:\DVD\EP2 C3D HQ\Brothers.avs
o Mux Audio.
End of Job 6 (cloud scene test).
_______________________________________________________________________________________________________________________

Gordian Knot -
Encoding Job Data:

Type: EncXvid_All
Number: 6
Name: cloud scene test
Platform: WinXP (5.1.2600).2

Files:
VirtualDubModExe: D:\PROGRA~1\DVD\GORDIA~1\VirtualDubMod\VirtualDubMod.exe
NandubExe: D:\PROGRA~1\DVD\GORDIA~1\nandub\Nandub.exe
AviFinal: E:\DVD\EP2 C3D HQ\Brothers_1.avi
AviMovie: E:\DVD\EP2 C3D HQ\Brothers_1_Movie.avi
AviCredits: E:\DVD\EP2 C3D HQ\Brothers_1_Credits.avi
MovieFS: E:\DVD\EP2 C3D HQ\Brothers.avs
CreditsFS:
Log : E:\DVD\EP2 C3D HQ\Brothers_1.log
Stats: E:\DVD\EP2 C3D HQ\Brothers_1.stats
Ecf : E:\DVD\EP2 C3D HQ\Brothers_1.ecf

Options:
Quality/DRF: 0
CreditsStart: 0
UseEcf: 1
CreditsIVTC: 0
CreditsAppend: 0
DeleteInterm.: 0
EnforceBitrate: 0
AntiShit: 0

Calculator:
VideoSize: 615646 kbyte.
Audio1Size: 97501 kbyte.
Audio2Size: 0 kbyte.
Overhead: 3652 kbyte.
AviSize: 716800 kbyte (700 mbyte).
FilesSize: 0 kbyte.
TotalSize: 716800 kbyte (700 mbyte).
Interleaving: vbrmp3
Bitrate: 1617 k(=1000)Bits/s
Frames: 93507
FPS: 29.970
Duration: 052:0
Quality: 0.239 bits/(pixel*frame).
CompCheck3: 0.000 bits/(pixel*frame).
CompCheck5: 0.000 bits/(pixel*frame).
Resolution: 640 x 352

Audio 1:
Mode: Just Mux Source File.
SourceFile: E:\DVD\Band of Brothers\Projects\Band of Brothers Disc1 Episode 2\Bands ESP2 256.ac3
WavFile: E:\DVD\Band of Brothers\Projects\Band of Brothers Disc1 Episode 2\Bands ESP2 256.wav
Mp3File: E:\DVD\Band of Brothers\Projects\Band of Brothers Disc1 Episode 2\Bands ESP2 256.mp3
Azid:
Lame:
Delay: -66
Interval: 1
Preload: 500
Mux: 1
Recalc: 1
DeleteWav: 1

Audio 2:
none.

7:56:15 PM: Audio 1, determined: 97501 kb
7:56:15 PM: Audio 1, calc: 97501 kb
7:56:15 PM: New Bitrate for Movie = 1617 k(=1000)Bits/s

Adding this script to D:\PROGRA~1\DVD\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "Xvid - First Pass"
// $input "E:\DVD\EP2 C3D HQ\Brothers.avs"
// $output "E:\DVD\EP2 C3D HQ\Brothers_1_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("E:\\DVD\\EP2 C3D HQ\\Brothers.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x64697678,0,10000,0);
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("E:\\DVD\\EP2 C3D HQ\\Brothers_1_Movie.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

7:56:15 PM: Started Xvid - First Pass: E:\DVD\EP2 C3D HQ\Brothers.avs
3:09:19 AM: Finished Xvid - First Pass: Duration: 7 hours, 13 minutes, 3 seconds.
3:09:19 AM: Trying to open Log-file.
3:09:19 AM: Success: Log-file open.
3:09:19 AM: Encoded: 74805 Frames.
3:09:19 AM: Speed: 2.879 Frames per Second.
3:09:19 AM: WARNING: Number of counted frames differs from settings!
3:09:19 AM: WARNING: Settings: 93507
3:09:19 AM: WARNING: Counted: 74805
3:09:19 AM: WARNING: Difference: 18702
3:09:19 AM: Correcting Bitrate...
3:09:19 AM: Original Bitrate = 1617 k(=1000)Bits/s
3:09:19 AM: Now encoding at 2023 k(=1000)Bits/s
3:09:19 AM: New target size = 616377 Kb

Adding this script to D:\PROGRA~1\DVD\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "Xvid - Second Pass"
// $input "E:\DVD\EP2 C3D HQ\Brothers.avs"
// $output "E:\DVD\EP2 C3D HQ\Brothers_1_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("E:\\DVD\\EP2 C3D HQ\\Brothers.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x64697678,0,10000,0);
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("E:\\DVD\\EP2 C3D HQ\\Brothers_1_Movie.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

3:09:19 AM: Started Xvid - Second Pass: E:\DVD\EP2 C3D HQ\Brothers.avs
8:36:59 AM: Finished Xvid - Second Pass: Duration: 5 hours, 27 minutes, 40 seconds.
8:36:59 AM: Speed: 3.805 Frames per Second.

Adding this script to D:\PROGRA~1\DVD\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "DivX5 Append"
// $input "E:\DVD\EP2 C3D HQ\Brothers_1_Movie.avi"
// $output "E:\DVD\EP2 C3D HQ\Brothers_1.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("E:\\DVD\\EP2 C3D HQ\\Brothers_1_Movie.avi",0,0);
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("E:\\DVD\\Band of Brothers\\Projects\\Band of Brothers Disc1 Episode 2\\Bands ESP2 256.ac3",0x00000203,0);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,-66);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("E:\\DVD\\EP2 C3D HQ\\Brothers_1.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

8:36:59 AM: Started Muxing Audio.: E:\DVD\EP2 C3D HQ\Brothers_1_Movie.avi
8:38:22 AM: Finished Muxing Audio.: Duration: 1 minute, 22 seconds.

8:38:22 AM: Done.
8:38:22 AM: Movie = E:\DVD\EP2 C3D HQ\Brothers_1.avi
Total Encoding Time: 12 hours, 42 minutes, 6 seconds.
7/10/2003 8:38:22 AM: Job "cloud scene test" finished.
_______________________________________________________________________________________________________________________

trance
10th July 2003, 18:28
Perhaps I should lower the resolution?

KpeX
10th July 2003, 18:38
That's strange.....1700 should be plenty of bitrate for Xvid to work with.....and 640x isn't that high of a resolution...my only two remaining suggestions would be to post your xvid settings just in case something is off there, or try getting rid of that Convolution3D filter, I personally prefer not to do any smoothing at that high of a bitrate.

trance
10th July 2003, 18:47
I got horrendous band/mosquito noise without filters. It killed dark scenes, espeically on people's faces and in this case, made cloud/fog look blocky.

My Xvid settings are exactly the same as followed from Snowbreach's guide:

http://webcounter.goweb.de/52555LINK-9&http://snowbeach.gmxhome.de/MPEG-4_XviD_Koepi_24062003-1_Encoder_Guide_ver20030702.pdf

Only unfilter has work for me so far....

trance
10th July 2003, 21:14
I know notice that when i preview the avs file in VirtualDubMod, all different filters and settings are exactly the same? Can there be someething wrong the the avs script? I just edit the script generated by GKnot...

manono
10th July 2003, 21:25
Hi-

That series is real hard to compress. They added noise to it, as was done with SPR, to give it that old-timey appearance. My second episode, with the planes going through the clouds at the beginning, looks lousy also, and that was with a lower resolution. I should probably do it over myself, as I did it a long time ago with XviD, before the added compressibility that B-Frames afford. My suggestion would be to lower the resolution and try again.

DoW
10th July 2003, 21:27
The guide there lists a lot of settings that are optional, or source dependent. Please tell us EXACTLY what settings you have. If your using them, try turning off lumimasking, qpel, and anything on the debug tab. Also, post the build of Xvid you using. The fact that you describe 'horrible' noise, may mean that more filtering is needed. I would suggest adding dust to the filters used, and from tha AVS you posted, I can assume that gknot is using the YV12 version of Convolution3d, which is not quite as good as the YUY2 version at noise removal.

trance
10th July 2003, 22:12
Manono: I don't mind the noise..like you said it was an intended affect. BUT, that cloud scene has very bad banding/noise (that looks far worse then on the DVD) but the rest of the episode looks fine. Another scene with really bad noise occurs in the theatre in the first episode.

DoW: Thanks for replying. Yes, I am using the C3D from GKnot. Here are the settings I am using:

Koepi's XviD-24062003-1 _ALPHA_ Release

FIRST PASS
6 Ultra High
MPEG
XVID
4 Wide Search
300/1 (min/max frame interval)
Chroma Motion
Quarterpel

2/150/100/0 B frame
DX50 B-VOP

Debug: Auto Detect & Chroma Optimiser

2ND PASS is the same setting with default on the rest of the tabs.