gamebox
26th November 2014, 23:21
Hello all. :)
I am looking for ways to further refine/optimize my high-resolution low-bitrate encodes. The footage is real-life, lots of closeups of people/skin, room interiors present, some noise in dark areas originating from camera (CMOS?) sensor.
For 720p encodes at 3 Mbps I use:
bitdepth=8 cabac=1 ref=8 deblock=1:-1:-1 analyse=0x1:0 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=1 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=3000 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
Encodes usually end up having quantizer of 23-25, which is acceptable to me (25 as the last resort). The process is performed at about 1 fps on single-core Athlon64 3500+, which is approximately about 40 hours per encode, and I can accept that (but not much slower, not more than, say, 15-20%).
I have questions about these options and their influence on quality and speed:
- would merange of more than 24 improve quality, and how would it affect encoding speed (raising from 16 to 24 didn't seem to slow it more than, let's say, 10%)
- B-frames as references: strictly hierarchical. I've set it this way primarily because it seems to be "doing good" for standalone playability. Would "Non-strict" make video unplayable on blu-ray players, media players, set top boxes, my Radeon 4350 GPU, etc? Would it bring better visual quality?
- Is using more than 3 B-frames allowed by spec (in light of standalone support mostly), and would it bring quality increase? I've used mostly 2-3 B-frames on SD Xvid, and most of real-life scenes couldn't use more anyway; the picture was rarely "steady enough" to be encoded with more than 2 in a row.
- Trellis quantization: is "Always on" better than "Final macroblock only", and does it affect device compatibility? What does each one of them do (I have some understanding of the Trellis itself)?
- PSY-RD: 1, PSY-Trellis: 0. I'm very careful here - is it best to leave defaults on?
- Variance-AQ: Normal. Seems most important for me - is "Auto variance AQ" still considered "experimental", and does it bring standalone issues? Which way is the Auto-variance AQ different than Normal AQ; if I understand correctly, Normal chooses quantizers for each frame, and Auto goes deeper - manipulating them inside a frame, on a block-level? If it is so, is Auto applying more compression on low-contrast textures and less in high-detail areas?
Two biggest issues I have are with details in lower-contrast areas that sometimes get washed out and blocks made flat - for instance, with scenes shot without providing well enough lighting for people's faces and skin. For me, this issue seems hard to solve without compromising psycho-visual options in the entire clip, but those are essential at such low bitrates, as they keep details in "important" areas of the picture on account of the ones that draw less viewer's "attention".
The second issue is the camera-sensor noise. It exists in very dark (low-contrast) areas of image (on screen edges - peripheral parts of the scene, in distant furniture/carpetry/walls that are dark but not fully off-focus, etc). It is not much pronounced, and not highly noticable when watching the video, as well-lit objects draw more attention, but those are the areas of constant texture changes, and as such, I presume, require lots of "attention" from an encoder. Can x264's Noise Reduction help with that, or do I need some pre-filter? And, regarding that issue, I've noticed x264 encodes vary in bitrate somewhat less than xvid did - I always had an impression that H.263 quantization was somehow "simplyfing" the image and textures, so off-focus, low contrast scenery remains (almost) static through P and B frames. Is it really so, or just my impression?
Thanks a lot for your time! :)
I am looking for ways to further refine/optimize my high-resolution low-bitrate encodes. The footage is real-life, lots of closeups of people/skin, room interiors present, some noise in dark areas originating from camera (CMOS?) sensor.
For 720p encodes at 3 Mbps I use:
bitdepth=8 cabac=1 ref=8 deblock=1:-1:-1 analyse=0x1:0 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=1 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=3000 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
Encodes usually end up having quantizer of 23-25, which is acceptable to me (25 as the last resort). The process is performed at about 1 fps on single-core Athlon64 3500+, which is approximately about 40 hours per encode, and I can accept that (but not much slower, not more than, say, 15-20%).
I have questions about these options and their influence on quality and speed:
- would merange of more than 24 improve quality, and how would it affect encoding speed (raising from 16 to 24 didn't seem to slow it more than, let's say, 10%)
- B-frames as references: strictly hierarchical. I've set it this way primarily because it seems to be "doing good" for standalone playability. Would "Non-strict" make video unplayable on blu-ray players, media players, set top boxes, my Radeon 4350 GPU, etc? Would it bring better visual quality?
- Is using more than 3 B-frames allowed by spec (in light of standalone support mostly), and would it bring quality increase? I've used mostly 2-3 B-frames on SD Xvid, and most of real-life scenes couldn't use more anyway; the picture was rarely "steady enough" to be encoded with more than 2 in a row.
- Trellis quantization: is "Always on" better than "Final macroblock only", and does it affect device compatibility? What does each one of them do (I have some understanding of the Trellis itself)?
- PSY-RD: 1, PSY-Trellis: 0. I'm very careful here - is it best to leave defaults on?
- Variance-AQ: Normal. Seems most important for me - is "Auto variance AQ" still considered "experimental", and does it bring standalone issues? Which way is the Auto-variance AQ different than Normal AQ; if I understand correctly, Normal chooses quantizers for each frame, and Auto goes deeper - manipulating them inside a frame, on a block-level? If it is so, is Auto applying more compression on low-contrast textures and less in high-detail areas?
Two biggest issues I have are with details in lower-contrast areas that sometimes get washed out and blocks made flat - for instance, with scenes shot without providing well enough lighting for people's faces and skin. For me, this issue seems hard to solve without compromising psycho-visual options in the entire clip, but those are essential at such low bitrates, as they keep details in "important" areas of the picture on account of the ones that draw less viewer's "attention".
The second issue is the camera-sensor noise. It exists in very dark (low-contrast) areas of image (on screen edges - peripheral parts of the scene, in distant furniture/carpetry/walls that are dark but not fully off-focus, etc). It is not much pronounced, and not highly noticable when watching the video, as well-lit objects draw more attention, but those are the areas of constant texture changes, and as such, I presume, require lots of "attention" from an encoder. Can x264's Noise Reduction help with that, or do I need some pre-filter? And, regarding that issue, I've noticed x264 encodes vary in bitrate somewhat less than xvid did - I always had an impression that H.263 quantization was somehow "simplyfing" the image and textures, so off-focus, low contrast scenery remains (almost) static through P and B frames. Is it really so, or just my impression?
Thanks a lot for your time! :)