Log in

View Full Version : [Solved] Disappointing results using CQ with a CRF of 18


Beastie Boy
27th March 2008, 13:07
I have used x264 and MeGUI to transcode a HD-DVD vc1 for playback on the PS3.
All the latest software versions were used as updated by MeGUI. My method was to use eac3to to extract the vc1 and mux to mkv. The mkv was than load into MeGUI to create the avs script with borders cropped (maintaining mod16 dimensions), and ConverttoYV12 was automatically added by MeGUI.
I chose the PD-PS3-XBox360 profile as below:

<?xml version="1.0" ?>

<Name>PD-PS3-Xbox360</Name>
- <Settings xsi:type="x264Settings">
<EncodingMode>4</EncodingMode>
<BitrateQuantizer>1000</BitrateQuantizer>
<KeyframeInterval>250</KeyframeInterval>
<NbBframes>3</NbBframes>
<MinQuantizer>10</MinQuantizer>
<MaxQuantizer>51</MaxQuantizer>
<Turbo>true</Turbo>
<V4MV>false</V4MV>
<QPel>false</QPel>
<Trellis>false</Trellis>
<CreditsQuantizer>40</CreditsQuantizer>
<Logfile>.stats</Logfile>
<CustomEncoderOptions />
<FourCC>1</FourCC>
<Zones />
<MaxNumberOfPasses>3</MaxNumberOfPasses>
<NbThreads>0</NbThreads>
<QuantizerCRF>1000</QuantizerCRF>
<EncodeInterlaced>false</EncodeInterlaced>
<NoDCTDecimate>false</NoDCTDecimate>
<PSNRCalculation>false</PSNRCalculation>
<noFastPSkip>false</noFastPSkip>
<NoiseReduction>0</NoiseReduction>
<MixedRefs>true</MixedRefs>
<X264Trellis>1</X264Trellis>
<NbRefFrames>3</NbRefFrames>
<AlphaDeblock>0</AlphaDeblock>
<BetaDeblock>0</BetaDeblock>
<SubPelRefinement>5</SubPelRefinement>
<MaxQuantDelta>4</MaxQuantDelta>
<TempQuantBlur>0</TempQuantBlur>
<BframePredictionMode>3</BframePredictionMode>
<VBVBufferSize>9000</VBVBufferSize>
<VBVMaxBitrate>24000</VBVMaxBitrate>
<METype>2</METype>
<MERange>12</MERange>
<MinGOPSize>25</MinGOPSize>
<Profile>2</Profile>
<Level>11</Level>
<IPFactor>1.1</IPFactor>
<PBFactor>1.1</PBFactor>
<ChromaQPOffset>0</ChromaQPOffset>
<VBVInitialBuffer>0.9</VBVInitialBuffer>
<BitrateVariance>1.0</BitrateVariance>
<QuantCompression>0.5</QuantCompression>
<TempComplexityBlur>20</TempComplexityBlur>
<TempQuanBlurCC>0.5</TempQuanBlurCC>
<SCDSensitivity>40</SCDSensitivity>
<BframeBias>0</BframeBias>
<Deblock>true</Deblock>
<Cabac>true</Cabac>
<WeightedBPrediction>true</WeightedBPrediction>
<AdaptiveBFrames>true</AdaptiveBFrames>
<BFramePyramid>false</BFramePyramid>
<BRDO>true</BRDO>
<biME>true</biME>
<ChromaME>true</ChromaME>
<P8x8mv>true</P8x8mv>
<B8x8mv>true</B8x8mv>
<I4x4mv>true</I4x4mv>
<I8x8mv>true</I8x8mv>
<P4x4mv>false</P4x4mv>
<AdaptiveDCT>true</AdaptiveDCT>
<SSIMCalculation>false</SSIMCalculation>
<Lossless>false</Lossless>
<QuantizerMatrix>Flat (none)</QuantizerMatrix>
<QuantizerMatrixType>0</QuantizerMatrixType>
<DeadZoneInter>21</DeadZoneInter>
<DeadZoneIntra>11</DeadZoneIntra>
</Settings>
</GenericProfileOfVideoCodecSettings>

but with the following changes:

VBVMaxBitrate was upped from 24000 to 40000
B-Pyramid enabled
Constant Quality mode used with a CRF of 18

I have skipped through parts of the video to check everything was OK, and well...it isn't :(

The detailed areas of the picture look great, the problem lies in areas of uniform colour. eg, in The Matrix where Neo is being interrogated and his mouth seals up, the wall at the background is not smooth and even and appears o be constantly moving as though alive.
In Matrix Reloaded, in a scene with Neo and Trinity, Neo's skin is extremely blocky.

