Datasets:
shawshankvkt
commited on
Commit
•
bebba93
1
Parent(s):
9acfa75
Upload gdpr_blur_faces.sh
Browse files- gdpr_blur_faces.sh +25 -0
gdpr_blur_faces.sh
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Path to the deface executable
|
4 |
+
deface_cmd="deface"
|
5 |
+
|
6 |
+
# Directory containing the folders with videos
|
7 |
+
parent_dir="videos"
|
8 |
+
|
9 |
+
# Loop through each folder
|
10 |
+
for folder in "$parent_dir"/*; do
|
11 |
+
if [ -d "$folder" ]; then
|
12 |
+
# Get the video file in the folder
|
13 |
+
video_file=$(find "$folder" -maxdepth 1 -type f -name "*.mp4" -print -quit)
|
14 |
+
|
15 |
+
if [ -n "$video_file" ]; then
|
16 |
+
# Blur the video using deface
|
17 |
+
output_file="$folder/blurred_video.mp4"
|
18 |
+
$deface_cmd "$video_file" -o "$output_file"
|
19 |
+
|
20 |
+
echo "Video in $folder blurred and saved as blurred_video.mp4"
|
21 |
+
else
|
22 |
+
echo "No video file found in $folder"
|
23 |
+
fi
|
24 |
+
fi
|
25 |
+
done
|