Created
August 30, 2020 11:55
-
-
Save knishioka/1d1d959eaed4ce32531e164c7b42b3ac to your computer and use it in GitHub Desktop.
subtract 9hours from creation time
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
target_dir=creation_time_changed | |
mkdir "$target_dir" | |
for movie in *.MP4; do | |
creation_time=$(TZ=0 gdate -d "$(ffprobe -v quiet -select_streams v:0 -show_entries stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 $movie | sed 's/Z/+09:00/')" "+%Y-%m-%dT%T.000000Z") | |
ffmpeg -i $movie -metadata creation_time="$creation_time" -c copy "${target_dir}/${movie}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment