You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found there were differences in how metadata is shown, I looked into these files:
The timestamp lag for video is delayed 10 hours whereas image works fine do you know why this maybe the case? Has this been an issue before. At the moment I noticed there were differences in how the conversion happens in video vs image and thought whether there was reasons behind that.
Looking at time conversion for video and image I see that there are differences: it seems that both classes use different methods for extracting and converting datetime metadata from images and videos. The approach for datetime extraction and conversion is indeed different between the two classes.
In ImageMetadata, the datetime metadata is extracted using the ExifInterface class, and the datetime is converted using the getDateTimeInUTC function.
In VideoMetadata, the datetime metadata is extracted using metadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DATE), and then it goes through a custom formatting and conversion process using the getDateTimeInUTC function.
Could this be the reason I am experiencing a 10-hour time difference specifically for video timestamps.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I found there were differences in how metadata is shown, I looked into these files:
The timestamp lag for video is delayed 10 hours whereas image works fine do you know why this maybe the case? Has this been an issue before. At the moment I noticed there were differences in how the conversion happens in video vs image and thought whether there was reasons behind that.
Image-picker/utils
https://github.com/react-native-image-picker/react-native-image-picker/blob/main/android/src/main/java/com/imagepicker/Utils.java#L417
Image-picker/video-metadata.java
react-native-image-picker/android/src/main/java/com/imagepicker/VideoMetadata.java
Line 26 in f347c8b
Image-picker/metadata.java
react-native-image-picker/android/src/main/java/com/imagepicker/Metadata.java
Line 11 in f347c8b
Image-picker/ImageMetaData.java
react-native-image-picker/android/src/main/java/com/imagepicker/ImageMetadata.java
Line 24 in f347c8b
Looking at time conversion for video and image I see that there are differences: it seems that both classes use different methods for extracting and converting datetime metadata from images and videos. The approach for datetime extraction and conversion is indeed different between the two classes.
In ImageMetadata, the datetime metadata is extracted using the ExifInterface class, and the datetime is converted using the getDateTimeInUTC function.
In VideoMetadata, the datetime metadata is extracted using metadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DATE), and then it goes through a custom formatting and conversion process using the getDateTimeInUTC function.
Could this be the reason I am experiencing a 10-hour time difference specifically for video timestamps.
Beta Was this translation helpful? Give feedback.
All reactions