How to denoise dark parts

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Kaelyn
Posts: 41
Joined: Sat Nov 14, 2015 11:21 am

How to denoise dark parts

Post by Kaelyn »

In the beginning of the movie Leviathan is a dark background. In that background is noise, even so in dark parts of the rest of the movie.

I read different solutions on the forum of denoise. I tried different options of denoise, with different results. But I still didn't find a solution to eliminate the noise. Is there a suitable option of denoise, or is there anything else I can do against the noise?

The version of Handbrake is 1.0.7

My Operating system is Windows 10.

Here I add the logfile:

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.15063.0 - 64bit
CPU: Intel(R) Core(TM) i7 CPU         960  @ 3.20GHz
Ram: 12279 MB, 
GPU Information:
  NVIDIA GeForce GTX 960 - 23.21.13.8813
Screen: 3840x2160
Temp Dir: C:\Users\User\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\User\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

-------------------------------------------


# Starting Encode ...

[13:37:30] hb_init: starting libhb thread
[13:37:30] 1 job(s) to process
[13:37:30] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": 1073743872,
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      },
      {
        "Name": "Chapter 2"
      },
      {
        "Name": "Chapter 3"
      },
      {
        "Name": "Chapter 4"
      },
      {
        "Name": "Chapter 5"
      },
      {
        "Name": "Chapter 6"
      },
      {
        "Name": "Chapter 7"
      },
      {
        "Name": "Chapter 8"
      },
      {
        "Name": "Chapter 9"
      }
    ],
    "ChapterMarkers": true,
    "File": "D:\\Test\\Leviathan-27.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "576",
          "width": "720"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 64,
    "Den": 45
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 9
    },
    "Title": 27,
    "Path": "D:\\Test\\Leviathan.iso"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": true,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      }
    ]
  },
  "Video": {
    "Encoder": 65536,
    "Level": "4.1",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "medium",
    "Profile": "high",
    "Quality": 20.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[13:37:30] CPU: Intel(R) Core(TM) i7 CPU         960  @ 3.20GHz
[13:37:30]  - logical processor count: 8
[13:37:30] Intel Quick Sync Video support: no
[13:37:30] hb_scan: path=D:\Test\Leviathan.iso, title_index=27
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[13:37:30] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
[13:37:30] scan: DVD has 30 title(s)
[13:37:30] scan: scanning title 27
[13:37:30] scan: opening IFO for VTS 27
[13:37:30] pgc_id: 1, pgn: 1: pgc: 0000015C497A0E40
[13:37:30] scan: vts=27, ttn=1, cells=0->10, blocks=0->2870651, 2842867 blocks
[13:37:30] scan: duration is 02:15:28 (8128480 ms)
[13:37:30] scan: checking audio 1
[13:37:30] scan: id=0x80bd, lang=??????? (AC3), 3cc=rus ext=0
[13:37:30] scan: checking audio 2
[13:37:30] scan: id=0x81bd, lang=Francais (AC3), 3cc=fra ext=0
[13:37:30] scan: checking subtitle 1
[13:37:30] scan: id=0x20bd, lang=Nederlands, 3cc=nld ext=0
[13:37:30] scan: checking subtitle 2
[13:37:30] scan: id=0x21bd, lang=Nederlands, 3cc=nld ext=0
[13:37:30] scan: checking subtitle 3
[13:37:30] scan: id=0x22bd, lang=Francais, 3cc=fra ext=0
[13:37:30] scan: checking subtitle 4
[13:37:30] scan: id=0x23bd, lang=Francais, 3cc=fra ext=0
[13:37:30] scan: checking subtitle 5
[13:37:30] scan: id=0x24bd, lang=Francais, 3cc=fra ext=0
[13:37:30] scan: checking subtitle 6
[13:37:30] scan: id=0x25bd, lang=Francais, 3cc=fra ext=0
[13:37:30] scan: title 27 has 9 chapters
[13:37:30] scan: chap 1 c=0->1, b=0->302736 (274952), 782040 ms
[13:37:30] scan: chap 2 c=2->2, b=302737->750515 (447779), 1261560 ms
[13:37:30] scan: chap 3 c=3->3, b=750516->1086481 (335966), 969720 ms
[13:37:30] scan: chap 4 c=4->4, b=1086482->1539588 (453107), 1303560 ms
[13:37:30] scan: chap 5 c=5->5, b=1539589->1825677 (286089), 822120 ms
[13:37:30] scan: chap 6 c=6->7, b=1825678->2192554 (366877), 1036680 ms
[13:37:30] scan: chap 7 c=8->8, b=2192555->2501700 (309146), 877200 ms
[13:37:30] scan: chap 8 c=9->9, b=2501701->2763440 (261740), 780120 ms
[13:37:30] scan: chap 9 c=10->10, b=2763441->2870651 (107211), 295480 ms
[13:37:30] scan: aspect = 16:9
[13:37:30] scan: decoding previews for title 27
[13:37:30] scan: title angle(s) 1
[ac3 @ 0000015c568d02c0] frame sync error
[ac3 @ 0000015c568d02c0] frame sync error
[ac3 @ 0000015c49803cc0] frame sync error
[13:37:30] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=448000 ??????? (AC3) (5.1 ch)
[ac3 @ 0000015c49803cc0] frame sync error
[13:37:30] scan: audio 0x81bd: ac3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch)
[13:37:30] scan: 10 previews, 720x576, 25.000 fps, autocrop = 74/74/0/0, aspect 16:9, PAR 64:45
[13:37:30] libhb: scan thread found 1 valid title(s)
[13:37:30] starting job
[13:37:30] decomb filter thread started for segment 0
[13:37:30] decomb filter thread started for segment 1
[13:37:30] decomb filter thread started for segment 2
[13:37:30] decomb filter thread started for segment 3
[13:37:30] decomb filter thread started for segment 4
[13:37:30] decomb filter thread started for segment 5
[13:37:30] decomb filter thread started for segment 6
[13:37:30] decomb filter thread started for segment 7
[13:37:30] decomb check thread started for segment 0
[13:37:30] decomb check thread started for segment 5
[13:37:30] decomb check thread started for segment 3
[13:37:30] decomb check thread started for segment 4
[13:37:30] decomb check thread started for segment 1
[13:37:30] decomb check thread started for segment 2
[13:37:30] decomb check thread started for segment 6
[13:37:30] decomb check thread started for segment 7
[13:37:30] mask filter thread started for segment 0
[13:37:30] mask filter thread started for segment 1
[13:37:30] mask filter thread started for segment 2
[13:37:30] mask filter thread started for segment 3
[13:37:30] yadif thread started for segment 4
[13:37:30] mask filter thread started for segment 5
[13:37:30] mask filter thread started for segment 6
[13:37:30] job configuration:
[13:37:30]  * source
[13:37:30]    + D:\Test\Leviathan.iso
[13:37:30]    + title 27, chapter(s) 1 to 9
[13:37:30] mask filter thread started for segment 7
[13:37:30]  * destination
[13:37:30]    + D:\Test\Leviathan-27.mkv
[13:37:30]    + container: Matroska (libavformat)
[13:37:30]      + chapter markers
[13:37:30]  * video track
[13:37:30]    + decoder: mpeg2video
[13:37:30]      + bitrate 8500 kbps
[13:37:30]    + filters
[13:37:30] mask erode thread started for segment 0
[13:37:30]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[13:37:30]      + Decomb (mode=39)
[13:37:30]      + Framerate Shaper (mode=1)
[13:37:30]        + frame rate: 25.000 fps -> constant 25.000 fps
[13:37:30] mask erode thread started for segment 1
[13:37:30]      + Crop and Scale (width=720:height=576:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[13:37:30]        + source: 720 * 576, crop (0/0/0/0): 720 * 576, scale: 720 * 576
[13:37:30]    + Output geometry
[13:37:30]      + storage dimensions: 720 x 576
[13:37:30]      + pixel aspect ratio: 64 : 45
[13:37:30]      + display dimensions: 1024 x 576
[13:37:30]    + encoder: H.264 (libx264)
[13:37:30]      + preset:  medium
[13:37:30] mask erode thread started for segment 2
[13:37:30]      + profile: high
[13:37:30]      + level:   4.1
[13:37:30]      + quality: 20.00 (RF)
[13:37:30]  * subtitle track 1, Nederlands (track 0, id 0x20bd) Picture [VOBSUB] -> Passthrough, Default
[13:37:30]  * audio track 1
[13:37:30] mask erode thread started for segment 3
[13:37:30]    + decoder: ??????? (AC3) (5.1 ch) (track 1, id 0x80bd)
[13:37:30]      + bitrate: 448 kbps, samplerate: 48000 Hz
[13:37:30]    + AC3 Passthru
[13:37:30] mask erode thread started for segment 4
[13:37:30] mask erode thread started for segment 5
[13:37:30] mask erode thread started for segment 6
[13:37:30] mask erode thread started for segment 7
[13:37:30] mask dilate thread started for segment 0
[13:37:30] mask dilate thread started for segment 1
[13:37:30] mask dilate thread started for segment 2
[13:37:30] mask dilate thread started for segment 3
[13:37:30] mask dilate thread started for segment 4
[13:37:30] mask dilate thread started for segment 5
[13:37:30] mask dilate thread started for segment 6
[13:37:30] mask dilate thread started for segment 7
[13:37:30] yadif thread started for segment 0
[13:37:30] yadif thread started for segment 1
[13:37:30] yadif thread started for segment 2
[13:37:30] yadif thread started for segment 3
[13:37:30] mask filter thread started for segment 4
[13:37:30] yadif thread started for segment 5
[13:37:30] yadif thread started for segment 6
[13:37:30] yadif thread started for segment 7
libdvdread: Encrypted DVD support unavailable.
[13:37:30] sync: expecting 203212 video frames
[13:37:30] encx264: encoding at constant RF 20.000000
[13:37:30] encx264: unparsed options: level=4.1:vbv-bufsize=78125:vbv-maxrate=62500
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x264 [info]: profile High, level 4.1
[13:37:31] dvd: end of cell 0 at block 0
[13:37:32] sync: first pts video is 0
[13:37:32] sync: "Chapter 1" (1) at frame 1 time 0
[13:37:32] sync: first pts audio 0x80bd is 82800
[13:37:32] sync: first pts subtitle 0x20bd is 201600
[13:40:15] sync: "Chapter 2" (2) at frame 19554 time 70430400
[13:45:05] sync: "Chapter 3" (3) at frame 51093 time 183970800
[13:48:40] sync: "Chapter 4" (4) at frame 75336 time 271245600
[13:53:37] sync: "Chapter 5" (5) at frame 107925 time 388566000
[13:56:43] sync: "Chapter 6" (6) at frame 128478 time 462556800
[14:00:34] sync: "Chapter 7" (7) at frame 154395 time 555858000
[14:03:55] sync: "Chapter 8" (8) at frame 176325 time 634806000
[14:06:51] sync: "Chapter 9" (9) at frame 195828 time 705016800
[14:07:29] reader: done. 2 scr changes
[14:07:29] work: average encoding speed for job is 112.977188 fps
[14:07:29] comb detect: heavy 281 | light 1712 | uncombed 201219 | total 203212
[14:07:29] decomb: deinterlaced 281 | blended 1712 | unfiltered 201219 | total 203212
[14:07:29] vfr: 203223 frames output, 0 dropped and 11 duped for CFR/PFR
[14:07:29] vfr: lost time: 0 (0 frames)
[14:07:29] vfr: gained time: 0 (0 frames) (0 not accounted for)
[14:07:29] ac3-decoder done: 253999 frames, 0 decoder errors
[14:07:29] mpeg2video-decoder done: 203212 frames, 0 decoder errors
[14:07:29] sync: got 203212 frames, 203212 expected
[14:07:29] sync: framerate min 2.083 fps, max 25.000 fps, avg 24.999 fps
x264 [info]: frame I:1138  Avg QP:13.61  size: 34297
x264 [info]: frame P:55524 Avg QP:17.64  size:  8002
x264 [info]: frame B:146561 Avg QP:20.50  size:  1690
x264 [info]: consecutive B-frames:  1.2%  3.5% 12.9% 82.3%
x264 [info]: mb I  I16..4: 24.9% 62.5% 12.6%
x264 [info]: mb P  I16..4:  0.5%  2.6%  0.4%  P16..4: 33.5% 15.0% 10.6%  0.0%  0.0%    skip:37.4%
x264 [info]: mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 31.4%  2.3%  0.4%  direct: 0.9%  skip:64.7%  L0:42.1% L1:51.4% BI: 6.5%
x264 [info]: 8x8 transform intra:69.5% inter:82.5%
x264 [info]: coded y,uvDC,uvAC intra: 65.2% 66.0% 30.7% inter: 12.1% 13.1% 0.5%
x264 [info]: i16 v,h,dc,p: 53% 18% 11% 18%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 17% 22%  4%  6%  8%  6%  7%  6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 20% 14%  4%  7%  9%  6%  6%  4%
x264 [info]: i8c dc,h,v,p: 54% 17% 23%  6%
x264 [info]: Weighted P-Frames: Y:1.8% UV:0.5%
x264 [info]: ref P L0: 55.3% 14.0% 22.1%  8.4%  0.2%
x264 [info]: ref B L0: 82.8% 13.9%  3.3%
x264 [info]: ref B L1: 93.2%  6.8%
x264 [info]: kb/s:719.48
[14:07:29] mux: track 0, 203223 frames, 731025843 bytes, 719.43 kbps, fifo 4096
[14:07:29] mux: track 1, 253999 frames, 455166208 bytes, 447.95 kbps, fifo 4096
[14:07:29] mux: track 2, 1153 frames, 3785722 bytes, 3.73 kbps, fifo 32
[14:07:29] libhb: work result = 0

# Encode Completed ...

[code][/i]

With kind regards,
Kaelyn
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: How to denoise dark parts

Post by BradleyS »

Perhaps you can show us a screenshot of this noise?

Usually when you’re seeing dark noise even after denoising, it means your display isn’t properly calibrated and is increasing the brightness and contrast of the dark parts.
Kaelyn
Posts: 41
Joined: Sat Nov 14, 2015 11:21 am

Re: How to denoise dark parts

Post by Kaelyn »

Thank you for your reply.

You can see a screenshot of this noise here:

https://www.dropbox.com/s/agnjuemkfgxnl ... e.png?dl=0

When I look at the original DVD on the same display there is less noise, so I think the calibration is all right.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: How to denoise dark parts

Post by BradleyS »

Looks like bad MPEG-2 compression on the DVD, to be honest. Denoise with NLMeans or use the Deblock filter on a low setting.
Kaelyn
Posts: 41
Joined: Sat Nov 14, 2015 11:21 am

Re: How to denoise dark parts

Post by Kaelyn »

Thanks for the tips.
I tried to denoise with NlMeans and the Deblock filter on a low setting.
I can't get the noise completely out, but maybe that's to much to ask when the MPEG-2 compression on the DVD is bad.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: How to denoise dark parts

Post by BradleyS »

Yeah, there's a point where the noise is coarse enough that it can't be easily removed. The above should at least blend the hard edges together a bit, making it look less harsh. An actual video editor would be needed to do better, and it's probably not worth the time.
Kaelyn
Posts: 41
Joined: Sat Nov 14, 2015 11:21 am

Re: How to denoise dark parts

Post by Kaelyn »

I tried to encode this movie again with Handbrake version 1.1.0. on different ways, trying to avoid the noise.
I tried Avg Bitrate on different values with 2-Pass Encoding, the Denoise filter on different values, Deblock, Deïnterlace on different values, Variable Framerate, Grayscale.
Are there any new features in this version that could help?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: How to denoise dark parts

Post by BradleyS »

None of those features have changed, but we did add two sharpening filters. Theoretically, you may be able to use stronger Deblock and NLMeans settings to the point details are starting to blur slightly, then add some sharpening to compensate.

If you can provide a small sample from your source, maybe 10-30 seconds of a typical scene, I can try to come up with some custom settings for you.
Post Reply