#!/usr/bin/env bash find . -type d -exec bash -c ' count=0; for file in "$1"/*; do if [[ -f "$file" ]]; then if [[ "$file" =~ \.(mp4|mkv)$ ]]; then count=$((count + 1)); fi fi done if [ "$count" -gt 1 ]; then echo "$1"; fi ' sh '{}' \;