Since everybody is tossing in their $0.02…
Below are the Handbrake settings that work well for me for Blu-ray rips (1080p). No problem playing the resulting mp4 file with Plex on Nvidia Shield TV, Amazon Fire TV gen 2 & stick gen 1, or Nexus 5X phone. Also no problem loading into iTunes for streaming to Apple TV v3.
For Plex, one key is to not exceed the H264 Profile/Level capability of your clients, otherwise you’ll force a transcode. For example, AFTV Stick gen 1 supports max of high@4.0. If I try to play a video with a higher level using the AFTV Stick, PMS will transcode as the video exceeds the capabilities of the device, so I transcode Blu-ray rips to high@4.0. To a certain degree I’m encoding to the lowest common denominator. However, high@4.0 is more than adequate for 1080p material, so it isn’t a problem.
Format: MP4
Web Optimized = yes
Anamorphic: Auto
Modulus: 2
Cropping: Auto
Filters: All off (enable as needed for interlaced media, etc).
Video codec: H264
Framerate: Same as source, Variable framerate (all my media is 30fps or less & this works well)
Constant Quality = 20
Encoder Preset: Very Slow (Yeah, takes forever. Runs ~15fps on my system. I use Medium if I need the transcode to finish in less time).
Profile: High
Level: 4.0
Audio
For movies with AC3 5.1, dts 5.1, or better audio. Adjust as needed for media with 2.0 audio, etc.
First track: AAC Dolby Pro Logic II @ 320kbps
Second track: AC3 Passthru (if exists) or AC3 5.1 channels @ 640kbps (if no AC3 track exists & converting from dts, etc)
Subtitles
I burn in any forced subtitle tracks, otherwise I generally don’t bother with them. Personal preference. Subtitle Edit (free, Windows) works well if you want to extract & OCR subtitles. Can save them in SRT and many other formats.
MediaInfo for a recent encode
! Video #1
! ID : 1
! Format : AVC
! Format/Info : Advanced Video Codec
! Format profile : High@L4
! Format settings : CABAC / 4 Ref Frames
! Format settings, CABAC : Yes
! Format settings, RefFrames : 4 frames
! Codec ID : avc1
! Codec ID/Info : Advanced Video Coding
! Duration : 2 h 4 min
! Bit rate : 11.1 Mb/s
! Width : 1 920 pixels
! Height : 960 pixels
! Display aspect ratio : 2.000
! Frame rate mode : Variable
! Frame rate : 23.976 (24000/1001) FPS
! Minimum frame rate : 23.974 FPS
! Maximum frame rate : 23.981 FPS
! Color space : YUV
! Chroma subsampling : 4:2:0
! Bit depth : 8 bits
! Scan type : Progressive
! Bits/(Pixel*Frame) : 0.251
! Stream size : 9.66 GiB (92%)
! Writing library : x264 core 155 r2893 b00bcaf
! Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=25000 / vbv_bufsize=31250 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
! Encoded date : UTC 2018-02-13 01:45:42
! Tagged date : UTC 2018-02-13 01:45:42
! Color range : Limited
! Color primaries : BT.709
! Transfer characteristics : BT.709
! Matrix coefficients : BT.709
! Menus : 4,5
! tagc : public.main-program-content
!
! Audio #1
! ID : 2
! Format : AAC
! Format/Info : Advanced Audio Codec
! Format profile : LC
! Codec ID : mp4a-40-2
! Duration : 2 h 4 min
! Bit rate mode : Variable
! Bit rate : 320 kb/s
! Maximum bit rate : 375 kb/s
! Channel(s) : 2 channels
! Channel positions : Front: L R
! Sampling rate : 48.0 kHz
! Frame rate : 46.875 FPS (1024 SPF)
! Compression mode : Lossy
! Stream size : 285 MiB (3%)
! Title : Dolby Pro Logic II / Dolby Pro Logic II
! Language : English
! Default : Yes
! Alternate group : 1
! Encoded date : UTC 2018-02-13 01:45:42
! Tagged date : UTC 2018-02-13 01:45:42
! Fallback From : 3
! Menus : 4
! tagc : public.main-program-content
!
! Audio #2
! ID : 3
! Format : AC-3
! Format/Info : Audio Coding 3
! Codec ID : ac-3
! Duration : 2 h 4 min
! Bit rate mode : Constant
! Bit rate : 640 kb/s
! Channel(s) : 6 channels
! Channel positions : Front: L C R, Side: L R, LFE
! Sampling rate : 48.0 kHz
! Frame rate : 31.250 FPS (1536 SPF)
! Bit depth : 16 bits
! Compression mode : Lossy
! Stream size : 570 MiB (5%)
! Title : Dolby Digital 5.1 / Dolby Digital 5.1
! Language : English
! Service kind : Complete Main
! Default : Inherited From: 2
! Alternate group : 1
! Encoded date : UTC 2018-02-13 01:45:42
! Tagged date : UTC 2018-02-13 01:45:42
! Fallback To : 2
! tagc : public.main-program-content
!
Handbrake preset
(started with Apple 1080p30 preset & modified as needed)
! {
! “PresetList”: [
! {
! “AlignAVStart”: false,
! “AudioCopyMask”: [
! “copy:aac”,
! “copy:ac3”,
! “copy:dtshd”,
! “copy:dts”,
! “copy:mp3”,
! “copy:truehd”,
! “copy:flac”,
! “copy:eac3”
! ],
! “AudioEncoderFallback”: “ac3”,
! “AudioLanguageList”: ,
! “AudioList”: [
! {
! “AudioBitrate”: 320,
! “AudioCompressionLevel”: 0.0,
! “AudioEncoder”: “av_aac”,
! “AudioMixdown”: “dpl2”,
! “AudioNormalizeMixLevel”: false,
! “AudioSamplerate”: “auto”,
! “AudioTrackQualityEnable”: false,
! “AudioTrackQuality”: -1.0,
! “AudioTrackGainSlider”: 0.0,
! “AudioTrackDRCSlider”: 0.0
! },
! {
! “AudioBitrate”: 640,
! “AudioCompressionLevel”: 0.0,
! “AudioEncoder”: “ac3”,
! “AudioMixdown”: “5point1”,
! “AudioNormalizeMixLevel”: false,
! “AudioSamplerate”: “auto”,
! “AudioTrackQualityEnable”: false,
! “AudioTrackQuality”: -1.0,
! “AudioTrackGainSlider”: 0.0,
! “AudioTrackDRCSlider”: 0.0
! }
! ],
! “AudioSecondaryEncoderMode”: true,
! “AudioTrackSelectionBehavior”: “first”,
! “ChapterMarkers”: true,
! “ChildrenArray”: ,
! “Default”: true,
! “FileFormat”: “av_mp4”,
! “Folder”: false,
! “FolderOpen”: false,
! “Mp4HttpOptimize”: true,
! “Mp4iPodCompatible”: false,
! “PictureAutoCrop”: true,
! “PictureBottomCrop”: 0,
! “PictureLeftCrop”: 0,
! “PictureRightCrop”: 0,
! “PictureTopCrop”: 0,
! “PictureDARWidth”: 0,
! “PictureDeblock”: 0,
! “PictureDeinterlaceFilter”: “off”,
! “PictureCombDetectPreset”: “off”,
! “PictureCombDetectCustom”: “”,
! “PictureDeinterlacePreset”: “”,
! “PictureDeinterlaceCustom”: “”,
! “PictureDenoiseCustom”: “”,
! “PictureDenoiseFilter”: “off”,
! “PictureDenoisePreset”: “light”,
! “PictureDenoiseTune”: “none”,
! “PictureSharpenCustom”: “”,
! “PictureSharpenFilter”: “off”,
! “PictureSharpenPreset”: “medium”,
! “PictureSharpenTune”: “none”,
! “PictureDetelecine”: “off”,
! “PictureDetelecineCustom”: “”,
! “PictureItuPAR”: false,
! “PictureKeepRatio”: true,
! “PictureLooseCrop”: false,
! “PictureModulus”: 2,
! “PicturePAR”: “auto”,
! “PicturePARWidth”: 0,
! “PicturePARHeight”: 0,
! “PictureRotate”: “0:0”,
! “PictureForceHeight”: 0,
! “PictureForceWidth”: 0,
! “PresetDescription”: “”,
! “PresetName”: “Blu-ray Rips”,
! “Type”: 1,
! “UsesPictureFilters”: false,
! “UsesPictureSettings”: 1,
! “SubtitleAddCC”: false,
! “SubtitleAddForeignAudioSearch”: false,
! “SubtitleAddForeignAudioSubtitle”: false,
! “SubtitleBurnBehavior”: “none”,
! “SubtitleBurnBDSub”: false,
! “SubtitleBurnDVDSub”: false,
! “SubtitleLanguageList”: ,
! “SubtitleTrackSelectionBehavior”: “none”,
! “VideoAvgBitrate”: 0,
! “VideoColorMatrixCode”: 0,
! “VideoEncoder”: “x264”,
! “VideoFramerateMode”: “vfr”,
! “VideoGrayScale”: false,
! “VideoHWDecode”: false,
! “VideoScaler”: “swscale”,
! “VideoPreset”: “veryslow”,
! “VideoTune”: “”,
! “VideoProfile”: “high”,
! “VideoLevel”: “4.0”,
! “VideoOptionExtra”: “”,
! “VideoQualityType”: 2,
! “VideoQualitySlider”: 20.0,
! “VideoQSVDecode”: false,
! “VideoQSVAsyncDepth”: 4,
! “VideoTwoPass”: true,
! “VideoTurboTwoPass”: false,
! “x264Option”: “”,
! “x264UseAdvancedOptions”: false
! }
! ],
! “VersionMajor”: “11”,
! “VersionMicro”: “0”,
! “VersionMinor”: “0”
! }
!