This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o nounset | |
directory_original=./keep/conv35veryslow | |
for filepath in ${directory_original}/*; do | |
# echo $filepath | |
if (echo $filepath | grep -P 'VID_20\d{6}_\d{6}[^\d]' > /dev/null); then | |
# echo "FORMAT1 VID_YYYYMMDD_hhmmss" | |
partial_filename=$(echo -n $filepath | sed 's#.*VID_##g') | |
YYYY="${partial_filename:0:4}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
encoder=libx265 | |
crf_value=35 | |
preset_value="medium" | |
directory_original=./keep | |
directory_new="$directory_original/conv$crf_value$preset_value" | |
for filepath in ${directory_original}/*; do | |
if [ ! -d "$filepath" ]; then #exclude directories | |
filename_with_extension="${filepath##*/}" | |
filename_no_extension="${filename_with_extension%.*}" |