Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

Description of problem or question:

I have taken some 10bit videos with my camera (Panasonic G9). They are 150 Mb/s files. I intend to convert them all to 8bit and only shoot 8bit in future, as I don't have a 10bit monitor.

I tested the conversion on a 570MB 4K MOV file from the camera. It took over an hour to convert.

I am using Quality = 20 ; Encoder Preset = Slower ; Audio Codec = 16bit FLAC.

I am getting between 0.1 and 0.3 FPS encode speed.

Am I doing something wrong here to be getting such low speed? I have a good computer with a fast SSD for source and destination.

Most of my camera files are in the gigabytes, not hundreds of megabytes, so ideally I want faster conversion.


HandBrake version (e.g., 1.0.0):

1.4.2 (2021100300)


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 Home ; OS Build 19043.1348 ; Windows Feature Experience Pack 120.2212.3920.0


HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.4.2 (2021100300)
OS: Microsoft Windows NT 10.0.19043.0
CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
Ram: 8129 MB, 
GPU Information:
  NVIDIA GeForce GTX 1070 - 30.0.14.9709
Screen: 1920x1080
Temp Dir: C:\Users\WPC\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\WPC\AppData\Roaming\HandBrake

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


# Starting Encode ...
[21:53:12] base preset: H.265 MKV 2160p60 (Modified)
Remote Process started with Process ID: 15976 using port: 8037. Max Allowed Instances: 1
Worker: Starting HandBrake Engine ...
Worker: Starting Web Server on port 8037 ...
Worker: Disconnected worker monitoring enabled!
[21:53:13] Compile-time hardening features are enabled
[21:53:13] hb_init: starting libhb thread
[21:53:13] Starting work at: Thu Dec 02 21:53:13 2021
[21:53:13] 1 job(s) to process
[21:53:13] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": -1,
        "DRC": 0,
        "Encoder": "flac16",
        "Gain": 0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd",
      "copy:mp2"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "C:\\Users\\WPC\\Videos\\P1043907-1.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 13,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "2160",
          "width": "3840"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "H:\\Photos\\Camera Photos - Panasonic\\Photos 36\\P1043907.MOV"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "strong-intra-smoothing=0:rect=0:aq-mode=1",
    "Preset": "slower",
    "Profile": "main",
    "Quality": 20,
    "QSV": {
      "Decode": false
    }
  }
}
[21:53:13] CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
[21:53:13]  - Intel microarchitecture Haswell
[21:53:13]  - logical processor count: 8
[21:53:13] Intel Quick Sync Video support: no
[21:53:13] hb_scan: path=H:\Photos\Camera Photos - Panasonic\Photos 36\P1043907.MOV, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image H:\Photos\Camera Photos - Panasonic\Photos 36\P1043907.MOV
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2646: nav_get_title_list(H:\Photos\Camera Photos - Panasonic\Photos 36\P1043907.MOV\) failed
[21:53:13] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvlibdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
dread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[21:53:13] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'H:\Photos\Camera Photos - Panasonic\Photos 36\P1043907.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 537986816
    compatible_brands: qt  pana
    creation_time   : 2021-08-14T16:36:08.000000Z
    com.panasonic.Semi-Pro.metadata.xml: <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
                    : <ClipMain xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-Professional-Plug-in:Semi-Pro:ClipMetadata:v1.0">
                    :   <ClipContent>
                    :     <GlobalClipID>060A2B340101010501010D21130000001F42AF5A0058014452410A60C2500004</GlobalClipID>
                    :     <Duration>930</Duration>
                    :     <EditUnit>1001/30000</EditUnit>
                    :     <EssenceList>
                    :       <Video>
                    :         <Codec BitRate="150">H264_422_LongGOP</Codec>
                    :         <ActiveLine>2160</ActiveLine>
                    :         <ActivePixel>3840</ActivePixel>
                    :         <BitDepth>10</BitDepth>
                    :         <FrameRate>29.97p</FrameRate>
                    :         <TimecodeType>NonDrop</TimecodeType>
                    :         <StartTimecode>00:00:00:00</StartTimecode>
                    :       </Video>
                    :       <Audio>
                    :         <Channel>2</Channel>
                    :         <SamplingRate>48000</SamplingRate>
                    :         <BitsPerSample>16</BitsPerSample>
                    :       </Audio>
                    :     </EssenceList>
                    :     <ClipMetadata>
                    :       <Rating>0</Rating>
                    :       <Access>
                    :         <CreationDate>2021-08-14T16:36:08+12:00</CreationDate>
                    :         <LastUpdateDate>2021-08-14T16:36:08+12:00</LastUpdateDate>
                    :       </Access>
                    :       <Device>
                    :         <Manufacturer>Panasonic</Manufacturer>
                    :         <ModelName>DC-G9</ModelName>
                    :       </Device>
                    :       <Shoot>
                    :         <StartDate>2021-08-14T16:36:08+12:00</StartDate>
                    :       </Shoot>
                    :     </ClipMetadata>
                    :   </ClipContent>
                    :   <UserArea>
                    :     <AcquisitionMetadata xmlns="urn:schemas-Professional-Plug-in:P2:CameraMetadata:v1.2">
                    :       <CameraUnitMetadata>
                    :         <Gamma>
                    :           <CaptureGamma>STANDARD</CaptureGamma>
                    :         </Gamma>
                    :         <Gamut>
                    :           <CaptureGamut>BT.709</CaptureGamut>
                    :         </Gamut>
                    :       </CameraUnitMetadata>
                    :     </AcquisitionMetadata>
                    :   </UserArea>
                    : </ClipMain>
                    :
  Duration: 00:00:31.03, start: 0.000000, bitrate: 154333 kb/s
  Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 150026 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2021-08-14T16:36:08.000000Z
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2021-08-14T16:36:08.000000Z
      vendor_id       : pana
