No readable date/time information from camera trap videos

438 views
Skip to first unread message

Bazilah Razali

unread,
Jun 4, 2021, 10:44:31 AM6/4/21
to camtrapR
Hi Juergen,

This is my first time generate a species record table from camera trap videos through the drag and drop method. I followed the code from the manual and countered a warning of no readable date/time information. 

So, here is the code that I used:

> library(camtrapR)
This is camtrapR 2.0.3 (CURRENT)
> Sys.which("exiftool")   # this should return some path, e.g. "C:\\windows\\exiftool.exe"
                   exiftool 
"C:\\WINDOWS\\exiftool.exe" 
> wd <- "D:/video kuala lompat"
> setwd(wd)
> wd_rawVideos <- "D:/video kuala lompat/videoRAW"
> wd_identified_videos <- "D:/video kuala lompat/videoRAW"
> rec.table60_videos <- recordTable(inDir          = wd_identified_videos,
+                           IDfrom                 = "directory",
+                           minDeltaTime           = 60,
+                           deltaTimeComparedTo    = "lastRecord",
+                           timeZone               = "Asia/Kuala_Lumpur",
+                           video  = list(file_formats = c("jpg","avi"),
+   dateTimeTag  = "QuickTime:CreateDate"))
Warning: Beberas : omitting 216 images because of missing/unreadable date/time information.
Beberas     :     52 images    0 duplicates removed      |====                |   20%
Warning: Khamis : no readable date/time information. Skipping
Warning: Kongsi : no readable date/time information. Skipping
Warning: KPI : omitting 372 images because of missing/unreadable date/time information.
KPI         :     16 images    0 duplicates removed      |================    |   80%
Warning: Padang Dusun : no readable date/time information. Skipping

Is there something I am missing?

Thank you.

Regards,
Bazilah


Juergen Niedballa

unread,
Jun 12, 2021, 4:53:32 AM6/12/21
to camtrapR
Hi, 
did you check the name of the date/time tag in your videos with exifTagNames()? Maybe it's not  "QuickTime:CreateDate", but something else. It depends on the manufacturer, there are no fixed standards unfortunately. 
If you're uncertains feel free to share the output of exifTagNames().
Best,
Jürgen

Raquel Bone

unread,
Jun 12, 2021, 11:53:11 PM6/12/21
to Juergen Niedballa, camtrapR
Hello,

For AVI files this code has worked for me:

video = list(file_formats = c("jpg", "mov", "avi", "mp4"),
                                      dateTimeTag = "FileModifyDate",
                                      db_directory = "C:/Users/raque/Pictures",
                                      db_filename = "digikam4.db"))


For MOV and mp4:  dateTimeTag = "QuickTime:CreateDate"


I hope it helps,


Raquel


--
You received this message because you are subscribed to the Google Groups "camtrapR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camtrapr+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/camtrapr/8f437d0c-7b86-41ec-9917-2727d6618b55n%40googlegroups.com.

Juergen Niedballa

unread,
Jun 13, 2021, 5:47:55 AM6/13/21
to camtrapR
Hi Raquel, 
thank you for the information. For which camera models was that? 
I believe the date/time tag in videos also depends on the specific manufacturer and camera model, since there seem to be no fixed standards (in contrast to jpg images). 

The best way to check video and image metadata with camtrapR is the exifTagNames() function. Using the fileName argument one can return the metadata of a specific video file and find the suitable tag. Note that there is guarantee that date/time the video was taken is saved in the metadata at all. I've seen cases where no usable date/time was present in the metadata, which is very problematic

Best regards,
Jürgen

Raquel Bone

unread,
Jun 14, 2021, 12:53:03 AM6/14/21
to Juergen Niedballa, camtrapR
Hi Juergen,

I had the problem with an old Bushnell, Trophy Cam Essential, and a Browning Strike Force Pro, both of them with .avi video files. You suggested "FileModifyDate" and it worked. 

Now always checking this  exifTagNames()

Best regards,

Raquel


Juergen Niedballa

unread,
Jun 18, 2021, 11:15:58 AM6/18/21
to camtrapR
Thank you  Raquel. 
You are right, it is best to always check first with exifTagNames(), since different camera model  use different metadata for videos, and unfortunately there are no standards.
Normally I'd think that FileModifyDate is very fragile (may easily be overwritten when copying / modifying the file) and shouldn't be the first choice, but I'm glad it worked for you. 
Best,
Jürgen

Bazilah Razali

