3 file_pattern='^.*\.(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|ogv|webm|iso|rmvb)$'
4 meta="${dir}/.index/meta"
11 | mplayer -input nodefault-bindings -nosound -vo null -identify -frames 0 "$video" 2>&- \
13 s:ID_LENGTH=(.*)(\..*)$:\1:p;
14 s:ID_VIDEO_HEIGHT=(.*):\1:p;
15 s:ID_VIDEO_WIDTH=(.*):\1:p;' \
19 printf '%i\t%i\t%i\ttags=\tcomment=\t%s\n' \
20 "$l" "$w" "$h" "${video##*/}"
24 if [ \! -f "$meta" ]; then
25 find "$dir" -type f -mindepth 1 -maxdepth 1 \
26 | grep -E "$file_pattern" \
27 | while v="$(line)"; do
31 find "$dir" -type f -mindepth 1 -maxdepth 1 \
32 | grep -E "$file_pattern" \
33 | while v="$(line)"; do
34 if [ "$v" -nt "$meta" ]; then
35 grep -qF " ${v}" "$meta" \