Log in

View Full Version : Artifacts in an old black and white film


max-holz
21st October 2005, 12:53
I have tried to encode an old film in black and white with 333A build but there are many artifacts, areas of the frame seems to be yellow colored:

This is the encode log:

Next job job1-1 is a video job. encoder commandline:
"C:\Programmi\x264\x264.exe" --pass 1 --bitrate 2012 --stats "C:\Scambio\Elaborazione Video\Miracolo\Miracolo_movie.stats" --ref 5 --mixed-refs --bframes 3 --subme 7 --weightb --analyse all --8x8dct --me umh --threads 2 --cqmfile "C:\Programmi\x264\eqm_avc_hr.cfg" --progress --no-psnr --output NUL "C:\Scambio\Elaborazione Video\Miracolo\Miracolo_movie.avs"
successfully set up video encoder and callbacks for job job1-1
----------------------------------------------------------------------------------------------------------

Log for job job1-1

avis [info]: 512x384 @ 25.00 fps (139759 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2
x264 [info]: slice I:1169 Avg QP:19.99 size: 28551
x264 [info]: slice P:70846 Avg QP:21.87 size: 12370
x264 [info]: slice B:67744 Avg QP:24.09 size: 7201
x264 [info]: mb I I16..4: 10.2% 63.0% 26.8%
x264 [info]: mb P I16..4: 0.6% 3.6% 2.1% P16..4: 46.3% 22.3% 14.2% 1.6% 0.5% skip: 9.0%
x264 [info]: mb B I16..4: 1.6% 3.4% 0.8% B16..8: 45.5% 3.9% 8.3% direct: 5.0% skip:31.5%
x264 [info]: 8x8 transform intra:58.6% inter:44.7%
x264 [info]: ref P 63.8% 15.2% 9.8% 6.0% 5.3%
x264 [info]: ref B 73.8% 12.3% 6.6% 3.9% 3.5%
x264 [info]: kb/s:1999.9

Actual bitrate after encoding without container overhead: 2001.13

----------------------------------------------------------------------------------------------------------
job job1-1 has been processed. This job is linked to the next job: job1-2
Next job job1-2 is a video job. encoder commandline:
"C:\Programmi\x264\x264.exe" --pass 2 --bitrate 2012 --stats "C:\Scambio\Elaborazione Video\Miracolo\Miracolo_movie.stats" --ref 5 --mixed-refs --bframes 3 --subme 7 --weightb --analyse all --8x8dct --me umh --threads 2 --cqmfile "C:\Programmi\x264\eqm_avc_hr.cfg" --progress --no-psnr --output "C:\Scambio\Elaborazione Video\Miracolo\Miracolo_movie.mkv" "C:\Scambio\Elaborazione Video\Miracolo\Miracolo_movie.avs"
successfully set up video encoder and callbacks for job job1-2
----------------------------------------------------------------------------------------------------------

Log for job job1-2

avis [info]: 512x384 @ 25.00 fps (139759 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2
x264 [info]: slice I:1169 Avg QP:19.70 size: 29215
x264 [info]: slice P:70846 Avg QP:21.80 size: 12559
x264 [info]: slice B:67744 Avg QP:24.15 size: 7115
x264 [info]: mb I I16..4: 9.8% 63.1% 27.1%
x264 [info]: mb P I16..4: 0.6% 3.5% 2.3% P16..4: 46.6% 21.8% 14.0% 1.7% 0.5% skip: 9.1%
x264 [info]: mb B I16..4: 1.5% 3.1% 0.9% B16..8: 45.0% 3.9% 8.5% direct: 4.8% skip:32.3%
x264 [info]: 8x8 transform intra:56.8% inter:44.4%
x264 [info]: ref P 63.9% 15.2% 9.7% 5.9% 5.2%
x264 [info]: ref B 73.9% 12.2% 6.5% 3.9% 3.5%
x264 [info]: kb/s:2011.9

Actual bitrate after encoding without container overhead: 2013.11
desired video bitrate of this job: 2012 kbit/s - obtained video bitrate: 2015.38962070421 kbit/s

and this the avs script I have used:

LoadPlugin("C:\Programmi\x264\DGDecode.dll")
LoadPlugin("C:\Programmi\x264\plugins\autocrop.dll")
LoadPlugin("C:\Programmi\x264\plugins\RemoveGrainSSE3.dll")
LoadPlugin("C:\Programmi\x264\plugins\kerneldeint.dll")

movie = mpeg2source("C:\Scambio\Elaborazione Video\Miracolo\Miracolo.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=1,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.06666666666667
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
out_width = 512
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
KernelDeInt(movie,order=1,sharp=true)
autocrop(mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=1,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)

Manao
21st October 2005, 13:02
We need, at least, a screenshot ( source / avs source / result ) showing the problem, if possible a video sample. What would be perfect would be also to have the corresponding source sample.

Oh, and one piece of information could avoid all the trouble to make accessible that data to us : What decoder did you use (if you used ffdshow/vlc/mplayer/libavcodec, then read the faq)

Teegedeck
21st October 2005, 13:09
Yes; you used a custom matrix (eqm_avc_hr); only Nero's decoder can play the result.

max-holz
21st October 2005, 13:16
Yes; you used a custom matrix (eqm_avc_hr); only Nero's decoder can play the result.

Yes I use Nero Show Time for playing this kind files, but indeed the artifacts remain.

Manao
21st October 2005, 13:41
Not even nero's decoder should be used with CQM since it is buggy ( with at least one stream generated by Sharktooth during Ateme beta test ).

I'd use elecard / moonlight or the JM ( to be on the safe side )

max-holz
21st October 2005, 13:47
This is the source from VOB:

http://img471.imageshack.us/img471/7141/miracolovob4xi.png

and this is the compressed one, resized to 512x384

http://img471.imageshack.us/img471/4949/miracolox2643ft.png

See the yellow artifact in the rigth bottom of the frame.

giandrea
22nd October 2005, 01:04
OT. Is it the movie "Miracolo a Milano"? :) :)

akupenguin
22nd October 2005, 01:18
Is it really black and white? Does MergeChroma(BlankClip(last)) do anything?

Revgen
22nd October 2005, 01:27
@max-holz

Try deinterlacing and denoising before you do the cropping and resizing.

I got a hunch that it might be causing the problem.

foxyshadis
22nd October 2005, 04:19
If it really is black and white through the video then MergeLuma(Blankclip(Last)) as a final step should eliminate all possibility of filters bringing out more-or-less hidden chroma artifacts in the original. (Thanks aku for the idea.)

max-holz
22nd October 2005, 08:11
Well

For the O.T. question yes It's Miracolo a Milano by Vittorio De Sica (1951)

MergeLuma(Blankclip(Last))

Cos I'am not very expert in the AviSynth sintax, what's Last?; I suppose is the parameter of Blankclip function, if it's right which value takes this parameter? If I have understood, this command must be executed as the last of the script ok?

I have the intention doing two tests:
1) Using the original avs script I have posted here but without the custom matrix by Sharktooth
2) Using the custom matrix and the command "MergeLuma(Blankclip(Last))" in the avs script

I use MeGUI, someone could explain exactly to me what I must do for not rencoding the whole film but only a sample (4 - 5 minutes)?

Beg my English

Revgen
22nd October 2005, 09:20
I suggest just doing greyscale() instead instead of mergechroma. It is B&W afterall.

max-holz
22nd October 2005, 14:19
I have done the tests. It's the use of custom matrix that produces artifacts during decoding.
Is there some player or directshow filter fully compatible with CMQ?

Manao
22nd October 2005, 14:30
As said earlier on this thread :I'd use elecard / moonlight or the JM ( to be on the safe side )Elecard / moonlight provide DirectShow filters that can be used in other players.

bond
22nd October 2005, 14:32
I have done the tests. It's the use of custom matrix that produces artifacts during decoding.
Is there some player or directshow filter fully compatible with CMQ?the only decoders able to handle cqm are nero, elecard and moonlight

edit: ups manao was faster ;)