f2
f2 copied to clipboard
Passing options to ExifTool
I tried using f2 -f '.*.mp4' -r '{{xt.MediaCreateDate}}{{ext}}' -f ':' -r '-' -f ' ' -r '_'
to process my video files but one of the files apparently had no MediaCreateDate
set.
Manually inspecting the file using exiftool
yielded
❯ exiftool 2022-04-24/2022-04-24-12-31-09-0000531.mp4
ExifTool Version Number : 11.88
File Name : 2022-04-24-12-31-09-0000531.mp4
Directory : 2022-04-24
File Size : 2.4 GB
File Modification Date/Time : 2022:10:24 02:40:46+02:00
File Access Date/Time : 2022:10:24 18:46:02+02:00
File Inode Change Date/Time : 2022:10:24 18:43:11+02:00
File Permissions : rwxrwxrwx
File Type : MP4
File Type Extension : mp4
MIME Type : video/mp4
Major Brand : MP4 Base Media v1 [IS0 14496-12:2003]
Minor Version : 2.0.0
Compatible Brands : isom, iso2, mp41
Warning : End of processing at large atom (LargeFileSupport not enabled)
Turns out, you can enable it by addding -api LargeFileSupport=1
to the command line:
❯ exiftool -api LargeFileSupport=1 2022-04-24/2022-04-24-12-31-09-0000531.mp4
Media Create Date : 2022:04:24 10:31:09
Media Modify Date : 2022:04:24 10:31:09
Can we make this LargeFileSupport an optional flag or something?
Interesting...
What version of Exiftool are you using? It works for me without the LargeFileSupport
option and the file I used is 4 GB.
Anyway, to your point...I can provide a F2_EXIFTOOL_CMD
that you can set in the environment to override the default.
How does that sound?
@ayoisaiah My exiftool is 12.40
. Do you have ~/.ExifTool_config
file? As far as I am concerned, this is disabled by default unless you enable it via -api
flag or via the config file.
That said F2_EXIFTOOL_CMD
would be the best way out of this since Exiftool might introduce some other options in the future :)
@Quintasan No, I don't have that config file so perhaps it is a difference between the versions.
Btw, the F2_EXIFTOOL_CMD
solution is not going to work as I forgot that I wasn't running the command directly. Will explore other options
@Quintasan Fixed by #66
You will be able to configure Exiftool like this in the next release:
f2 --exiftool-opts '--api LargeFileSupport=1' ...