Log in

View Full Version : How to remove aliasing and blocking on this movie ?


Music Fan
11th August 2015, 14:06
Hi,
I tested several filters but can't remove blocks and aliasing on a movie (but I'm not a filter specialist), here is a sample ;
https://www.sendspace.com/file/0em3v2

Look at the blocks in the black parts of picture and aliasing on nearly everything else.
There are also problems with colors and format but I found settings that are ok for me ;
-resize in 1280,590, probably with LimitedSharpenFaster
-Tweak(hue=-6, sat=1.1, Bright=-15, cont=1.22)

I don't need it to be perfect, it's not that important for me but I'd like to improve the quality with a not too slow script if possible, thanks.

Music Fan
15th August 2015, 10:32
Do you need captures before to download my sample ? Anyway it's not big, 26 MB, it's quickly downloaded.

LemMotlow
15th August 2015, 21:41
Your sample has been incorrectly processed and resized. We need to see a short sample of the original. How was the original made? ? Where did it come from?

What do you want for final output? How will the movie be played? Why is the sample incorrectly resized and re-encoded for 16:9 display? The movie is not 16:9. It's 2.35:1.

16:9 (incorrect):
http://forum.doom9.org/attachment.php?attachmentid=14959&stc=1&d=1439670931

2.35:1 (correct):
http://forum.doom9.org/attachment.php?attachmentid=14960&stc=1&d=1439670973

Music Fan
15th August 2015, 22:39
This is the only version I get and I 'd like to correct this bad encoding.

The format is not really 2.35, it's seems to be ok if resized in 1280,590.
I will also assume fps in 23.976 (24000, 1001) to get the original speed and add borders to get 1280.720.
I already dealt with the sound.
I will make an AVCHD, that's why I upscale and don't let in 720.576, because my player handles 23.976 fps if the video is at least in 720p.

Here is my current script which is insufficient, it only corrects format and colors ;
LWLibavVideoSource("F:\movie.mp4")#720*576p25
AssumeFPS(24000, 1001)
LimitedSharpenFaster(dest_x=1280, dest_y=590)
Tweak(hue=-6, sat=1.1, Bright=-15, cont=1.22)
converttoyuy2()
addborders(0,65,0,65)#1280,720
converttoyv12()

LemMotlow
16th August 2015, 02:44
You can make it whatever aspect ratio you want, but the movie is 2.35:1. If you like distorted egg-shaped planets, vertically stretched squares, and skinny people that's your business but most people would think it's weird, not to mention visually incorrect. You're also making some unnecessary colorspace conversions, which doesn't do much to improve quality.

So you're saying that the sample is the "original" and is all you have to work with? I thought you mentioned you had a "capture", What kind of capture?

Music Fan
16th August 2015, 13:57
By captures I mean jpeg (exported with Virtual Dub for example), to display here pictures for those who wanna see how it looks like before downloading the file. And yes, this is the only version I have of this movie and I didn't encoded it myself (I wouldn't have dared to create so much problems with format, colors, aliasing ...).

Some movies are not exactly in 2.35, and this encoding has perhaps been cropped even if the movie was originally in 2.35.
1280*590 looks ok to me, everything looks flattened if resized in 2.35 (1280*544).
And my color correction is far better than the original, how can you deny it (look at the blacks, they are grey in the file) ?

Anyway, I'm still waiting responses to my initial questions ; I believe there are a lot of specialists here that can help for this kind of artifacts.

Reel.Deel
16th August 2015, 15:19
What's the source of this movie? DVD, TV capture, or something else? I took a look at the sample and it looks like someone already butchered it. If you really care about this movie maybe you should consider buying the NTSC DVD (http://www.amazon.com/Space-Truckers-Tim-Loane/dp/B00000IC5K).

LemMotlow
16th August 2015, 16:12
I was going to suggest the same thing, but Reel.Deel got here first.

The idiot that borked the original cropped and resized incorrectly, even managed to somehow screw up inverse telecine, then encoded at a bitrate even lower than lots of people use for MPEG1 VCD. There's no fix for the line twitter and aliasing without blurring the video to smithereens, and industrial strength deblocking will make it worse. Get the DVD.

