Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
7th June 2010, 16:39 | #402 | Link |
Registered User
Join Date: Nov 2004
Location: Russia
Posts: 11
|
Concept is to use constant ratefactor advantages (reducing the quality of 'less important' high-motion frames) getting the file of needed size. It's not weird and illogical. It's the only way )
__________________
In vino veritas |
7th June 2010, 19:21 | #403 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
I don't get the point what doing the first pass of a 2-Pass encode in CRF mode is good fore... Quote:
It's that simple
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 7th June 2010 at 20:00. |
||
7th June 2010, 22:20 | #404 | Link | |
Registered User
Join Date: Nov 2004
Location: Russia
Posts: 11
|
Quote:
CRF raises the quantizers in "fast" scenes where the loss won't be visible anyway and lower the quantizers in "slow" scenes. While encoding in two pass average bitrate mode "high motion" scenes will get a significant higher bitrate than "static" scenes. That's why pq cann't be equivalent. In practice, CRF+second pass mode looks noticeablely better.
__________________
In vino veritas |
|
7th June 2010, 22:49 | #405 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Nope, it isn't. Please stop spreading wrong information
Quote:
(Also you should say "blocks" instead of "scenes", now with MB-Tree rate-control being used) Quote:
I guess you mean "CQP" (aka "constant quantizer"). And of course CQP cannot be equivalent to CRF/2-Pass. But CQP was never mentioned! Example: The upper one was encoded with 1-Pass CRF, the lower one was encoded as a "normal" 2-Pass: (Note that both files have the same total size, i.e. the same average bitrate!) You notice something regarding the bitrate distribution? Upper: cabac=1 / ref=16 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / weightp=2 / keyint=750 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=24.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=2:1.00 Lower: cabac=1 / ref=16 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / weightp=2 / keyint=750 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=284 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=2:1.00
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 7th June 2010 at 23:31. |
||
8th June 2010, 08:04 | #406 | Link |
User of free A/V tools
Join Date: Jul 2006
Location: SK
Posts: 826
|
Yeah, I noticed that 2-pass encode exhibits even larger variances around the local bitrate peaks - which simply proves Kuningas was wrong in his assumption. 2-pass method provides more aggressive distribution of bitrate across slow vs fast-motion scenes though the differences are probably so negligible that they cannot be observed with standard human visual quality comparisons.
LM as usually. |
8th June 2010, 12:45 | #407 | Link |
Registered User
Join Date: Jun 2010
Posts: 106
|
Hi LM
Code:
PipeBuffer by LoRd_MuldeR <mulder2@gmx.de>, Version 1.03 Usage: pipebuf.exe <program_out> [<args>] : <program_in> [<args>] : [<buffer_size>] Options: <program_out> Executable to read stdout from <program_in> Executable to write stdin to <args> Optional command-line arguments <buffer_size> Pipe buffer in MByte [0] can you show it in a simple example for me? my avs (m1.avs): Code:
Loadplugin("D:\dgmpgdec158\DGDecode.dll") Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\AutoCrop.dll") mpeg2source("D:\sample\dvd2avi.d2v") Crop(0,56,-8,-56) Spline64Resize(848,360) Last edited by diimaan; 8th June 2010 at 12:48. |
8th June 2010, 13:45 | #408 | Link |
Registered User
Join Date: Jun 2010
Posts: 106
|
I just copied this from the clipboard!
Code:
D:\x264_x64.2010-04-25\pipebuf.exe D:\x264_x64.2010-04-25\avs2yuv.exe D:\sample\m1.avs - : D:\x264_x64.2010-04-25\x264_x64.exe --preset slower --crf 21.0 --level 30 --sar 1:1 --output NUL --frames 1035 --demuxer y4m --stdin y4m - : 4 and in the place of NUL if i mention a mkv or h264 and run from the pipebuf cli will it encode? like say Code:
@echo off "D:\x264_x64.2010-04-25\pipebuf.exe" D:\x264_x64.2010-04-25\avs2yuv.exe D:\sample\m1.avs - : D:\x264_x64.2010-04-25\x264_x64.exe --preset slower --crf 21.0 --level 30 --sar 1:1 --output D:\m1.mkv --frames 1035 --demuxer y4m --stdin y4m - : 4 pause Last edited by diimaan; 8th June 2010 at 13:50. |
8th June 2010, 14:34 | #410 | Link |
Registered User
Join Date: Jun 2010
Posts: 106
|
on a windows 64 vista machine!
1280 720 video crf 22 only SAR 1:1 mentioned no other custom commands Code:
Source: D:\sample\m1.avs Preset: Slow Tuning: None Profile: High Params: --sar 1:1 [Type: 32-Bit, Pipe Buffer Size: 0 MByte] encoded 1035 frames, 10.40 fps, 2175.10 kb/s encoded 1035 frames, 10.29 fps, 2175.10 kb/s encoded 1035 frames, 10.52 fps, 2175.10 kb/s [Type: 64-Bit, Pipe Buffer Size: 0 MByte] encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 10.56 fps, 2174.50 kb/s [Type: 64-Bit, Pipe Buffer Size: 1 MByte] encoded 1035 frames, 10.78 fps, 2174.50 kb/s encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 11.01 fps, 2174.50 kb/s [Type: 64-Bit, Pipe Buffer Size: 2 MByte] encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 11.01 fps, 2174.50 kb/s [Type: 64-Bit, Pipe Buffer Size: 4 MByte] encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 11.01 fps, 2174.50 kb/s [Type: 64-Bit, Pipe Buffer Size: 8 MByte] encoded 1035 frames, 11.01 fps, 2174.50 kb/s encoded 1035 frames, 10.78 fps, 2174.50 kb/s encoded 1035 frames, 10.56 fps, 2174.50 kb/s I can see ppl running the benchmark till 128MByte! but how? |
9th June 2010, 08:53 | #411 | Link | |||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Quote:
Of course for the second pass of a 2-Pass encoder or for a 1-Pass CRF encode you would specify a "real" file there... Quote:
That was before it turned out that such very large buffers don't help But of course you can still test arbitrary buffer sizes by calling pipebuf.exe/x264.exe manually from the console.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 9th June 2010 at 08:59. |
|||
10th June 2010, 13:19 | #412 | Link |
Registered User
Join Date: Nov 2004
Location: Russia
Posts: 11
|
Nope, it isn't. Please stop spreading wrong information
I'll try. ) Also you should say "blocks" instead of "scenes", now with MB-Tree rate-control being used I don't use mbtree for some reasons. I guess you mean "CQP" (aka "constant quantizer"). I meant pq aka "picture quality". And of course CQP cannot be equivalent to CRF/2-Pass. But CQP was never mentioned! "The advantage of the CRF mode is that it suits the human perception much better than the QP mode. For example it will raise the quantizers in "fast" scenes where the loss won't be visible anyway and lower the quantizers in "slow" scenes. Therefore the CRF mode should give the same subjective quality as QP mode, but it usually achieves a significant higher compression. It's recommended to prefer CRF mode over QP mode, although CRF is a bit slower. When switching from QP to CRF mode, you may want to slightly lower the quantizer. This should give approximately the same file size as before, but better visual quality! Another important advantage of CRF mode is that it will benefit from adaptive quantization, something that QP mode can't do." So, CRF is much more subjectively closer to CQP than 2pass mode. The good example of using crf + 2pass: I encode with CRF and try to get the file size not bigger than X. But it unfortunately become a bit larger. What to do? Start new encoding and loose time for 2 passes? Or I can use stats from CRF mode and make just 2nd pass. It's obvious. So. The rule is - use CRF or CRF+2pass (when you missed). Here's real HD comparision (Anger Management BD CEE AVC). crop + spline36resize+ selectTotal=framecount()/50 selectrangeevery(selectTotal,50) CRF: Commandline for x264: "C:\Programs - W7\x264_x64.2010-04-25\pipebuf.exe" "C:\Programs - W7\x264_x64.2010-04-25\avs2yuv.exe" Q:\HDProjects\anger\anger.avs - : "C:\Programs - W7\x264_x64.2010-04-25\x264_x64.exe" --crf 17.50 --level 4.1 --ref 12 --no-fast-pskip --bframes 8 --weightp 2 --no-mbtree --b-pyramid normal --b-adapt 2 --deblock -3:-3 --subme 10 --trellis 2 --partitions all --me umh --merange 48 --thread-input --vbv-bufsize 62500 --vbv-maxrate 50000 --aq-mode 1 --aq-strength 0.8 --psy-rd 1.0:0 --ssim --output Q:\HDProjects\anger\anger-crf175-aq08-psy100-b8-1629-me48-2.mkv --frames 2505 --demuxer y4m --stdin y4m - : 4 x264 [info]: frame I:56 Avg QP:17.33 size: 99584 x264 [info]: frame P:505 Avg QP:18.70 size: 52507 x264 [info]: frame B:1944 Avg QP:20.94 size: 25136 x264 [info]: consecutive B-frames: 1.9% 0.9% 3.8% 15.5% 22.0% 39.4% 9.1% 3.6% 3.7% 2-PASS: Commandline for x264: "C:\Programs - W7\x264_x64.2010-04-25\pipebuf.exe" "C:\Programs - W7\x264_x64.2010-04-25\avs2yuv.exe" Q:\HDProjects\anger\anger.avs - : "C:\Programs - W7\x264_x64.2010-04-25\x264_x64.exe" --bitrate 6200 --pass 2 --stats Q:\HDProjects\anger\anger-crf175-aq08-psy100-b8-1629-me48-2pass.mkv.x264-stats --level 4.1 --ref 12 --no-fast-pskip --bframes 8 --slow-firstpass --weightp 2 --no-mbtree --b-pyramid normal --b-adapt 2 --direct auto --no-dct-decimate --deblock -3:-3 --subme 10 --trellis 2 --partitions all --me umh --merange 48 --thread-input --vbv-bufsize 62500 --vbv-maxrate 50000 --aq-mode 1 --aq-strength 0.8 --psy-rd 1.0:0 --ssim --output Q:\HDProjects\anger\anger-crf175-aq08-psy100-b8-1629-me48-2pass.mkv --frames 2505 --demuxer y4m --stdin y4m - : 4 x264 [info]: frame I:56 Avg QP:17.66 size:102710 x264 [info]: frame P:505 Avg QP:21.39 size: 45379 x264 [info]: frame B:1944 Avg QP:21.11 size: 26195 x264 [info]: consecutive B-frames: 1.9% 0.9% 3.8% 15.5% 22.0% 39.4% 9.1% 3.6% 3.7% CRF - 2-PASS: As you can see CRF gives more bitrate for static scenes than 2-PASS. And don't waste it - look at first mega leap on bitrate viewer screen. And look at quants )
__________________
In vino veritas Last edited by Kuningas; 10th June 2010 at 17:09. |
20th June 2010, 11:23 | #414 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Updated x264 binaries to r1649 (Komisar's builds).
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
20th June 2010, 16:04 | #416 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
27th June 2010, 17:41 | #417 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Updated x264 binaries to r1659 (Komisar's builds).
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
10th July 2010, 14:53 | #418 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Updated x264 binaries to r1666 (Komisar's builds).
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
10th July 2010, 14:55 | #419 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|