Skip to content

Instantly share code, notes, and snippets.

@alesmenzel
Forked from kuntau/yify.md
Created April 9, 2020 18:56
Show Gist options
  • Select an option

  • Save alesmenzel/e5ffc73526d16ea1ea7d70072151e66e to your computer and use it in GitHub Desktop.

Select an option

Save alesmenzel/e5ffc73526d16ea1ea7d70072151e66e to your computer and use it in GitHub Desktop.
YIFY's Quality Encoding

For those that want to keep the YTS going (No, IDGAF about people that don't care for YTS quality) get HandbrakeCLI https://handbrake.fr/downloads... and use the following settings:

user@user:~$HandBrakeCLI -i /file/input.mp4 -o /file/out.mp4 -E fdk_faac -B 96k -6 stereo -R 44.1 -e x264 -q 27 -x cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all

Reason to use CLI over GTK has to do with lack of support for advanced settings for Handbrake GTK

** Don't Re-encode already shitty encodes...get good source!**

@alesmenzel
Copy link
Author

FFMPEG version of yifi

ffmpeg -i input.mkv -c:v libx264 -crf 27 -x264-params cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all -c:a aac -ar 44100 -b:a 128k -map 0 output.mkv

@muza920
Copy link

muza920 commented Feb 16, 2021

How can I use this code?
Anyone?
I tried out different settings on my own to compress a video I shot.Found this setting but don't know how to use.

@alesmenzel
Copy link
Author

install the ffmpeg binary (https://ffmpeg.org/) and run it in cli, but note it takes a lot of time to convert, usually 2h of footage takes around 3hours to convert on a reasonably fast computer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment