Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 thoughts on “Change date in GoPro media (photos/video/low quality videos/still frames) files

  • Michaël Lammers

    Thanks for this! I’m on a Mac so this doesn’t work for me, but with minimum coding experience and friend google I managed to get this tweaked a bit for Mac-users to work.

    #!/bin/bash
    # based on https://bytefreaks.net/gnulinux/change-date-in-gopro-media-photos-video-low-quality-videos-still-frames-files, altered for mac
    # example use: sh ./mediaDates.sh ‘/run/media/100GOPRO’ ‘+44639M’

    directory=”$1″;
    echo “Processing ‘$directory'”;
    date_change=”$2″;
    echo “Change ‘$date_change'”;

    cd “$directory”

    for f in *.{MP4,LRV,JPG};
    do \
    image=”$f”;
    echo “$image “;
    old_date=`exiftool -d “%a %b %d %T %Z %Y” -CreateDate -S -s “$image”`;
    echo “\t$old_date”;
    new_date=`date -j -v “$date_change” -f “%a %b %d %T %Z %Y” “$old_date” “+%Y:%m:%d %H:%M:%S %Z”`;
    echo “\t$new_date”;
    exiftool “-AllDates=$new_date” “-TrackCreateDate=$new_date” “-TrackModifyDate=$new_date” “-MediaCreateDate=$new_date” “-MediaModifyDate=$new_date” -overwrite_original “$image”;
    done