exif: prefer CreateDate for all videos
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
8c66a4afc6
commit
c5deb0baa0
|
@ -120,9 +120,8 @@ class Exif
|
||||||
// Get date from exif
|
// Get date from exif
|
||||||
$exifDate = $exif['DateTimeOriginal'] ?? $exif['CreateDate'] ?? null;
|
$exifDate = $exif['DateTimeOriginal'] ?? $exif['CreateDate'] ?? null;
|
||||||
|
|
||||||
// For MOV, the timezone of DateTimeOriginal is wrong because it's a string tag
|
// For videos, prefer CreateDate for timezone (QuickTimeUTC=1)
|
||||||
// Note that we're passing "-api QuickTimeUTC=1" to exiftool
|
if (preg_match('/^video\/\w+/', (string) $exif['MIMEType'])) {
|
||||||
if ('video/quicktime' === $exif['MIMEType']) {
|
|
||||||
$exifDate = $exif['CreateDate'] ?? $exifDate;
|
$exifDate = $exif['CreateDate'] ?? $exifDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue