View Full Version : Black and white movie settings
rvas18
21st January 2003, 16:57
i was wondering if there are any recomended settings for Black and white movies. i plan on ripping Raging Bull, and Citizen Kane. i was wondering if there any Avisynth / Vdub filters that could benifit me (temporal smoother settings, codec config settings, noise filters, resizers, etc)
any help is alway appreciated
rvas18 ~~~Raśl
cult
21st January 2003, 17:42
greyscale()
sh0dan
21st January 2003, 20:35
Watch out with raging bull and greyscale - there are some colored parts in the middle of the film. I did it recently, and got quite nice results on an XviD 2CD with AC3. I selected out the greyscale parts - added greyscale() to them, did a c3d "movieHQ" - a temporalsoften(3,3,0,mode=2, scenechange=10), and a lanczos resize.
something like this:mpeg2source("")
convolution3d(preset="movieHQ")
lanczosresize(something,something)
temporalsoften(3,3,0,mode=2, scenechange=10)
limiter()
part1=trim(0,something)
part2=trim(,).greyscale()
part3=trim(,)
part4=trim(,).greyscale()
return part1+part2+part3+part4
Sorry I can't give you the exact script.
MrBunny
21st January 2003, 21:38
@sh0dan or cult
About greyscale, on a true black and white movie, will greyscale actually help in any meaningful way since the source is already "greyscale". Wouldn't it just zero the already zeroed chroma components?
And a general question to everyone about B&W movies. Personally I use Xvid most of the time, but this should extend to any of the DCT based codecs. At realtively low bitrates, you start to lose the higher frequency components of the image, which I believe is a cause of mosquito noise. Especially in B&W movies, where edge contrast is often quite high, this resulting noise is quite visible. I know that this is the fault of the codec, and probably this question could go in the xvid forum, but currently the only way I can think of to deal with this is to make the source more compressible with preprocessing filters (c3d, temp smoothers, noise reducers...the works). Does anyone have any advice about a different approach, or a nice filter combination that might do the trick?
Mr. B
sh0dan
21st January 2003, 22:13
There might be some small chroma variations in your source, therefore a greyscale will eliminate those.
I personally use c3d and temporalsoften to smooth out the worst noise - that allows me to often do a lanczos resize, which I prefer. But it's a matter of taste - preserve film grain or having sharp edges. Doing both requires too much bitrate for my taste.
edit: btw - you might want to try changing the temporalsoften(3,3,3... to something less conservative temporalsoften(3,5,5,mode=2,scenechange=10) might also help you out even more in repects of compressability.
ErMaC
22nd January 2003, 10:05
Remember that XviD has a Greyscale mode! I encoded Casablanca and Clerks using this mode and things turned out fine. I would suspect using that in conjunction with the greyscale() filter will give you better efficiency.
Also, for the example you listed with Raging Bull having a few color parts, for a music video I did that was B&W for most of it, in my last XviD encode I encoded the first section with the greyscale flag set in XviD and then encoded the rest without it, and merged them with VDub's append segment feature, and it worked fine. So if you want to take advantage of the greyscale flag in XviD, note that you can merge greyscale-flagged and non-flagged clips.
sh0dan
22nd January 2003, 13:38
Xvid greyscale encoding will not give you any qualitywise improvements, if you use greyscale(). I'll be slightly faster, but otherwise there will not be any differences.
cult
22nd January 2003, 19:41
sometimes avisynth's greyscale works better than xvid's.For example throne of blood,of kurosawa.With xvid there were traces of colors left,but with avisynth it worked fine.Better do a test and judje for yourself before doing the final encoding
Eric B
25th February 2003, 18:51
I would like to encode CitizneKane as well (Black & Whithe, 2h, 4/3)
I wonder if one CD is enough.
What do you think about the following script ?
Crop(14,1,696,572)
Lanczos3Resize(640,480,0,0.5) #.greyscale()
TemporalSmoother(2,1)
convolution3d(preset="movieHQ")
Which plugin for temporalsoften ?
How to use .greyscale() ?
For an original B&W film, is greyscale necessary ?
What about greyscale of Xvid ? Is it still 24 bits or lower ? Can the index q=bits/(pixels*frame) go far lower from 0.2 as 0.08 for example (0.2/0.08=24/8 if greyscale is in 8 bits)
sh0dan
25th February 2003, 20:24
Use "LanczosResize(640,480)" Instead - I'm not sure what your current settings are doing, but I'm pretty sure it's not what you intended.
Temporalsoften is built into AviSynth. To use mode 2 and scenechange, you must have the 2.50 beta.
You just put in "Greyscale()" at the en of your script - it doesn't matter where.
The pits/pixel should not get more than 10% below what you usually do - color information doesn't take up more than that. If you usually go for 0.2, go for 0.18 with greyscale material!
With the above modifications your script could look like this:
(AviSynth 2.5)
Crop(14,2,696,572)
convolution3d(preset="movieHQ")
LanczosResize(640,480)
TemporalSoften(3,5,0,mode=2,scenechange=10)
greyscale()
limiter()
You could move conv3d below the resize - that would make it faster, but you'll get a better result if you leave it where it is.
(AviSynth 2.0)
Crop(14,2,696,572)
convolution3d(preset="movieHQ")
LanczosResize(640,480)
TemporalSmoother(2,1)
greyscale()
2.5 will get you the best result - probably at the same speed.
Edit: Didn't see you had used Lanczos3 - Lanczos will work fine for both versions. Corrected the scripts!
Eric B
25th February 2003, 22:39
Thanks a lot for your detailled answer.
According to the documentation, greyscale is for "Convert to greyscale". Is it necessary for original B&W material ?
And should I also enable greyscale in xvid ?
Or perhaps whould I use RV9 to keep the movie in only one CD.
I've just installed Avisynth 2.5. Where are the filter dll installed ? Because, I have one version installed by AutoRV9, another by GordianKnot, and this one directly. I wonder if I could clean some files in the directory (to have only one version installed)
Manao
26th February 2003, 00:39
The source is perhaps not perfectly in B & W. Using greyscale(), you are certain to get as output nothing else than luma information. It helps the codec.
You have to install the dll in C:\Program Files\AviSynth\Plugin\, or whatever is your install path of avisynth.
I didn't see the movie, but it's old, it must be grainy, it's rather long, and it's 4/3 so you may surely have to increase your compressibility :
* Use bilinearresize instead of lanczos
* Put the convolution3d after the resize ( you lose in sharpness, you gain in compressibility )
* Use fluxsmooth ( before resizing )
But of course, add the filters one by one, and try each times to see if :
* the compressibility is enough to fit one CD
* the quality please your eyes.
Finally : Use either Xvid + b-frames + greyscale mode or RV9, but don't compare xvid stable to RV9 for such an encode ( would not be fair to xvid ).
Oh, I almost forgot : the MPEG2 and MPEG4 use the YV12 colorspace format, which means there are never 24 bit in the color depth, but 12 ( or 16, I don't know, but NOT 24 ). But greyscale mode in xvid changes nothing to the colorspace used.
Eric B
26th February 2003, 14:23
Thanks
As I had problem with Avisynth 2.5 (I should have read the FAQ before!), I finaly use the following script (based on 2.0 suggested by sh0dan, because I've launch the encoding process before I read your thread, Manao) for RV9 encoding :
Video=Mpeg2Source("D:\DVDToDivx\CitizenKane\CitizenKane.d2v")
Audio = WavSource("D:\DVDToDivx\CitizenKane\Stream1.WAV")
Video=AudioDub(Video,Audio)
Video=GreedyHMA(Video,1,0,0,0,0,0,0,0)
Video=Crop(Video,14,1,696,572)
Video=Lanczos3Resize(Video,576,432)
Video=TemporalSmoother(Video,2,1)
Video=Convolution3D(Video,preset="movieHQ")
Video=greyscale(Video)
Return(Video)
I've decreased the resolution to increase the bits/(pixels*frames) to 0.12, and add a desinterlace filter, because the movie look interlaced.
With all these filters, the encoding process is very slow, I didn't ever wait such a long time for a result : 16 hours !, about 6FPS in my xp1600+). Hopefully, the movie is quite good.
Perhaps I should try the script in a little part of the movie before launching the whole movie encoding...
As usual, RV9 movie is less detailled than the original.
The greyscale function is a bit surprising, the "colors" differ from the original : true B&W in original, more "green" in RV9, or at least more contrast and brighter.
waka
26th February 2003, 23:56
I ran into the greyscale() being green not too long ago. I never did figure out what was going on. Substitute "tweak(video,sat=0)" for "greyscale(video)" and see if its any better. Its easy to check with the eyedropper tool in photoshop or equivalent. With greyscale, G is elevated slightly(3 or so) over R and B. With tweak, RGB are all equal.
Manao
27th February 2003, 00:48
@waka : what do you use to preview the avs with greyscale ? Perhaps it's the fault of :
* The viewer
* The overlay ( eh, why not, I don't know from where the eyedropper takes its data, and some cards make strange calculation in the overlay... )
* Eyedropper itself, if while converting the thing it gets from YV12 ( if previewed with something that use the overlay, so not vdub ) it doesn't know how to convert in RGB
But I don't think that for a so simple function like greyscale, the developpers would make a mistake where you only have to drop chroma data
However, that's true I got the same impression in vdub that the picture was greenish, but the encoding result was always fine for me.
waka
27th February 2003, 03:08
The avs was opened in vdub, source frame copied to clipboard, and then opened in photoshop. The green remains after encoding so I don't think its a preview thing. If you enabled greyscale in xvid, I would guess thats why the preview was green but the final encode was fine. Xvid did its own greyscale on the green video.
Greyscale works fine on RGB, using either converttorgb or pixel_type in avisource. If I make a huffyuv YUY2 clip that really is greyscale and feed it to vdub through avisynth(staying in YUY2, nothing besides avisource) its fine. Adding a greyscale to the avs causes it to get the green tint. This behavior is the same for fast recompress, normal recompress, and full processing mode in vdub.
I agree that it's unlikely the developers would make a mistake on a simple function. But the above tests seem to point to greyscale, so I don't know what to think. I would guess it's an odd quirk of my system, and perhaps others. Unfortunately, I'm not enough of a coder to look at greyscale and tweak, find the difference in the code, and then determine whats going on.
Edit:
Using the analyze function of coloryuv, YUY2 greyscale gives 127 in U and V. RGB greyscale and tweak give 128. It should be 128, right?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.