일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- 우분투 npm 설치
- virsualhost
- SSL
- 정부 서비스 가이드라인
- 페이지전환효과
- 보안인증서
- 리사이즈
- Vanilla JS
- JS
- 애니메이트
- 글자 수 제한
- JavaScript
- 자바스크립트
- 비동기호출
- 배열
- 301 리다이렉트
- 정규식
- 디지털 정부서비스ui/ux
- 구글뷰어
- .htaccess
- 우분투
- 글자수제한
- Ajax
- selinux
- iframe
- 날짜변환
- ip직접접근차단
- 날짜비교
- MySQL
- post_type
- Today
- Total
더 나은 프로그래머가 되자
구글포토백업파일 exiftool를 이용해서 메타데이터 수정하기(촬영일 수정) 본문
구글포토 내보내기로 백업파일 받을 경우 pc에서는 사진파일의 생성일 수정일이 백업한 날짜로되어있다.
다른 클라우드로 옮길경우 백업 날짜 기준으로 올라가니 이를 수정해줄 필요가있다.
구글포토 백업은 json 파일에 해당 메타데이터들이 저장되는데 exiftool를 이용해서 json 데이터를 사진 데이터에 맵핑시킬 수 있다.
프로그램 다운로드 : https://exiftool.org/
윈도우 cmd 창을 열고 exiftool.exe 가 위치한 디렉토리로 이동한다.
해당 위치에서 아래의 명령어를 실행한다.
GPS 태그 복사
exiftool -tagsfromfile '%d/%F.json' '-GPSAltitude<GeoDataAltitude' '-GPSLatitude<GeoDataLatitude' '-GPSLatitudeRef<GeoDataLatitude' '-GPSLongitude<GeoDataLongitude' '-GPSLongitudeRef<GeoDataLongitude' 디렉토리나파일명
키워드 복사:
exiftool -tagsfromfile '%d/%F.json' '-Keywords<Tags' '-Subject<Tags' 디렉토리나파일명
설명 복사:
exiftool -tagsfromfile '%d/%F.json' '-Caption-Abstract<Description' '-ImageDescription<Description' -Description 디렉토리나파일명
JSON의 모든 데이터를 파일로 복사하여 원본 파일 수정
exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext jpg -overwrite_original 디렉토리나파일명
위 명령어로 json데이터를 사진파일에 맵핑시켰다면 사진파일의 exif 정보를 토대로 사진파일의 수정일을 실제 촬영일로 변경해준다
exiftool "-FileCreateDate<$EXIF:DateTimeOriginal" "-FileModifyDate<$EXIF:DateTimeOriginal" "사진이 있는 폴더" -r
동영상의 경우 EXIF 정보가 아니여서 변경이 안될 수 있다 그럴경우
exiftool "-FileCreateDate<CreateDate" "-FileModifyDate<ModifyDate" "동영상 있는 폴더" -r
'기타' 카테고리의 다른 글
공유프린터 0x0000011b 연결 오류 문제 (0) | 2022.11.02 |
---|---|
GTM 트리거 조건에 Query String 포함될때 (0) | 2022.09.21 |
윈도우10 정품인증 (0) | 2020.09.07 |
무료 바코드생성 사이트 (0) | 2020.07.07 |
알리익스프레스 구매 방법 (0) | 2017.06.02 |