Hello,
I have been a long time user of ExifTool and have recently switched over to using ExifTool in R using exifr::read_exif. I have used the following code to extract EXIF data from SONY m2ts/MTS, but the new Sony 4K .MP4 files don't work. Examining the output of all EXIF tags, I see the error: End of processing at large atom (LargeFileSupport not enabled)
I can only seem to find reference to how to fix this in CommandPrompt, not R, "adding -api largefilesupport=1 to your command", https://exiftool.org/forum/index.php?topic=9845.0.
How can this same command be implemented in R::exifr?
Example R code;
#Set Video File Location
survey.videos <- "Video_for_Analysis/EOD_2019/" #Folder with videos
#Get EXIF information
files2 <- list.files(survey.videos, pattern = NULL, recursive = FALSE, full.names = TRUE)
dat <- read_exif(files2, tags=c("directory", "filename", "DateTimeOriginal",
"Duration"))
Unfortunately the .MP4 videos in question are far too big to upload.
Many thanks in advance.
Jock
See this post (https://exiftool.org/forum/index.php?topic=3916.msg57789#msg57789).
Thank you :)
It worked, sort of.
But.....
after editing the config file ExifTool_config (attached) and placing it into the R::exifr library directory eg: C:\Users\Jock\Documents\R\win-library\3.6\exifr\exiftool where exiftool.pl is located,
I can see the Duration tag, but not other tags like DateTimeOriginal. Although there is a tag CreationDateValue for MP4 - seems odd that these would be named differently.
I have attached a csv output of "dat" with tags for a combination of MTS, m2ts and MP4 video after using the following:
#Set File Locations
survey.videos <- "Video_for_Analysis/EOD_2019/" #Folder with videos
#Get EXIF information
files2 <- list.files(survey.videos, pattern = NULL, recursive = FALSE, full.names = TRUE)
dat <- read_exif(files2)
Any suggestions? Or do I just need to work around this in R to extract the Video date and start times when using a combination of video file types, which is easy enough to do?
Quote from: MangroveWatch on February 20, 2020, 08:49:06 PM
I can see the Duration tag, but not other tags like DateTimeOriginal. Although there is a tag CreationDateValue for MP4 - seems odd that these would be named differently.
Do you see a
DateTimeOriginal when you check the file with exiftool on the command line?
Usually,
DateTimeOriginal is an EXIF tag and there is no standard for putting EXIF metadata in a video file. Though that doesn't stop some companies from cramming it in there. There is a
Quicktime:DateTimeOriginal tag, but I don't think I've ever seen it used.
If I recall correctly, mts type files don't allow for any embedded metadata. Exiftool just returns the various properties of the file.
Quote from: StarGeek on February 20, 2020, 09:37:16 PM
Do you see a DateTimeOriginal when you check the file with exiftool on the command line?
No
DateTimeOriginal data is available from CMD prompt either:
exiftool.pl -directory -filename -DateTimeOriginal -Duration -T -r -n
See attached .txt file output.
Usually MP4 files do not contain DateTimeOriginal. For these files use CreateDate instead.
- Phil