[READ-ONLY] Mirror of https://github.com/probablykasper/to. CLI audio, video and image file converter
aiff audio cli flac gif image jp2 jpg mov mp3 mp4 ogg png video webm webp
0

Configure Feed

Select the types of activity you want to include in your feed.

Add opus:#

+14 -7
+2
CHANGELOG.md
··· 1 1 ## Next 2 2 - Remove jp2 3 + - Remove ogg 4 + - Add opus with custom quality support 3 5 4 6 ## 1.4.0 - 2021 Nov 19 5 7 - Change image quality default from 95 to 90
+1 -1
README.md
··· 37 37 mp3 320kbps. Custom bitrate example: mp3:128 38 38 flac 39 39 aiff 40 - ogg 40 + opus 256kbps. Custom bitrate example: opus:128 41 41 42 42 Image formats: 43 43 jpg 90 quality. Custom quality example: jpg:75 (0-100)
+11 -6
bin/to
··· 39 39 `cyan mp3` 320kbps. Custom bitrate example: `cyan mp3:128` 40 40 `cyan flac` 41 41 `cyan aiff` 42 - `cyan opus` 42 + `cyan opus` 256kbps. Custom bitrate example: `cyan opus:128` 43 43 44 44 `green Image formats:` 45 45 `cyan jpg` 90 quality. Custom quality example: `cyan jpg:75` (0-100) ··· 116 116 117 117 # format 118 118 case "$FORMAT" in 119 - mov|webm|wav|flac|aiff|opus) 119 + mov|webm|wav|flac|aiff) 120 120 ;; 121 121 mp4|mp4-h264|mp4-h265) 122 122 if [[ $FORMAT == "mp4-h265" ]]; then ··· 133 133 OPTIONS+=("-b:a" "256k") 134 134 OPTIONS+=("-preset" "medium") 135 135 ;; 136 + opus) 137 + if [[ $AUDIO_BITRATE_CHANGED != true ]]; then 138 + OPTIONS+=("-b:a" "256k") 139 + fi 140 + ;; 136 141 mp3) 137 142 if [[ $AUDIO_BITRATE_CHANGED != true ]]; then 138 143 OPTIONS+=("-b:a" "320k") 139 144 fi 140 145 ;; 141 - mp3:*) 142 - MP3_REGEX="^(mp3)(:|-|\/)([0-9]{1,3})(k|kbps)?$" 143 - if [[ "$FORMAT" =~ $MP3_REGEX ]]; then 146 + mp3:*|opus:*) 147 + REGEX="^(mp3|opus)(:|-|\/)([0-9]{1,3})(k|kbps)?$" 148 + if [[ "$FORMAT" =~ $REGEX ]]; then 144 149 FORMAT="${BASH_REMATCH[1]}" 145 150 if [[ $AUDIO_BITRATE_CHANGED != true ]]; then 146 - OPTIONS+=("-b:a", "${BASH_REMATCH[3]}k") 151 + OPTIONS+=("-b:a" "${BASH_REMATCH[3]}k") 147 152 fi 148 153 else 149 154 INVALID_FORMAT=true