Last active
November 8, 2020 14:10
-
-
Save knishioka/6468b8648e152340d7a0d899c6a1450d to your computer and use it in GitHub Desktop.
Add datetime prefix to GoPro files
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
for file in GH*.MP4; do | |
new_file_name=$(date -j -f "%Y-%m-%dT%H:%M:%S.000000Z" "$(ffprobe -v quiet -select_streams v:0 -show_entries stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 $file)" "+%Y-%m-%d %H%M%S_$file") | |
cp "$file" "$new_file_name" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment