From 6e7483ad625b5539bd0f98e12902abacb2368875 Mon Sep 17 00:00:00 2001 From: FallingSnow Date: Sun, 29 Mar 2015 10:50:48 -0700 Subject: [PATCH] Version Bump to 0.1.2. Inverted -a option -a option is now inverted, so adding it will now create accurate timestamps Fixed some spelling errors --- README.md | 6 +++--- h265ize | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 96e1bef..eb364a9 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ For more information visit [ayrton.sparling.us](https://ayrton.sparling.us/index - Preserves audio codecs (if not possible; falls back to ac3 audio, this hasn't happened to me yet, I think you would have to use a really strange audio codec) - Preserves audio track titles - Preserves flac audio sample rate and bit depth (currently supports 44.1khz/16bit and 96khz/24bit, 24bit is popular in high quality anime) -- Detects and perserves all subtitles +- Detects and preserves all subtitles - Detects audio language, if audio language is not your native language and native language subtitles are provided, makes those subtitle default - Automatically searches for foreign segments subtitles - Detects bit depth and uses appropriate encoder profile (10-bit is common in high quality anime, supports 8-bit and 10-bit) - Verbose and preview mode -- File override detection (doesn't accidently write over a file that already exists, other than in preview mode) +- File override detection (doesn't accidentally write over a file that already exists, other than in preview mode) - Detects if file is already encoded in x265 and skips it - Faulty encoding detection based on before and after video durations - Maintains file structure in output folder (So in theory you could just take your 3tb movie folder and throw it into the script and the output folder should look that same but with x265 videos) @@ -31,7 +31,7 @@ For more information visit [ayrton.sparling.us](https://ayrton.sparling.us/index >-n :Your native language; Examples: eng, fre, spa, dut; default: eng ->-a :Auto timestamp resolution (may cause video seek problems but decreases size) +>-a :Accurate timestamps (fixes seek times jumping all over the place but substantially increases size) >-t :Temporary name of the new unfinished file diff --git a/h265ize b/h265ize index 9e5650c..2adadae 100644 --- a/h265ize +++ b/h265ize @@ -7,7 +7,7 @@ defaults+=([destination]="$HOME/h265") # (NO TRAILING SLASH) Folder to output fi defaults+=([quality]=19) # 0-51; default: 19 defaults+=([preset]="fast") # x265 encoder preset; Options: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo; default: fast defaults+=([nativeLangCode]="eng") # Examples: eng, fre, spa, dut, et cetera; default: eng -defaults+=([autoTimestampResolution]=0) # Auto timestamp resolution (may cause video seek problems but decreases size); default: 0 +defaults+=([accurateTimestamps]=0) # Accurate Timestamps (substantially increases file size but sometimes fixes timestamps); default: 0 defaults+=([tempName]="encoding-in-process") # Temporary name of the new unfinished file; default: encoding-in-process defaults+=([outputFormat]="mkv") # Container format to output; Options: mkv, mp4, m4v; default: mkv; NOTE: If you use mp4 and intend to encode to larger than 4GB, you must add the --large-file option to the QUERY variable. defaults+=([tempDir]="$HOME/h265") # (NO TRAILING SLASH) Directory where new unfinished file is stored; default: $HOME/h265 @@ -21,6 +21,7 @@ defaults+=([override]=0) # Override Mode; default: 0 # DO NOT TOUCH BELOW THIS LINE UNLESS YOU KNOW BASH ################################################################################ +################################################################################ # Colors green='\033[0;32m' @@ -32,13 +33,13 @@ NC='\033[0m' # No Color package="h265ize" description="Convert videos into x265 videos." -version="0.1.1" +version="0.1.2" commandDesciptions=" -d :(NO TRAILING SLASH) Folder to output files to; default: $HOME/h265 -q :0-51; default: 19 -m :x265 encoder preset; Options: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo; default: fast -n :Your native language; Examples: eng, fre, spa, dut; default: eng - -a :Auto timestamp resolution (may cause video seek problems but decreases size) + -a :Accurate Timestamps (substantially increases file size but sometimes fixes timestamps) -t :Temporary name of the new unfinished file -f :Container format to output; Options: mkv, mp4, m4v; default: mkv; NOTE: If you use mp4 and intend to encode to larger than 4GB, you must add the --large-file option to the QUERY variable. -g :(NO TRAILING SLASH) Directory where new unfinished file is stored @@ -96,8 +97,8 @@ while getopts :d:q:m:n:t:f:g:l:x:vphao o; do options+=([nativeLangCode]=${OPTARG}) ;; a) - unset options[autoTimestampResolution] - options+=([autoTimestampResolution]=1) + unset options[accurateTimestamps] + options+=([accurateTimestamps]=1) ;; t) options+=([tempName]=${OPTARG}) @@ -408,7 +409,7 @@ while read -r FILE; do tempVars+=([profile]="main") fi - if [ ${options[autoTimestampResolution]} -eq 0 ]; then + if [ ${options[accurateTimestamps]} -eq 1 ]; then tempVars+=([extraOptions]="-x keyint=${tempVars[keyInt]}:${options[extraOptions]}") elif [ -n "${options[extraOptions]}" ]; then tempVars+=([extraOptions]="-x ${options[extraOptions]}")