unread,
Jul 3, 2021, 10:26:17 AM7/3/21
to camtrapR
  Hi all,

Apologies for the delayed response. The answer for the question Juergen asked is no, I did not check the time tag with  exifTagNames() function as I usually used drag and drop method instead of metadata. So here is the output of the of exifTagNames():

> wd_rawVideos <- "D:/video kuala lompat/videoRAW"
> setwd(wd)
> exifTagNames(inDir = wd_rawVideos, returnMetadata = "DEPRECATED", returnTagGroup = "DEPRECATED")
Metadata of:
D:/video kuala lompat/videoRAW/Beberas/Unknown/PICT0001.JPG
    tag_group                tag_name
1    ExifTool         ExifToolVersion
2    ExifTool                 Warning
3        File                FileName
4        File               Directory
5        File                FileSize
6        File          FileModifyDate
7        File          FileAccessDate
8        File          FileCreateDate
9        File         FilePermissions
10       File                FileType
11       File       FileTypeExtension
12       File                MIMEType
13       File           ExifByteOrder
14       File       CurrentIPTCDigest
15       File              ImageWidth
16       File             ImageHeight
17       File         EncodingProcess
18       File           BitsPerSample
19       File         ColorComponents
20       File        YCbCrSubSampling
21       EXIF      ProcessingSoftware
22       EXIF        ImageDescription
23       EXIF                    Make
24       EXIF                   Model
25       EXIF             Orientation
26       EXIF             XResolution
27       EXIF             YResolution
28       EXIF          ResolutionUnit
29       EXIF                Software
30       EXIF              ModifyDate
31       EXIF        YCbCrPositioning
32       EXIF            ExposureTime
33       EXIF                 FNumber
34       EXIF         ExposureProgram
35       EXIF                     ISO
36       EXIF             ExifVersion
37       EXIF        DateTimeOriginal
38       EXIF              CreateDate
39       EXIF ComponentsConfiguration
40       EXIF       ShutterSpeedValue
41       EXIF           ApertureValue
42       EXIF         BrightnessValue
43       EXIF    ExposureCompensation
44       EXIF        MaxApertureValue
45       EXIF            MeteringMode
46       EXIF             LightSource
47       EXIF                   Flash
48       EXIF             FocalLength
49       EXIF             UserComment
50       EXIF         FlashpixVersion
51       EXIF              ColorSpace
52       EXIF          ExifImageWidth
53       EXIF         ExifImageHeight
54       EXIF            InteropIndex
55       EXIF          InteropVersion
56       EXIF           SensingMethod
57       EXIF              FileSource
58       EXIF          CustomRendered
59       EXIF            ExposureMode
60       EXIF            WhiteBalance
61       EXIF        SceneCaptureType
62       EXIF               Sharpness
63       EXIF             Compression
64       EXIF         ThumbnailOffset
65       EXIF         ThumbnailLength
66       EXIF          ThumbnailImage
67 MakerNotes            PreviewImage
68        XMP              XMPToolkit
69        XMP             CreatorTool
70        XMP              Categories
71        XMP              RegionList
72        XMP       RegionInfoRegions
73        XMP                TagsList
74        XMP          LastKeywordXMP
75        XMP     HierarchicalSubject
76        XMP             CatalogSets
77        XMP                 Subject
78       IPTC       CodedCharacterSet
79       IPTC      OriginatingProgram
80       IPTC          ProgramVersion
81       IPTC                Keywords
82  Composite                Aperture
83  Composite               ImageSize
84  Composite              Megapixels
85  Composite            ShutterSpeed
86  Composite        FocalLength35efl
87  Composite              LightValue
                                                                                                     value
