Quick question, to know if I can disable the H.264 recording on my GoPro
Edit: Another quick question, in these settings on GoPro cams, what are the best when shotting photos/videos for Mapillary?
Sharpness : High, Medium, Low
Color: Native, GoPro
White balance: Native, Auto
Iβd suggest you stay with H.264. H.265/HEVC is a better CODEC only in the video sense. There is more interframe distortion evident when the videos are converted to images. ie the end images βlook gluggyβ similar to the degradation one gets from lowering JPG quality.
Having said that I did trial ffmpeg on both H.264 and H.265 BlackVue vids a few years ago. H.265 worked fine, but it used far more processing time (like >5x) to extract to the final JPGs. ffmpeg is used by the mapillary_tools CLI and I assume also by the Desktop Uploader so I suggest it would work.
In terms of the other settings, I would leave them at the defaults, but we havenβt done extensive testing to see if they make a difference (my hunch is that the difference would be minor).
Iβm guessing this would need support server side if only to convert them to jpeg.
Iβve been doing a little testing this afternoon and found out the following:
4MB JPEG converts to a 1.2MB HEIC with no visible loss of quality or extra jpeg like artifacts.
4075924 VID_20230731_150718_00_011_normal-000001.jpg
1153213 test.heic
I used the following command, which seems to copy all the exit info too:
heif-enc -q 35 VID_20230731_150718_00_011_normal-000001.jpg -o test.heic
I was hoping for a simple change to look for .heic files, but altering utils.py
./lib/python3.9/dist-packages/mapillary_tools/utils.py: return path.suffix.lower() in (β.jpgβ, β.jpegβ, β.tifβ, β.tiffβ, β.pgmβ, β.pnmβ, β.heicβ, β.heifβ)
I get the following:
# mapillary_tools process_and_upload tmp/
Extracting geotags from images: 0%| | 0/1 [00:00<?, ?images/s]2023-08-02 20:25:41,117 - WARNING - Unknown error reading EXIF from image tmp/VID_20230731_150718_00_011_normal-000001.heic
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/mapillary_tools/geotag/geotag_from_exif.py", line 32, in to_description
exif = ExifRead(image_path)
File "/usr/local/lib/python3.9/dist-packages/mapillary_tools/exif_read.py", line 123, in __init__
self.tags = exifread.process_file(fp, details=details, debug=True)
File "/usr/lib/python3/dist-packages/exifread/__init__.py", line 242, in process_file
offset, endian = heic.find_exif()
File "/usr/lib/python3/dist-packages/exifread/heic.py", line 255, in find_exif
assert self.get(exif_tiff_header_offset)[-6:] == b'Exif\x00\x00'
AssertionError
Extracting geotags from images: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1/1 [00:00<00:00, 950.01images/s]
Extracting GPS tracks from videos: 0videos [00:00, ?videos/s]
Verifying image EXIF writing: 0images [00:00, ?images/s]
2023-08-02 20:25:41,120 - INFO - 1 image(s) read in total
2023-08-02 20:25:41,120 - ERROR - 1 image(s) failed due to AssertionError
2023-08-02 20:25:41,120 - ERROR - MapillaryProcessError: Failed to process 1 files. To skip these errors, specify --skip_process_errors
Yes, I think thatβs right. Iβm mostly referring to action cameras, 360 cameras, dash-cameras because we donβt receive many images from iPhoneβs native camera - almost all iPhone images come from the Mapillary iOS app.
The image format HEIC is not supported yet. To upload HEIC photos, you can always export images as JPEGs or try some external tool converting them to JPEGs first.