Thanks to
Gooch for providing me a 3-min clip so that I was able to try out various settings.
The encoding settings is informative, but the most important setting, as far as size is concerned, is
bitrate=1966. It uses 1.966 Mbps.
I got 5.094 Mbps for my first attempt (log at the end of this post), compared to the original's 5.278 Mbps. Perhaps the CRF was too low?
Code: Select all
CRF bitrate
org 5.278
20 5.094
22 4.206
24 3.298
26 2.263
27 1.781
28 1.348
CRF 28 was when it crossed my visual threshold, so I would go with either 26 or 27. With CRF 27, the bitrate is already lower than the reference -- assuming both have the same average bitrate -- and it still has most of the grain!
Next is to denoise it. As mentioned, hqdn3d denoise does not work. Looking at the failed attempt, my take is the grain is (i) attenuated [due to insufficient DVD bitrate], (ii) aliased and coarser [due to SD res] and (iii) mixed with MPEG-2 artifacts.
But NLMeans denoise
can work. After a few tests, I settled on 6:0.5:3:5:6:0. What it means:
Strength 6. 4 was a bit too weak, and 8 was too strong.
Origin weight 0.5. My default value.
Patch size 3. This cannot be too high for SD res. 5 made it too soft.
Search range 5. Just search nearby.
Frames 6. I usually use a max of 1/4s for animation.
Pre-filtering mode 0. Doesn't seem to have much effect, so I don't use it.
The result, at CRF 27, uses 0.705 Mbps. The video still has a bit of noise, which helps to hide the MPEG-2 artifacts. It is good enough for me, but I would still keep the source -- in case we found how to encode better in the future!
Encoding log for my first attempt:
Code: Select all
[11:02:10] job configuration:
[11:02:10] * source
[11:02:10] + looney_tunes_sample.mov
[11:02:10] + title 1, chapter(s) 1 to 1
[11:02:10] + container: mov,mp4,m4a,3gp,3g2,mj2
[11:02:10] + data rate: 5278 kbps
[11:02:10] * destination
[11:02:10] + crf20.mkv
[11:02:10] + container: Matroska (libavformat)
[11:02:10] * video track
[11:02:10] + decoder: mpeg2video
[11:02:10] + bitrate 9800 kbps
[11:02:10] + filters
[11:02:10] + Decomb (default settings)
[11:02:10] + Framerate Shaper (0:27000000:1080000)
[11:02:10] + frame rate: same as source (around 25.000 fps)
[11:02:10] + Crop and Scale (720:576:0:0:0:0)
[11:02:10] + source: 720 * 576, crop (0/0/0/0): 720 * 576, scale: 720 * 576
[11:02:10] + custom anamorphic
[11:02:10] + storage dimensions: 720 * 576, mod 2
[11:02:10] + pixel aspect ratio: 16 / 15
[11:02:10] + display dimensions: 768 * 576
[11:02:10] + encoder: H.264 (libx264)
[11:02:10] + preset: veryslow
[11:02:10] + options: aq-strength=0.7:psnr=0:ssim=0:ref=4:bframes=6
[11:02:10] + quality: 20.00 (RF)
[11:02:10] reader: first SCR -17190 id 0x0 DTS -17190
[11:02:10] encx264: encoding at constant RF 20.000000
[11:02:10] encx264: unparsed options: aq-strength=0.70:psnr=0:ssim=0:ref=4:bframes=6:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:rc-lookahead=60
x264 [info]: using SAR=16/15
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 3.0
[11:02:10] sync: first pts is 3600
[11:05:34] reader: done. 1 scr changes
[11:05:41] work: average encoding speed for job is 21.806171 fps
[11:05:41] mux: track 0, 4492 frames, 114420082 bytes, 5094.39 kbps, fifo 512
[11:05:41] sync: got 4493 frames, 4493 expected
[11:05:41] decomb: deinterlaced 2 | blended 39 | unfiltered 4451 | total 4492
[11:05:41] render: lost time: 0 (0 frames)
[11:05:41] render: gained time: 0 (0 frames) (0 not accounted for)
[11:05:41] mpeg2video-decoder done: 4493 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:34 Avg QP:20.58 size: 53045
x264 [info]: frame P:1165 Avg QP:23.44 size: 33467
x264 [info]: frame B:3293 Avg QP:25.11 size: 22359
x264 [info]: consecutive B-frames: 2.3% 5.4% 15.8% 37.1% 20.0% 16.0% 3.3%
x264 [info]: mb I I16..4: 2.5% 94.7% 2.8%
x264 [info]: mb P I16..4: 0.7% 59.5% 1.2% P16..4: 17.7% 10.5% 6.4% 0.2% 0.0% skip: 3.6%
x264 [info]: mb B I16..4: 0.2% 39.2% 0.4% B16..8: 26.1% 10.0% 3.2% direct: 9.8% skip:11.1% L0:36.8% L1:35.2% BI:28.0%
x264 [info]: 8x8 transform intra:97.9% inter:91.9%
x264 [info]: direct mvs spatial:99.7% temporal:0.3%
x264 [info]: coded y,uvDC,uvAC intra: 95.1% 91.9% 48.3% inter: 59.5% 62.1% 20.0%
x264 [info]: i16 v,h,dc,p: 16% 30% 45% 8%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 9% 69% 2% 2% 2% 2% 2% 3%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 11% 9% 10% 12% 14% 10% 10% 9%
x264 [info]: i8c dc,h,v,p: 36% 33% 24% 7%
x264 [info]: Weighted P-Frames: Y:40.1% UV:35.9%
x264 [info]: ref P L0: 46.2% 16.2% 19.2% 12.3% 5.2% 0.9%
x264 [info]: ref B L0: 82.4% 14.0% 3.6%
x264 [info]: ref B L1: 90.2% 9.8%
x264 [info]: kb/s:5094.46
[11:05:41] libhb: work result = 0