## gps-check on originals $ python3 -I gps-check.py files/0-clean-original.jpg files/0-clean-original.jpg: no GPS found exit=0 $ python3 -I gps-check.py files/1-gps-exif.jpg files/1-gps-exif.jpg: GPS FOUND, Exif GPS 44.1194, 15.2314 exit=1 $ python3 -I gps-check.py files/2-gps-xmp-only.jpg files/2-gps-xmp-only.jpg: GPS FOUND, XMP GPS 44,7.164N, 15,13.884E exit=1 $ python3 -I gps-check.py files/3-no-gps-camera-exif.jpg files/3-no-gps-camera-exif.jpg: no GPS found exit=0 $ python3 -I gps-check.py files/4-gps-then-resized.jpg files/4-gps-then-resized.jpg: no GPS found exit=0 $ python3 -I gps-check.py files/5-gps-exif.png files/5-gps-exif.png: GPS FOUND, Exif GPS 44.1194, 15.2314 exit=1 $ python3 -I gps-check.py files/6-gps-with-thumbnail.jpg files/6-gps-with-thumbnail.jpg: GPS FOUND, Exif GPS 44.1194, 15.2314 exit=1 ## gps-check on tool outputs $ python3 -I gps-check.py cleaned-fixed/0-clean-original-clean.jpg cleaned-fixed/0-clean-original-clean.jpg: no GPS found exit=0 $ python3 -I gps-check.py cleaned-fixed/1-gps-exif-clean.jpg cleaned-fixed/1-gps-exif-clean.jpg: no GPS found exit=0 $ python3 -I gps-check.py cleaned-fixed/2-gps-xmp-only-clean.jpg cleaned-fixed/2-gps-xmp-only-clean.jpg: no GPS found exit=0 $ python3 -I gps-check.py cleaned-fixed/3-no-gps-camera-exif-clean.jpg cleaned-fixed/3-no-gps-camera-exif-clean.jpg: no GPS found exit=0 $ python3 -I gps-check.py cleaned-fixed/4-gps-then-resized-clean.jpg cleaned-fixed/4-gps-then-resized-clean.jpg: no GPS found exit=0 $ python3 -I gps-check.py cleaned-fixed/5-gps-exif-clean.png cleaned-fixed/5-gps-exif-clean.png: no GPS found exit=0 $ python3 -I gps-check.py cleaned-fixed/6-gps-with-thumbnail-clean.jpg cleaned-fixed/6-gps-with-thumbnail-clean.jpg: no GPS found exit=0 ## ffprobe GPS tags (frame_tags) originals vs outputs files/0-clean-original.jpg: 0 files/1-gps-exif.jpg: 5 files/2-gps-xmp-only.jpg: 0 files/3-no-gps-camera-exif.jpg: 0 files/4-gps-then-resized.jpg: 0 files/6-gps-with-thumbnail.jpg: 5 cleaned-fixed/0-clean-original-clean.jpg: 0 cleaned-fixed/1-gps-exif-clean.jpg: 0 cleaned-fixed/2-gps-xmp-only-clean.jpg: 0 cleaned-fixed/3-no-gps-camera-exif-clean.jpg: 0 cleaned-fixed/4-gps-then-resized-clean.jpg: 0 cleaned-fixed/6-gps-with-thumbnail-clean.jpg: 0 ## pixel check (md5 of decoded frames) original vs cleaned 0-clean-original same 1-gps-exif same 2-gps-xmp-only same 3-no-gps-camera-exif same 4-gps-then-resized same 6-gps-with-thumbnail same 5-gps-exif.png same ## ffmpeg controls from file 1 $ ffmpeg -v error -y -i files/1-gps-exif.jpg -c copy ctl/copy.jpg exit=0 $ python3 -I gps-check.py ctl/copy.jpg ctl/copy.jpg: GPS FOUND, Exif GPS 44.1194, 15.2314 exit=1 $ ffmpeg -v error -y -i files/1-gps-exif.jpg -q:v 3 ctl/same-size-reencode.jpg exit=0 $ python3 -I gps-check.py ctl/same-size-reencode.jpg ctl/same-size-reencode.jpg: no GPS found exit=0 $ ffmpeg -v error -y -i files/1-gps-exif.jpg -vf scale=800:-2 -q:v 3 ctl/resize.jpg exit=0 $ python3 -I gps-check.py ctl/resize.jpg ctl/resize.jpg: no GPS found exit=0 $ ffmpeg -v error -y -i files/1-gps-exif.jpg -q:v 3 -map_metadata 0 ctl/same-size-reencode-mapmeta.jpg exit=0 $ python3 -I gps-check.py ctl/same-size-reencode-mapmeta.jpg ctl/same-size-reencode-mapmeta.jpg: no GPS found exit=0 $ ffmpeg -v error -y -i files/5-gps-exif.png -c copy ctl/copy.png exit=0 $ python3 -I gps-check.py ctl/copy.png ctl/copy.png: GPS FOUND, Exif GPS 44.1194, 15.2314 exit=1 $ ffmpeg -v error -y -i files/5-gps-exif.png ctl/reencoded.png exit=0 $ python3 -I gps-check.py ctl/reencoded.png ctl/reencoded.png: no GPS found exit=0 $ bash -c ffprobe -v error -show_frames -show_entries frame_tags -of default=nw=1 files/5-gps-exif.png | grep -ci gps 0 exit=1 ## gps-check edge cases $ python3 -I gps-check.py edge/missing.jpg edge/missing.jpg: cannot read ([Errno 2] No such file or directory: 'edge/missing.jpg') exit=2 $ python3 -I gps-check.py edge/empty.jpg edge/empty.jpg: cannot read (file is empty) exit=2 $ python3 -I gps-check.py edge/truncated.jpg edge/truncated.jpg: GPS FOUND, Exif GPS 44.1194, 15.2314 exit=1 $ python3 -I gps-check.py edge/фото ü 1.jpg edge/фото ü 1.jpg: GPS FOUND, Exif GPS 44.1194, 15.2314 exit=1 $ python3 -I gps-check.py edge/notimage.jpg edge/notimage.jpg: cannot read (not a JPEG, PNG or WebP file) exit=2 ## ffprobe on unreadable files (0 does not mean clean) $ bash -c ffprobe -v error -show_frames -show_entries frame_tags -of default=nw=1 edge/empty.jpg | grep -ci gps edge/empty.jpg: Invalid data found when processing input 0 exit=1 $ bash -c ffprobe -v error -show_frames -show_entries frame_tags -of default=nw=1 edge/missing.jpg | grep -ci gps edge/missing.jpg: No such file or directory 0 exit=1 ## summary (script summary.sh) gps-check: GPS found in 4 of 7 original files gps-check: GPS found in 0 of 7 tool outputs (fixed build) ffprobe: GPS tags shown for 2 of 7 original files tool old build said location found for 3 of 4 files that carry GPS; fixed build for 4 of 4