I chose CQ and CRF 18 as I have read that the results at this level are pretty much transparent and file size is not such an issue as I am streaming from HDD.
Are there any settings I can change/add to improve PQ whilst maintaing compatibility with the PS3? Idealy, I was hoping not to drop below 2fps encoding speed on my 2.5GHz AMD X2 (which is the speed I am getting with the above settings.

The alternative for me is to keep the video as vc1 and mux to WMV and stream to 360 instead.

Cheers, Beastie.

MythCreator
27th March 2008, 14:11
Just try my profile:

<?xml version="1.0" ?>
- <GenericProfileOfVideoCodecSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>MythCreator - x264</Name>
- <Settings xsi:type="x264Settings">
<EncodingMode>4</EncodingMode>
<BitrateQuantizer>1500</BitrateQuantizer>
<KeyframeInterval>120</KeyframeInterval>
<NbBframes>4</NbBframes>
<MinQuantizer>10</MinQuantizer>
<MaxQuantizer>51</MaxQuantizer>
<Turbo>true</Turbo>
<V4MV>false</V4MV>
<QPel>false</QPel>
<Trellis>false</Trellis>
<CreditsQuantizer>40</CreditsQuantizer>
<Logfile>.stats</Logfile>
<CustomEncoderOptions>--aq-strength 0.5 --aq-sensitivity 13</CustomEncoderOptions>
<FourCC>1</FourCC>
<Zones />
<MaxNumberOfPasses>3</MaxNumberOfPasses>
<NbThreads>0</NbThreads>
<QuantizerCRF>1500</QuantizerCRF>
<EncodeInterlaced>false</EncodeInterlaced>
<NoDCTDecimate>true</NoDCTDecimate>
<PSNRCalculation>false</PSNRCalculation>
<noFastPSkip>true</noFastPSkip>
<NoiseReduction>0</NoiseReduction>
<MixedRefs>true</MixedRefs>
<X264Trellis>0</X264Trellis>
<NbRefFrames>16</NbRefFrames>
<AlphaDeblock>-2</AlphaDeblock>
<BetaDeblock>-4</BetaDeblock>
<SubPelRefinement>6</SubPelRefinement>
<MaxQuantDelta>4</MaxQuantDelta>
<TempQuantBlur>0</TempQuantBlur>
<BframePredictionMode>3</BframePredictionMode>
<VBVBufferSize>-1</VBVBufferSize>
<VBVMaxBitrate>-1</VBVMaxBitrate>
<METype>4</METype>
<MERange>16</MERange>
<MinGOPSize>25</MinGOPSize>
<Profile>2</Profile>
<Level>15</Level>
<IPFactor>1.4</IPFactor>
<PBFactor>1.3</PBFactor>
<ChromaQPOffset>0</ChromaQPOffset>
<VBVInitialBuffer>0.9</VBVInitialBuffer>
<BitrateVariance>1.0</BitrateVariance>
<QuantCompression>1.0</QuantCompression>
<TempComplexityBlur>20</TempComplexityBlur>
<TempQuanBlurCC>0.5</TempQuanBlurCC>
<SCDSensitivity>40</SCDSensitivity>
<BframeBias>0</BframeBias>
<Deblock>true</Deblock>
<Cabac>true</Cabac>
<WeightedBPrediction>true</WeightedBPrediction>
<AdaptiveBFrames>true</AdaptiveBFrames>
<BFramePyramid>true</BFramePyramid>
<BRDO>true</BRDO>
<biME>true</biME>
<ChromaME>true</ChromaME>
<P8x8mv>true</P8x8mv>
<B8x8mv>true</B8x8mv>
<I4x4mv>true</I4x4mv>
<I8x8mv>true</I8x8mv>
<P4x4mv>false</P4x4mv>
<AdaptiveDCT>true</AdaptiveDCT>
<SSIMCalculation>false</SSIMCalculation>
<Lossless>false</Lossless>
<QuantizerMatrix>JVT</QuantizerMatrix>
<QuantizerMatrixType>1</QuantizerMatrixType>
<DeadZoneInter>4</DeadZoneInter>
<DeadZoneIntra>6</DeadZoneIntra>
</Settings>
</GenericProfileOfVideoCodecSettings>


I don't know whether it could playback on PS3,Just try it~

BTW:To use AQ,please use bob0r's build or my build.

Beastie Boy
27th March 2008, 14:24
Thanks, I will try this out. Is it a 3 pass encode? I was trying to avoid specifying a bitrate and just let the encoder used what it needed. I believe the PS3 can only handle 3 reference frames. Will this hurt quality much?

Noob question:- to use your profile, do I need to save it as an xml file, zip it and use the import function in MeGUI :o

Cheers, Beastie.

MythCreator
27th March 2008, 14:38
It's a 2pass encode.3Ref.frames wouldn't hurt so much.

To use this just save as a XML file and put it into megui/profiles/Video ,and make sure your MeGUI
is 0.2.6.1045

Beastie Boy
27th March 2008, 14:46
:thanks:

Beastie Boy
2nd April 2008, 08:59
Just a quick update on this. The profile posted by MythCreator above works on the PS3 with 3 reference frames, a max bitrate of 42000 and profile set to 4.1.
The first pass encode speed was 8fps and the second 1fps. I think I need to update my hardware before using this profile regularly, 2 days to encode a movie is too long for me.

However, I found that he artefacts described above were actually cause by Nero Showtime when playing back the .264 file. When I muxed to a .ts container and played back via MPC, the quality was excellent.

Cheers, Beastie.