View Full Version : CRF 22 for a 4K file out of a DSLR camera ends up at ~75 Mbps!! Is this expected?
user1085
3rd April 2019, 07:41
I was hoping to compress my files out of the camera to save some space. They are encoded at ~95 Mbps AVC. The scene in question is a lot of water. So maybe the complexity has something to do with such high resultant bitrates. I've attached my commandline and sample files from Dropbox (+ 3D LUT as the file is in S-LOG 2 flat profile)
ffmpeg.exe -V
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
ffmpeg.exe -i E:\C0018-segment.MP4 -vf lut3d="AC-SL2-to-REVERSAL-1OVER.cube" -c:v libx265 -crf 22 -preset veryslow -map_metadata 0 -x265-params 'no-strong-intra-smoothing=1:no-sao=1:deblock=-2\:-2' -c:a aac -b:a 256k E:\C0018-segment_crf22.mp4
3D LUT - https://www.dropbox.com/s/hyrd956cs3bfbig/AC-SL2-to-REVERSAL-1OVER.cube?dl=0
Video - https://www.dropbox.com/s/9nn9fzzzv4jei7u/C0018-segment.mp4?dl=0
Atak_Snajpera
3rd April 2019, 14:19
I'm not surprised that average bitrate is so high even with CRF22. Your sample is really complex. You have hard to predict water movement and whole scene panning on top of that!
UPDATE: Simple encoding to x265 crf 22 + default preset gave me average bitrate at 25Mbps.
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 10 s 52 ms
Bit rate : 25.7 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.129
Stream size : 30.9 MiB (100%)
Writing library : x265 3.0_RC+13-ae085e5cd8a2:[Windows][GCC 8.2.1][64 bit] 10bit
Encoding settings : cpuid=1310959 / frame-threads=2 / numa-pools=4 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=241 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=8 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=22.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / qp-adaptation-range=1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
user1085
3rd April 2019, 18:31
I'm not surprised that average bitrate is so high even with CRF22. Your sample is really complex. You have hard to predict water movement and whole scene panning on top of that!
UPDATE: Simple encoding to x265 crf 22 + default preset gave me average bitrate at 25Mbps.
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 10 s 52 ms
Bit rate : 25.7 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.129
Stream size : 30.9 MiB (100%)
Writing library : x265 3.0_RC+13-ae085e5cd8a2:[Windows][GCC 8.2.1][64 bit] 10bit
Encoding settings : cpuid=1310959 / frame-threads=2 / numa-pools=4 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=241 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=8 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=22.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / qp-adaptation-range=1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
That is weird, when I ran with default (medium) preset, it still gave me nearly ~72 Mbps
ffmpeg.exe -i E:\C0018-segment.MP4 -vf lut3d="AC-SL2-to-REVERSAL-1OVER.cube" -c:v libx265 -crf 22 -preset medium -map_metadata 0 -x265-params 'no-strong-intra-smoothing=1:no-sao=1:deblock=-2\:-2' -c:a aac -b:a 256k E:\C0018-segment_crf22_medium.mp4
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : @L5@Main
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 10 s 52 ms
Bit rate : 71.1 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : RGB
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.357
Stream size : 85.2 MiB (100%)
Writing library : x265 3.0_Au+7-cb3e172a5f51:[Windows][GCC 8.2.1][64 bit] 8bit+10bit
Encoding settings : cpuid=1111039 / frame-threads=3 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=3 / input-res=3840x2160 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=8 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=-2:-2 / no-sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=6 / crqpoffs=6 / rc=crf / crf=22.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=0 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=1040187392 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / qp-adaptation-range=1.00
Color range : Limited
Matrix coefficients : Identity
Codec configuration box : hvcC
Atak_Snajpera
3rd April 2019, 19:17
remove lut3d and see what you get.
user1085
3rd April 2019, 19:54
remove lut3d and see what you get.
Yep, then I get about 22 Mbps. weird
Blue_MiSfit
5th April 2019, 22:10
not really, log footage is a bit easier to encode from what I understand.
user1085
6th April 2019, 21:35
not really, log footage is a bit easier to encode from what I understand.
Seems like it. What would you suggest for archiving my log footage in HEVC format and preserve the most quality
Option 1: Use the 3D LUT and encode with high bitrates such as ~75 Mbps
Option 2: Encode the log footage with ~20 Mbps bitrates and later add log footage when I import it into editing software
Blue_MiSfit
7th April 2019, 01:38
Don't encode to HEVC before editing, that's for sure! Keep it in the source codec before you do your post (or transcode to a more NLE friendly codec like ProRes or DNxHR).
For compressing outputs I'd presume you'd handle the log->gamma conversion in post, so it shouldn't matter there.
If you really want to encode log footage before editing, I'd just use a lower CRF than you normally would, just to make sure you're saving as much as possible. Stuff like -tune fastdecode and short keyframe intervals will help with scrubbing performance.
As a sidenote - Resolve does quite well with HEVC footage - with an RTX 2070 and i9-9900k I can play and aggressively scrub / trick play several layers of high quality 2160p main10 HEVC (including HDR) with no problem.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.