VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Handbrake Preset: x264-9898 (Standard Quality)

    I would like to share my x264 preset. First I am going to tell you what devices I view these on:
    - 32 inch 720p flat screen Sceptre TV connected to my PC for the screen
    - LG Optimus G Pro Smartphone
    - BD-AMS20U Blu-Ray Player

    My preset was made using Handbrake.

    My preset is based on "Standard Quality" using a certain release group's preset to help me get started. I have modified the settings to my liking:

    - With a resolution at always 720x?
    - Audio always at 96k 48kHz stereo AAC
    - Container is always mkv
    (You may use mp4 if you prefer but the reason I always use mkv is for some reason the blu-ray player mentioned above does NOT play x264 as mp4 but it DOES play x264 as mkv.)
    - A constant quality of CRF=25
    (Yes you read that correct. CRF=25. Constant Quality!)

    The command line code:

    Code:
    mixed-refs=1:weightb=1:no-fast-pskip=1:rc-lookahead=60:threads=4:ref=8:bframes=8:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=9:analyse=all:trellis=2
    I have a 8-core processor so I use threads=4 so I can also do other things on my PC while still encoding. You may need to change this option if you have higher cores or if you go away from your pc while encoding.

    I have also attatched my preset file to be imported into Handbrake. You may also copy and paste the following into notepad or a text editor program and save the file as x264-9898.plist :

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist>
      <array>
        <dict>
          <key>AudioList</key>
          <array>
            <dict>
              <key>AudioBitrate</key>
              <string>96</string>
              <key>AudioEncoder</key>
              <string>AAC (avcodec)</string>
              <key>AudioMixdown</key>
              <string>Stereo</string>
              <key>AudioSamplerate</key>
              <string>48</string>
              <key>AudioTrack</key>
              <integer>1</integer>
              <key>AudioTrackDRCSlider</key>
              <real>0</real>
              <key>AudioTrackDescription</key>
              <string>Unknown</string>
              <key>AudioTrackGainSlider</key>
              <real>0</real>
            </dict>
          </array>
          <key>AudioAllowAACPass</key>
          <true />
          <key>AudioAllowAC3Pass</key>
          <true />
          <key>AudioAllowDTSHDPass</key>
          <true />
          <key>AudioAllowDTSPass</key>
          <true />
          <key>AudioAllowMP3Pass</key>
          <true />
          <key>AudioEncoderFallback</key>
          <string>AC3</string>
          <key>ChapterMarkers</key>
          <false />
          <key>Default</key>
          <integer>0</integer>
          <key>FileFormat</key>
          <string>MKV file</string>
          <key>Folder</key>
          <false />
          <key>Mp4HttpOptimize</key>
          <integer>0</integer>
          <key>Mp4iPodCompatible</key>
          <integer>0</integer>
          <key>PictureAutoCrop</key>
          <integer>1</integer>
          <key>PictureDeblock</key>
          <integer>4</integer>
          <key>PictureDecombDeinterlace</key>
          <false />
          <key>PictureDecombCustom</key>
          <string />
          <key>PictureDecomb</key>
          <integer>0</integer>
          <key>PictureDeinterlaceCustom</key>
          <string />
          <key>PictureDeinterlace</key>
          <integer>0</integer>
          <key>PictureDenoiseFilter</key>
          <string>off</string>
          <key>PictureDenoiseCustom</key>
          <string />
          <key>PictureDenoisePreset</key>
          <string>weak</string>
          <key>PictureDetelecine</key>
          <integer>0</integer>
          <key>PictureDetelecineCustom</key>
          <string />
          <key>PictureHeight</key>
          <integer>304</integer>
          <key>PictureKeepRatio</key>
          <integer>1</integer>
          <key>PictureModulus</key>
          <integer>16</integer>
          <key>PicturePAR</key>
          <integer>0</integer>
          <key>PictureLeftCrop</key>
          <integer>0</integer>
          <key>PictureRightCrop</key>
          <integer>0</integer>
          <key>PictureTopCrop</key>
          <integer>0</integer>
          <key>PictureBottomCrop</key>
          <integer>0</integer>
          <key>PictureWidth</key>
          <integer>720</integer>
          <key>PresetBuildNumber</key>
          <string>2014112200</string>
          <key>PresetDescription</key>
          <string>No Description</string>
          <key>PresetName</key>
          <string>x264-9898</string>
          <key>Type</key>
          <integer>1</integer>
          <key>UsesMaxPictureSettings</key>
          <integer>1</integer>
          <key>UsesPictureFilters</key>
          <integer>1</integer>
          <key>UsesPictureSettings</key>
          <integer>1</integer>
          <key>VideoAvgBitrate</key>
          <string />
          <key>VideoEncoder</key>
          <string>H.264 (x264)</string>
          <key>VideoFramerate</key>
          <string>Same as source</string>
          <key>VideoFramerateMode</key>
          <string>cfr</string>
          <key>VideoGrayScale</key>
          <false />
          <key>VideoQualitySlider</key>
          <real>25</real>
          <key>h264Level</key>
          <string>Auto</string>
          <key>x264OptionExtra</key>
          <string>mixed-refs=1:weightb=1:no-fast-pskip=1:rc-lookahead=60:threads=4:ref=8:bframes=8:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=9:analyse=all:trellis=2</string>
          <key>x264Preset</key>
          <string>medium</string>
          <key>h264Profile</key>
          <string>none</string>
          <key>x264Tune</key>
          <string>none</string>
          <key>x264UseAdvancedOptions</key>
          <integer>1</integer>
          <key>h265Profile</key>
          <string>none</string>
          <key>x265Preset</key>
          <string>veryfast</string>
          <key>x265Tune</key>
          <string>none</string>
          <key>VideoQualityType</key>
          <integer>2</integer>
          <key>VideoTargetSize</key>
          <string />
          <key>VideoTurboTwoPass</key>
          <integer>0</integer>
          <key>VideoTwoPass</key>
          <integer>0</integer>
          <key>x264Option</key>
          <string>mixed-refs=1:weightb=1:no-fast-pskip=1:rc-lookahead=60:threads=4:ref=8:bframes=8:b-adapt=2:direct=auto:b-pyramid=strict:me=umh:subme=9:analyse=all:trellis=2</string>
        </dict>
      </array>
    </plist>
    Please use this thread to post comments, opinions, and advice if you want and please be kind.
    Enjoy!
    Image Attached Files
    ----> adamf9898 ---->
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    I don't know Handbrake, so I don't know which AAC encoder it uses; but if it supports quality based VBR, I would recommend that over CBR. If it is the FhG AAC, then I understand that it is indeed VBR, trying to get close to an average of the given bitrate...

    Up to 8 consecutive B frames and 8 reference frames ... optimistic limits. I am surprised that your players can handle that. Probably because the results usually never come close to these limits.

    CRF 25 is rather coarse. I doubt I would be satisfied with such results.
    Quote Quote  
  3. LigH.de,

    Thank you for the reply!

    The results from my preset are for standard quality purposes. I do not need them to be so big or high. They play and work perfect for the devices I mentioned. They are not blocky or fuzzy or anything bad at all. For pc use, I use vlc with the option of full screen, and always fit window. With a screen resolution at 1366x768.

    May I suggest to at least TRY out my preset with those settings and then post back?

    Again , Thank you very much for replying!
    Not many people seem to care.
    ----> adamf9898 ---->
    Quote Quote  
  4. You can go a bit lower with reference frames, even in case of 720p, you can have a bit more reference frames than full HD. 720 has less data so there is more frames needed to fill buffers , but looking you encode for phone as well, do not look for anything miraculous or harder to get processors too busy while encoding.
    In ffmpeg settings just specify reference frame to about 6, like ref=6. x264 encoder sets defaults for rest. You are going to use phone so less the better, but that smartphone should have not have problems with x264 defaults and 5-6 ref frames limit buffers to about 15000 , just to be sure, if it can be done in Handbrake - for 720p. Remember you use CRF so those settings will not really make your video worse as oppose using defaults.
    Generally to crank up settings and have crappy result (CRF 25 is not perfect) kind of does not click.
    Quote Quote  
  5. Try encoding this clip with those settings.
    Image Attached Files
    Quote Quote  
  6. Thank you for your replys!

    I have now decided to change a few options.

    In the video tab, instead of choosing use advanced tab, I have chosen to just use the preset settings with the settings that was in the advanced tab.

    So here are my new settings:

    Picture Tab:
    Size = Width is ALWAYS 720 when can be; Height = ? (Keep Aspect Ratio is checked)
    Cropping = Custom; Top, Left, Right, and Borrom are all set to 0
    Anamorphic = None
    Modulus = 16

    Filters Tab:
    ALL filters are OFF; No filters used.

    Video Tab:
    Video Codec = H.264 x264
    Framerate = same as source; constant framerate
    Quality = CRF = 25
    Optimize Video =
    x264 Preset = Medium
    x264 Tune = Film Fast Decode is checked
    H.264 Profile = High
    H.264 Level = 4.1
    Extra Options = mixed-refs=1:weightb=1:no-fast-pskip=1:rc-lookahead=60:threads=4:ref=5:bframes=3:b-adapt=2:direct=auto:b-pyramid=strict:me=umhubme=9:analyse=all:trellis=2

    Audio Tab:
    Codec = AAC (avcodec)
    Bitrate = 96
    Mixdown = Stereo
    Samplerate = 48

    No Subtitles and No Chapters
    Here is the code:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist>
      <array>
        <dict>
          <key>AudioList</key>
          <array>
            <dict>
              <key>AudioBitrate</key>
              <string>96</string>
              <key>AudioEncoder</key>
              <string>AAC (avcodec)</string>
              <key>AudioMixdown</key>
              <string>Stereo</string>
              <key>AudioSamplerate</key>
              <string>48</string>
              <key>AudioTrack</key>
              <integer>1</integer>
              <key>AudioTrackDRCSlider</key>
              <real>0</real>
              <key>AudioTrackDescription</key>
              <string>Unknown</string>
              <key>AudioTrackGainSlider</key>
              <real>0</real>
            </dict>
          </array>
          <key>AudioAllowAACPass</key>
          <true />
          <key>AudioAllowAC3Pass</key>
          <true />
          <key>AudioAllowDTSHDPass</key>
          <true />
          <key>AudioAllowDTSPass</key>
          <true />
          <key>AudioAllowMP3Pass</key>
          <true />
          <key>AudioEncoderFallback</key>
          <string>AC3</string>
          <key>ChapterMarkers</key>
          <false />
          <key>Default</key>
          <integer>0</integer>
          <key>FileFormat</key>
          <string>MKV file</string>
          <key>Folder</key>
          <false />
          <key>Mp4HttpOptimize</key>
          <integer>0</integer>
          <key>Mp4iPodCompatible</key>
          <integer>0</integer>
          <key>PictureAutoCrop</key>
          <integer>1</integer>
          <key>PictureDeblock</key>
          <integer>4</integer>
          <key>PictureDecombDeinterlace</key>
          <false />
          <key>PictureDecombCustom</key>
          <string />
          <key>PictureDecomb</key>
          <integer>0</integer>
          <key>PictureDeinterlaceCustom</key>
          <string />
          <key>PictureDeinterlace</key>
          <integer>0</integer>
          <key>PictureDenoiseFilter</key>
          <string>off</string>
          <key>PictureDenoiseCustom</key>
          <string />
          <key>PictureDenoisePreset</key>
          <string>weak</string>
          <key>PictureDetelecine</key>
          <integer>0</integer>
          <key>PictureDetelecineCustom</key>
          <string />
          <key>PictureHeight</key>
          <integer>384</integer>
          <key>PictureKeepRatio</key>
          <integer>1</integer>
          <key>PictureModulus</key>
          <integer>16</integer>
          <key>PicturePAR</key>
          <integer>0</integer>
          <key>PictureLeftCrop</key>
          <integer>0</integer>
          <key>PictureRightCrop</key>
          <integer>0</integer>
          <key>PictureTopCrop</key>
          <integer>0</integer>
          <key>PictureBottomCrop</key>
          <integer>0</integer>
          <key>PictureWidth</key>
          <integer>720</integer>
          <key>PresetBuildNumber</key>
          <string>2014112200</string>
          <key>PresetDescription</key>
          <string>No Description</string>
          <key>PresetName</key>
          <string>x264-9898</string>
          <key>Type</key>
          <integer>1</integer>
          <key>UsesMaxPictureSettings</key>
          <integer>1</integer>
          <key>UsesPictureFilters</key>
          <integer>1</integer>
          <key>UsesPictureSettings</key>
          <integer>1</integer>
          <key>VideoAvgBitrate</key>
          <string />
          <key>VideoEncoder</key>
          <string>H.264 (x264)</string>
          <key>VideoFramerate</key>
          <string>Same as source</string>
          <key>VideoFramerateMode</key>
          <string>cfr</string>
          <key>VideoGrayScale</key>
          <false />
          <key>VideoQualitySlider</key>
          <real>25</real>
          <key>h264Level</key>
          <string>4.1</string>
          <key>x264OptionExtra</key>
          <string />
          <key>x264Preset</key>
          <string>medium</string>
          <key>h264Profile</key>
          <string>high</string>
          <key>x264Tune</key>
          <string>film,fastdecode</string>
          <key>x264UseAdvancedOptions</key>
          <integer>0</integer>
          <key>h265Profile</key>
          <string>none</string>
          <key>x265Preset</key>
          <string>veryfast</string>
          <key>x265Tune</key>
          <string>none</string>
          <key>VideoQualityType</key>
          <integer>2</integer>
          <key>VideoTargetSize</key>
          <string />
          <key>VideoTurboTwoPass</key>
          <integer>0</integer>
          <key>VideoTwoPass</key>
          <integer>0</integer>
          <key>x264Option</key>
          <string />
        </dict>
      </array>
    </plist>
    And I have attatched the new preset file

    Originally Posted by jagabo View Post
    Try encoding this clip with those settings.
    The video converted with no problem, filesize is 389 KB
    Image Attached Files
    Last edited by adamf9898; 19th Jan 2015 at 00:38.
    ----> adamf9898 ---->
    Quote Quote  
  7. Hello, so basically this is what you recommend?

    Code:
    --level 4.1 --preset slower --tune film --crf 25.0 --b-pyramid strict --ref 5 --vbv-bufsize 78125 --vbv-maxrate 62500 --no-fast-pskip
    Last edited by Acımasız; 19th Jan 2015 at 15:08.
    Quote Quote  
  8. Originally Posted by adamf9898 View Post
    Originally Posted by jagabo View Post
    Try encoding this clip with those settings.
    The video converted with no problem, filesize is 389 KB
    Yes, but it looks like crap. It's full of posterization artifacts, as expected.
    Quote Quote  
  9. The original video clip looked crappy to me so yes i agree. The original had lines across and was jumpy also.

    As for Acımasız, i have gave the specific details with attatchments on the settings. I read your commands you have in code as far as --preset slower. So my answer would have to be, no. Due to my settings chosen for that option is set to medium, but slower would seem fine if thats what you want. But to use my settings please remember for pc I use vlc with the option of full screen, and always fit window. With a screen resolution at 1366x768.

    Thanks for the replys! I am looking forward to hear more about my settings!
    Last edited by adamf9898; 19th Jan 2015 at 17:09.
    ----> adamf9898 ---->
    Quote Quote  
  10. Originally Posted by adamf9898 View Post
    Thank you for your replys!

    I have now decided to change a few options.

    In the video tab, instead of choosing use advanced tab, I have chosen to just use the preset settings with the settings that was in the advanced tab.

    So here are my new settings:

    Picture Tab:
    Size = Width is ALWAYS 720 when can be; Height = ? (Keep Aspect Ratio is checked)
    Cropping = Custom; Top, Left, Right, and Borrom are all set to 0
    Anamorphic = None
    Modulus = 16

    Filters Tab:
    ALL filters are OFF; No filters used.

    Video Tab:
    Video Codec = H.264 x264
    Framerate = same as source; constant framerate
    Quality = CRF = 25
    Optimize Video =
    x264 Preset = Medium
    x264 Tune = Film Fast Decode is checked
    H.264 Profile = High
    H.264 Level = 4.1
    Extra Options = mixed-refs=1:weightb=1:no-fast-pskip=1:rc-lookahead=60:threads=4:ref=5:bframes=3:b-adapt=2:direct=auto:b-pyramid=strict:me=umhubme=9:analyse=all:trellis=2

    Audio Tab:
    Codec = AAC (avcodec)
    Bitrate = 96
    Mixdown = Stereo
    Samplerate = 48

    No Subtitles and No Chapters
    Width depends on source and desired output resolution, cropping too, so I wouldn't list those as something mandatory.

    Anamorphic might be useful to prevent resizing for some sources and avoid unnecessary, though small quality loss. Should be avoided only if playback device does not support anamorphic video.

    Modulus 16 is not necessary for x264 encoder it works just fine with modulus 2 or 4. Modulus 2 also avoids resizing, with or without cropping.

    CRF 25? Personal preference. Might work for you but someone else might find it unacceptable.

    Tune film usually works just fine for most of the video but some might require some other tuning, or no tuning at all.

    Fast decode? If it does what I think it does - DO NOT USE IT.
    And what it does:
    --no-cabac --no-deblock --no-weightb --weightp 0

    CABAC without any loss of quality reduces file size up to 20%.
    Deblock at CRF 25 will help a lot to reduce macroblocks.
    weightp=0? weightp should not be disabled as it helps with fades.

    Profile High OK.

    Level 4.1 for SD video? Useless. It does not add or remove any quality but may prevent some devices to play encoded video just because header says it is 4.1. Do not use Level unless you target some specific device.

    mixed-refs is on by default for preset faster and up.
    no-fast-pskip increases bitrate and you target low bitrate encode.
    Number of threads depends on number of CPU cores and hyperthreading for some Intel procesors so it should not be set manually.
    b-pyramind strict? No reason for that unless your player does not suppot multiple B-frames as reference.

    AAC (avcodec)? I would use FDK AAC as it will give you more quality. AAC avcodec is not of very good quality yet.
    Samplerate 48? Should be as source as there is no reason to resample 44.1 khz audio.

    Subtitles and Chapters? Do one needs those or not? Personal preference.
    Quote Quote  
  11. Originally Posted by adamf9898 View Post
    The original video clip looked crappy to me so yes i agree. The original had lines across and was jumpy also.
    There was nothing wrong with the sample clip. It is from a Blu-ray disc and is an accurate encoding of the original film. At CRF=25 you will often see posterization in areas with smooth gradients, especially dark areas.
    Quote Quote  
  12. And without deblocking it has a lot of macroblocks.

    P.S. I actually encoded one test clip with proposed settings before I wrote my previous post. A lot of macroblocks that gone after I unchecked Fast Decode.
    Quote Quote  
  13. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    It always has "macroblocks". Macroblocks are the encoded units of the video. You mean "block artefacts". Deblocking will interpolate the borders of decoded blocks to reduce artefacts.
    Quote Quote  
  14. Yep, sorry. Visible blocking artifacts. I call them visible macroblocks or just macroblocks/macroblocking. I should avoid using that term.
    Quote Quote  
  15. Thanks for all the replies! I now have my settings finished to my liking, if anyone is interested, just post here or send me a PM/email and i will gladly share my final settings!
    ----> adamf9898 ---->
    Quote Quote  
  16. I just started video conversion for my daughter's movies and the last updated preset you posted words great for me. Thanks for the hard work. May I try your final settings?
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!