[21:53:13] scan: decoding previews for title 1
[21:53:15] scan: audio 0x1: pcm_s16be, rate=48000Hz, bitrate=1536000 Unknown (pcm_s16be) (2.0 ch) (1536 kbps)
[21:53:18] scan: 10 previews, 3840x2160, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1
[21:53:18] libhb: scan thread found 1 valid title(s)
[21:53:18] Skipping subtitle scan.  No suitable subtitle tracks.
[21:53:18] Starting Task: Encoding Pass
[21:53:18] Skipping vfr filter
[21:53:18] Skipping crop/scale filter
[21:53:18] work: compression level not specified, track 1 setting compression level 5.00
[21:53:18] work: only 1 chapter, disabling chapter markers
[21:53:18] job configuration:
[21:53:18]  * source
[21:53:18]    + H:\Photos\Camera Photos - Panasonic\Photos 36\P1043907.MOV
[21:53:18]    + title 1, chapter(s) 1 to 1
[21:53:18]    + container: mov,mp4,m4a,3gp,3g2,mj2
[21:53:18]    + data rate: 154333 kbps
[21:53:18]  * destination
[21:53:18]    + C:\Users\WPC\Videos\P1043907-1.mkv
[21:53:18]    + container: Matroska (libavformat)
[21:53:18]  * video track
[21:53:18]    + decoder: h264 10-bit (yuv420p10le)
[21:53:18]      + bitrate 150026 kbps
[21:53:18]    + filters
[21:53:18]      + Format (format=yuv420p)
[21:53:18]    + Output geometry
[21:53:18]      + storage dimensions: 3840 x 2160
[21:53:18]      + pixel aspect ratio: 1 : 1
[21:53:18]      + display dimensions: 3840 x 2160
[21:53:18]    + encoder: H.265 (libx265)
[21:53:18]      + preset:  slower
[21:53:18]      + options: strong-intra-smoothing=0:rect=0:aq-mode=1
[21:53:18]      + profile: main
[21:53:18]      + level:   auto
[21:53:18]      + quality: 20.00 (RF)
[21:53:18]      + color profile: 1-1-1
[21:53:18]  * audio track 1
[21:53:18]    + decoder: Unknown (pcm_s16be) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[21:53:18]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[21:53:18]    + mixdown: Stereo
[21:53:18]    + dither: none
[21:53:18]    + encoder: FLAC 16-bit (libavcodec)
[21:53:18]      + samplerate: 48000 Hz
[21:53:18]      + compression level: 5.00
[21:53:19] sync: expecting 930 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][clang 12.0.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 3 inter / 3 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 4 / 4
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 40 / 8 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 1
x265 [info]: References / ref-limit  cu / depth  : 5 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-20.0 / 0.60
x265 [info]: tools: limit-modes rd=6 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip mode=1 limit-tu=4 signhide tmvp b-intra deblock sao
[21:53:20] sync: first pts video is 0
[21:53:20] sync: "Chapter 1" (1) at frame 1 time 0
[21:53:20] sync: first pts audio 0x1 is 0
[22:50:34] reader: done. 1 scr changes
[23:02:06] work: average encoding speed for job is 0.252147 fps
[23:02:06] pcm_s16be-decoder done: 1488 frames, 0 decoder errors
[23:02:06] h264-decoder done: 930 frames, 0 decoder errors
[23:02:06] sync: got 930 frames, 930 expected
[23:02:06] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x265 [info]: frame I:      5, Avg QP:21.21  kb/s: 114287.47
x265 [info]: frame P:    166, Avg QP:22.30  kb/s: 108707.60
x265 [info]: frame B:    759, Avg QP:25.52  kb/s: 41885.98
x265 [info]: Weighted P-Frames: Y:11.4% UV:3.0%
x265 [info]: Weighted B-Frames: Y:4.5% UV:1.4%
x265 [info]: consecutive B-frames: 2.3% 0.0% 1.8% 26.9% 16.4% 33.9% 8.8% 7.6% 2.3%
encoded 930 frames in 4127.38s (0.23 fps), 54202.54 kb/s, Avg QP:24.93
[23:02:07] mux: track 0, 930 frames, 210248584 bytes, 54145.27 kbps, fifo 128
[23:02:07] mux: track 1, 324 frames, 2652152 bytes, 683.01 kbps, fifo 64
[23:02:07] Finished work at: Thu Dec 02 23:02:07 2021
[23:02:07] libhb: work result = 0

# Job Completed!
User avatar
Ritsuka
HandBrake Team
Posts: 1643
Joined: Fri Jan 12, 2007 11:29 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Ritsuka »

x265 set to slower is *slower*. Either set a faster preset or use x264.
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

Thank you. I just wanted to make sure it was normal.
mduell
Veteran User
Posts: 8182
Joined: Sat Apr 21, 2007 8:54 pm

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by mduell »

You have a high resolution output, which is generally slow to encode.

You picked a slow encoder.

You configured the encoder for a slower speed.

Yea, it's going to be slow.
Deleted User 11865

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Deleted User 11865 »

mduell wrote: Thu Dec 02, 2021 1:47 pm You have a high resolution output, which is generally slow to encode.

You picked a slow encoder.

You configured the encoder for a slower speed.

Yea, it's going to be slow.
No, it'll be slower, even :P
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

:)
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

