exif: prefer CreateDate for all videos

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-04-30 04:57:39 -07:00
parent 8c66a4afc6
commit c5deb0baa0
1 changed files with 2 additions and 3 deletions

View File

@ -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;
} }