If you still want to debate the aspect ratio:

Amazon.com DVD issue (http://www.amazon.com/Space-Truckers-Tim-Loane/dp/B00000IC5K):

Product Details
Format: Multiple Formats, Color, Letterboxed, NTSC, Special Edition, Widescreen
Aspect Ratio: 2.35:1

imdb.com (http://www.imdb.com/title/tt0120199/combined) production specs:
Additional Details
Country: UK | USA | Ireland
Language: English
Color: Color (Technicolor)
Aspect Ratio: 2.35 : 1
Sound Mix: Dolby Digital

Music Fan
16th August 2015, 16:32
The dvd of this movie does not exist in my land, that's why I took it where you can guess (I never buy zone 1 ntsc dvd, especially without subtitles in my language).

About the ratio, please read carefully what I wrote and don't create debate where there isn't, I already said I knew 2.35 was probably the original format, but it has apparently been modified and borked, as you say.

Anyway, let's take this bad encoding as a challenge, it can be helpful (for me and) for similar encodings that don't exist (anymore or everywhere) in dvd.
Just tell me what filters may help to reduce aliasing and blocking on this movie, and also some settings if you find good ones, thanks.

I tried Qtgmc, Deblock, Deblock QED, GradFun2DBmod, and maybe others (I don't remember everything I tried) without success. But I'm not not used to these filters.

creaothceann
16th August 2015, 19:04
The dvd of this movie does not exist in my land, that's why I took it where you can guess (I never buy zone 1 ntsc dvd, especially without subtitles in my language).

Just import it. Subs can be obtained elsewhere if you really need them.

Music Fan
16th August 2015, 19:43
I prefer to try to increase the quality of this encoding for some reasons, those who really like to use avisynth should understand me.

LemMotlow
17th August 2015, 00:27
You can clean most of the macroblocks, but the aliasing won't go away. The fields that defined smooth edges on motion in the original were discarded a long time ago.

https://www.mediafire.com/download/1rwvlbumq44twho is encoded for PAL DVD, 25fps with 2:2 pulldown, 118MB, at bitrates to avoid more banding and block noise. Upsampling the low bitrate sample isn't a good idea, but you can do it if you want. The original color is too blue in the midtones and brights, a bit too red in the blacks. Many darks are already crushed, and chroma exceeds RGB255.

LoadVirtualDubPlugin("path:\VirtualDub\plugins\ColorMill.vdf", "ColorMill", 1)
aud = ffaudiosource("Drive:\path\to\ST.mkv")
vid = ffvideosource("Drive:\path\to\ST.mkv")
audiodub(vid,aud)
AssumeFPS("ntsc_film",sync_audio=true)

ColorYUV(off_y=-6)
ContrastMask(enhance=1.2)
SmoothLevels(16,0.95,255,16,250,chroma=200,limiter=0,tvrange=true,dither=100,protect=6)
QTGMC(InputType=1,sharpness=0.7,NoiseProcess=2, GrainRestore=0.2, NoiseRestore=0.2, \
NoiseTR=2,NoiseDeint="Generate", StabilizeNoise=true)
DeBlock()

Dither_convert_8_to_16 ()
GradFun3(thr=1.0,lsb_in=true,lsb=true)
Dither_resize16 (720, 472, kernel="spline36", cplace="MPEG2")
Dither_convert_yuv_to_rgb(matrix="601",interlaced=false,tv_range=true,cplace="MPEG2",\
lsb_in=true,output="rgb32")

ColorMill(25695, 25700, 24420, 25700, 24666, 25702, 25700, 25700, 25700, 25700, 25700, 25700, 25700, 1124, 5)

Dither_convert_rgb_to_yuv(matrix="601",interlaced=false,tv_range=true,cplace="MPEG2",\
lsb=false,output="YV12")
LSFMod(strength=50)
AddGrainC(1.2,1.2)
AddBorders(0,52,0,52)
return last

manono
17th August 2015, 01:10
I'm going to put this thread out of its misery as the 'source' is obviously an illegally obtained download of a copyrighted work. Thread closed and be thankful, Music Fan, you haven't been issued a strike.