I just did a conversion with "Slow" Encoder Preset, and RF = 14.

It was a much better speed.

However the resulting file looks much worse than the original, it is clearly lacking dynamic range and colours that are present in the camera's original file. I A/B'd the two videos paused at the same place and the original looks so much better.

Why could this be?

Could this be because I used 8bit H.265 on a 10bit file?
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

UPDATE: I tried converting to H.265 10bit just now, and it has the same loss in quality.
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

UPDATE 2: The camera original 10bit files open in VLC (which I've been using for previous tests above) but are very laggy.

Opening in MPC-HC there is no lag, but the camera original 10bit files looks like the H.265 versions generated by Handbrake at RF = 14.

My guess: The "less dynamic /colour" versions are how it's actually meant to look, and the camera original 10bit in VLC is just glitching to make it look dynamic
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

UPDATE 3: The Handbrake conversion to H.265 is definitely washing out the colours in my videos, making them much duller.
Woodstock
Veteran User
Posts: 4613
Joined: Tue Aug 27, 2013 6:39 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Woodstock »

10-bit to 8-bit means that you're reducing the color space. Going to 10-bit h.265 should preserve the color space.
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

Yes but I did this conversion process also on some 8bit MOV's, which also resulted in washed out colours.
User avatar
Ritsuka
HandBrake Team
Posts: 1643
Joined: Fri Jan 12, 2007 11:29 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Ritsuka »

Probably the classic file with the wrong color range info, can you upload a short sample produced so we can take a look at what's wrong?
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

Sorry for the delay. How or where can I upload the sample?
Deleted User 11865

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Deleted User 11865 »

Dropbox or anything similar might be the easiest.
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

https://www.dropbox.com/s/45p5ou1ykmfpi ... e.mkv?dl=0

Here is a 4 second sample of my cat. The file here is converted to MKV with Handbrake, and has the issue I'm talking about (washed out colours relative to the original camera MOV).
Deleted User 11865

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Deleted User 11865 »

Thanks, but we need a sample of the *source*, not HandBrake's encode ;-)

Cute cat though :-)
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

Hah thanks. :)

I just took another quick 10bit video with the same camera, because I didn't have any short clips. Everything's the same settings as the videos that got messed up with conversion.

Hopefully not too scary, the cat has its teeth out this time.

This time it is the source:

https://www.dropbox.com/s/ye3ib0sex470h ... 4.MOV?dl=0
User avatar
Ritsuka
HandBrake Team
Posts: 1643
Joined: Fri Jan 12, 2007 11:29 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Ritsuka »

Both source file and the reencoded file from HandBrake looks the same here. Tested in mpv, QuickTime, and Final Cut Pro.
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

I just did the same re-encode with Handbrake and the result looks washed out compared to the original MOV. I also tried a similar re-encode with FFMPEG and that too looks washed out.

I watched everything in VLC. I'm confused.
User avatar
Ritsuka
HandBrake Team
Posts: 1643
Joined: Fri Jan 12, 2007 11:29 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Ritsuka »

Maybe VLC is doing something wrong then. What happens if you try to compare them in something like DaVinci Resolve?
Deleted User 11865

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Deleted User 11865 »

Is hardware-accelerated decoding enabled in VLC?
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

Hardware-accelerated decoding was on Automatic on VLC.

I just tried my usual player, MPC-HC, shows both original and re-encoded as the same.

VLC has an issue I suppose. I've always preferred MPC-HC anyway. I'll go back to MPC-HC.
concorde
Posts: 16
Joined: Thu Dec 02, 2021 9:45 am

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by concorde »

VLC on the original camera file, lags, and shows the video as extra contrasty/dynamic. I had thought that it was actually meant to look like this, hence I thought that Handbrake was washing out the colours. But it looks like it's just a VLC issue.
Deleted User 11865

Re: Slow Conversion - 10bit 4K H.264 to 8bit 4K H.265

Post by Deleted User 11865 »

Does it look any better in VLC with hardware-accelerated decoding set to off?
Post Reply