Converts Apple's photos to ultra HDR photos, keeping HDR effect and motion photo (live photo).
将苹果照片(heic+mov)转为 jpg 格式,保留 HDR 效果和动态照片效果。
Depends on several packages:
- libclang (compile time only)
- libheif
- libultrahdr -> libjpeg (dummy for libturbojpeg)
- libturbojpeg
- libffmpeg (LGPL)
See workflow file.
vcpkg and VS required.
See workflow file.
See workflow file.
Usage: aa-photo-bridge.exe [OPTIONS] --original <ORIGINAL> <PATH>
Arguments:
<PATH> Path to the directory containing images and videos to convert
Options:
-e, --exiftool <EXIFTOOL>
Path to the exiftool executable
-j, --parallel
Run in parallel mode
-o, --original <ORIGINAL>
What to do with the original files [possible values: keep, delete]
--image-extensions <IMAGE_EXTENSIONS>
Image extensions. Default: "heic,jpg,jpeg"
--video-extensions <VIDEO_EXTENSIONS>
Video extensions. Default: "mov,mp4"
-q, --image-quality <IMAGE_QUALITY>
Image quality. Default: 85 [default: 85]
-g, --gainmap-quality <GAINMAP_QUALITY>
Gainmap quality. Default: 85 [default: 85]
--strict
Strict mode: exit on multiple images / videos with same name
-v, --verbose
Print more detailed runtime information
-h, --help
Print help
aa-photo-bridge d:\tmp\iPhone -o delete -e 'c:\Program Files\exiftool\exiftool.exe' -j --strict
# i.e.,
aa-photo-bridge d:\tmp\iPhone --original delete --exiftool 'c:\Program Files\exiftool\exiftool.exe' -j --strict
- Some videos are internally marked with a "rotate" flag. Video players handle them correctly, but photo albums may not. In that case, I recommend use
scripts/preprocess-fix-rotations.py
and do a ffmpeg re-encode before converting. - Internet downloaded photo files may have wrong creation time / modification time. In that case, I recommend use
scripts/postprocess-set-file-times.py
which sets file ctime/mtime as photo time in exif if present. - Audio in motion photos does not work, at least on my Xiaomi phone. This is because Apple encodes audio in pcm_s16le, which is not widely supported.
- TODO: use ffmpeg-cli or libffmpeg to convert audio to aac / ac3.