We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6372bd7 commit 2d6e333Copy full SHA for 2d6e333
save.sh
@@ -91,7 +91,18 @@ function do_video () {
91
second=${encoded_time:4:2}
92
93
# Create a formatted timestamp
94
- creation_time="$year-$month-$day $hour:$minute:$second"
+ creation_time="$year-$month-${day}T$hour:$minute:$second"
95
+
96
+ # Set the creation_time attribute
97
+ ffmpeg -i "v" -metadata creation_time="$creation_time" -codec copy "${$FILE%.*}_new.${$FILE##*.}"
98
99
+ # Check if the command was successful
100
+ if [[ $? -eq 0 ]]; then
101
+ echo "creation_time has been set to $creation_time for $FILE"
102
+ mv "${FILE%.*}_new.${FILE##*.}" "$file_path"
103
+ else
104
+ echo "Failed to set creation_time for $FILE"
105
+ fi
106
fi
107
108
0 commit comments