1                                                                                                    11.24
2                                                     [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto
3                                                                                             PICT0001.JPG
4                                                           D:/video kuala lompat/videoRAW/Beberas/Unknown
5                                                                                                  1759 kB
6                                                                                2021:06:04 21:13:33+08:00
7                                                                                2021:07:03 21:33:10+08:00
8                                                                                2021:06:30 16:22:12+08:00
9                                                                                                rw-rw-rw-
10                                                                                                    JPEG
11                                                                                                     jpg
12                                                                                              image/jpeg
13                                                                               Little-endian (Intel, II)
14                                                                        b1e7accf9c0989e6e03a9f18cbf72511
15                                                                                                    2592
16                                                                                                    1944
17                                                                            Baseline DCT, Huffman coding
18                                                                                                       8
19                                                                                                       3
20                                                                                        YCbCr4:2:2 (2 1)
21                                                                                           digiKam-5.7.0
22                                                                                                        
23                                                                                                  BESTOK
24                                                                                                    8310
25                                                                                     Horizontal (normal)
26                                                                                                     180
27                                                                                                     180
28                                                                                                  inches
29                                                                                       DSP.8310.20150914
30                                                                                     2011:02:18 17:56:55
31                                                                                                Co-sited
32                                                                                                   1/100
33                                                                                                     2.8
34                                                                                              Program AE
35                                                                                                     100
36                                                                                                    0220
37                                                                                     2011:02:18 17:56:55
38                                                                                     2011:02:18 17:56:55
39                                                                                            Y, Cb, Cr, -
40                                                                                                    1/97
41                                                                                                     2.6
42                                                                                                       1
43                                                                                                       0
44                                                                                                     2.6
45                                                                                 Center-weighted average
46                                                                                                   Flash
47                                                                                             Auto, Fired
48                                                                                                  8.5 mm
49                                                                                                        
50                                                                                                    0100
51                                                                                                    sRGB
52                                                                                                    2592
53                                                                                                    1944
54                                                                             R98 - DCF basic file (sRGB)
55                                                                                                    0100
56                                                                                     One-chip color area
57                                                                                    Sigma Digital Camera
58                                                                                                  Normal
59                                                                                                    Auto
60                                                                                                    Auto
61                                                                                                Standard
62                                                                                                  Normal
63                                                                                        JPEG (old-style)
64                                                                                                   22186
65                                                                                                   10592
66                                                     (Binary data 10592 bytes, use -b option to extract)
67                                                     (Binary data 20090 bytes, use -b option to extract)
68                                                                                    XMP Core 4.4.0-Exiv2
69                                                                                           digiKam-5.7.0
70 <Categories><Category Assigned=0>Species<Category Assigned=1>Unknown</Category></Category></Categories>
71                                                                                                        
72                                                                                                        
73                                                                                         Species/Unknown
74                                                                                         Species/Unknown
75                                                                                         Species|Unknown
76                                                                                         Species|Unknown
77                                                                                                 Unknown
78                                                                                                    UTF8
79                                                                                                 digiKam
80                                                                                                   5.7.0
81                                                                                                 Unknown
82                                                                                                     2.8
83                                                                                               2592x1944
84                                                                                                     5.0
85                                                                                                   1/100
86                                                                                                  8.5 mm
87                                                                                                     9.6

As this is my first time using this function, I am not sure where to look for name of date/time tag. To Raque, thank you for the information. I'll keep that in mind.

Regards,
Bazilah


Juergen Niedballa

unread,
Jul 7, 2021, 10:06:11 AM7/7/21
to camtrapR
Hi Bazilah,
the metadata you shared are for a jpg image, at the top it says:
Metadata of:
D:/video kuala lompat/videoRAW/Beberas/Unknown/PICT0001.JPG

I would suggest you use the fileName argument: 
exifTagNames(fileName = "...")

Where you replace ... with the complete path of one of your video files, e.g.
exifTagNames(fileName = "D:/video kuala lompat/videoRAW/video1.avi")

Of course I'm making up the file name, so please adjust that. What you're looking for is an entry in the "value" column that contains the correct date of the video. 
When you run recordTable, you can then use it in the video argument as shown above, e.g. 

video = list(file_formats = c("jpg", "mov", "avi", "mp4"),
                                      dateTimeTag = "FileModifyDate",
                                      db_directory = "C:/Users/raque/Pictures",
                                      db_filename = "digikam4.db"))

So in Raquel's example, the entry of tag_name was FileModifyDate.  

Note that it is more reliable if you combine tag_group and tag_name (separated with a colon), as Raquel has shown above: 

For MOV and mp4:  dateTimeTag = "QuickTime:CreateDate"

This is because tags in different groups can have the same names. By specifying the tag_group we make sure R exiftool gets the right values.

Hope this helps. Let us know if it is unclear. 
Best regards,
Jürgen

Bazilah Razali

unread,
Jul 27, 2021, 4:57:57 AM7/27/21
to camtrapR
Hi Juergen,

Apologized again for the delayed response.  The suggestion you provided worked well for me and  I found that the dateTimeTag was FileModifyDate, same as Raquel. Thank you so much for your clear explanations on this issue.

Regards,
Bazilah
Reply all
Reply to author
Forward
0 new messages