Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Commit

Permalink
Version Bump to 0.1.2. Inverted -a option
Browse files Browse the repository at this point in the history
-a option is now inverted, so adding it will now create accurate
timestamps
Fixed some spelling errors
  • Loading branch information
FallingSnow committed Mar 29, 2015
1 parent 53c3513 commit 6e7483a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
13 changes: 7 additions & 6 deletions h265ize
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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})
Expand Down Expand Up @@ -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]}")
Expand Down

0 comments on commit 6e7483a

Please sign in to comment.