Last active
June 18, 2021 01:50
-
-
Save musan6363/5e208e4190b6464ce623a76f6fd3a48d to your computer and use it in GitHub Desktop.
OpenFaceで失敗した動画のリストを作る
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 | |
# 全てのファイルのエラー出力をまとめる | |
############################################################ | |
# 実行方法 | |
# sh make_killed_txt.sh <OpenFaceの出力フォルダがある位置> <元動画の位置> | |
# 例 | |
# sh make_killed_txt.sh ~/Documents/OpenFace/mount | |
############################################################ | |
target=$1 | |
videopath=$2 | |
flag=0 | |
# すでに書き出し先のファイルが有れば消す. | |
if [ -e killed.txt ]; then | |
rm -rf killed.txt | |
fi | |
for folder in $(find ${target} -name "id*" -type d -maxdepth 1); do | |
# 失敗した動画のリストを作成 | |
if [ -s ${folder}/error.txt ]; then | |
echo "$2/${folder##*/}.mov" | |
echo "$2/${folder##*/}.mov" >> killed.txt | |
flag=1 | |
fi | |
done | |
echo "ERROR FLAG ${flag} (0:NO ERROR, 1:FOUND ERROR)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment