I have seen video releases that take bluray sizes (2.2gb per episode of 23 minutes) to 196mb.
All this without any noticeable loss in quality.
It would seem the encoder does this by encoding to HEVC x265 10bits.
The encoding settings are pretty confusing:Code:General Unique ID : 208913498364140972766772815030478702390 (0x9D2B46B6EB36133062E835ED897C0736) Complete name : ---- Format : Matroska Format version : Version 4 File size : 197 MiB Duration : 23 min 44 s Overall bit rate : 1 158 kb/s Frame rate : 23.976 FPS Encoded date : 2024-08-17 19:25:46 UTC Writing application : mkvmerge v85.0 ('Shame For You') 64-bit Writing library : libebml v1.4.5 + libmatroska v1.7.1 / Lavf58.76.100 Attachments : PWScript09.ttf / rabiohead.ttf / Roboto-Medium.ttf / Roboto-Regular.ttf / SpinnerRackProBB-Reg.otf / SpongeMeetsVanilla.ttf / SS Soapy Hands Bold.otf / SS Soapy Hands Regular.otf / arial.ttf / Boba Date-Bold.otf / CCSamaritanTall-Bold.otf / impact.ttf / Lato-Black.ttf / Lato-Bold.ttf / Lato-BoldItalic.ttf Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 23 min 41 s Bit rate : 1 032 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 10 bits Bits/(Pixel*Frame) : 0.021 Stream size : 175 MiB (89%) Title : [Judas] x265 10b Writing library : x265 3.5+19-8003e4382:[Windows][MSVC 1929][64 bit] 10bit Encoding settings : cpuid=1111039 / frame-threads=5 / numa-pools=+ / wpp / pmode / no-pme / no-psnr / no-ssim / log-level=2 / csv / csv-log-level=0 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=34072 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=6 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-eob / no-eos / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=8 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=120 / lookahead-slices=4 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=4 / tu-intra-depth=4 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=0 / limit-modes / me=3 / subme=4 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / weightb / no-analyze-src-pics / deblock=-1:-1 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=0.50 / psy-rdoq=1.10 / no-rd-refine / no-lossless / cbqpoffs=-1 / crqpoffs=-1 / rc=crf / crf=21.0 / qcomp=0.65 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / aq-strength=0.70 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / 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 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / 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 / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass Language : Japanese Default : Yes Forced : No Audio ID : 2 Format : Opus Codec ID : A_OPUS Duration : 23 min 41 s Bit rate : 108 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 50.000 FPS (960 SPF) Compression mode : Lossy Stream size : 18.3 MiB (9%) Title : [Judas] JAP Stereo (Opus 112Kbps) Language : Japanese Default : Yes Forced : No
How can i translate this to FFMPEG?cpuid=1111039 / frame-threads=5 / numa-pools=+ / wpp / pmode / no-pme / no-psnr / no-ssim / log-level=2 / csv / csv-log-level=0 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=34072 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=6 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-eob / no-eos / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=8 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=120 / lookahead-slices=4 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=4 / tu-intra-depth=4 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=0 / limit-modes / me=3 / subme=4 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / weightb / no-analyze-src-pics / deblock=-1:-1 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=0.50 / psy-rdoq=1.10 / no-rd-refine / no-lossless / cbqpoffs=-1 / crqpoffs=-1 / rc=crf / crf=21.0 / qcomp=0.65 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / aq-strength=0.70 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / 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 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / 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 / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
I guess the bare basis would be something like this if i want to use my GPU (yes, i want to):
The issue is that this syntax gives me 3x the size when i am looking to reduce the size while retaining as much of the original quality.Code:ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:v hevc_nvenc -preset slow -profile:v main10 -rc:v vbr_hq -b:v 0 -cq 19 -c:a copy output.mkv
I want to squish the size while keeping the most quality possible.
Any advice?
+ Reply to Thread
Results 1 to 4 of 4
-
-
This can be helpful:
https://trac.ffmpeg.org/wiki/Encode/H.265
https://x265.readthedocs.io/en/master/presets.html
https://x265.readthedocs.io/en/master/cli.html
Check options vs presets to get idea behind commandline in your file source - not every setting can be reasonable - sometimes people use weird settings only to mark their tree...
To copy your setting you need to use https://trac.ffmpeg.org/wiki/Encode/H.265#PassingOptions - there can be syntax differences (like x265 'no-lossless' in ffmpeg can be for example '-x265-params "no_lossless=1" ' - you need to figure this by yourself or dig for examples).Last edited by pandy; 18th Aug 2024 at 16:56.
-
i want to use my GPU (yes, i want to) ... The issue is that this syntax gives me 3x the size when
Yon can't have both, you have to chose either speed or size/quality. -
using a decent Constant Rate Factor (CRF) setting as well as preset veryslow should give some really decent results. I created an online tool to encode to h264 just click export instead of execute and change libx264 -> libx265 in the output command. All the settings for h264 and h265 seem to be the same. You can use this tool here https://davidclews.com/article/303.html
Similar Threads
-
Encoding to x265 and interlacing while keeping quality with FFMPEG?
By Unknown01 in forum Newbie / General discussionsReplies: 8Last Post: 11th Apr 2023, 20:01 -
Error message while encoding x265 using ffmpeg, thread message queue blo...
By sienipulla in forum Video ConversionReplies: 10Last Post: 30th Sep 2022, 09:51 -
FFMPEG x265 encoding wrong settings for some sources
By tony95 in forum Video ConversionReplies: 4Last Post: 10th Dec 2021, 12:11 -
The x265 HEVC Upgrade
By x265 in forum Software PlayingReplies: 18Last Post: 20th Oct 2019, 02:19 -
Recoding huge DVD+video archive to HEVC - advice on ffmpeg settings + Card?
By STilez in forum Video ConversionReplies: 22Last Post: 13th Oct 2019, 11:58