[英]Batch copy metadata from one file to another (EXIFTOOL)
Im currently using tags such as exiftool -FileModifyDate(<)datetimeoriginal, etc. in terminal/cmd... 我目前在终端/ cmd中使用诸如exiftool -FileModifyDate(<)datetimeoriginal等标签。
Im switching from icloud and the dates in the metadata are exif (meaning finder and windows explorer just see the date they were downloaded).. 我从icloud切换,元数据中的日期是exif(意思是finder和Windows Explorer仅看到它们的下载日期)。
It's working but for any sloMo videos that are M4V, they dont change.. I have the originals which do have the right dates and was wondering if there is a way to match file names (123.mp4 = 123.m4v) and copy the metadata over... But I also want to do it in batches. 它可以正常工作,但是对于任何M4V的sloMo视频,它们都不会改变。。我有确实有正确日期的原件,并且想知道是否存在一种方法来匹配文件名(123.mp4 = 123.m4v)并复制元数据结束...但是我也想分批处理。 (since every month I will be offloading my iphone every month or so) Thanks!
(因为每个月以来,我都会每个月左右卸下iphone)谢谢!
It will depend upon your directory structure, but your command should be something like this: 这将取决于您的目录结构,但是您的命令应如下所示:
exiftool -TagsFromFile %d%f.mp4 "-FileModifyDate<datetimeoriginal" -ext m4v DIR
This assumes the m4v files are in the same directory as the mp4 files. 假设m4v文件与mp4文件位于同一目录中。 If not, change the
%d
to the directory path to the mp4 files. 如果不是,请将
%d
更改为mp4文件的目录路径。
Breakdown: 分解:
-TagsFromFile
: Instructs exiftool that it will be copying tags from one file to another. -TagsFromFile
:指示exiftool将标签从一个文件复制到另一个文件。
%d%f.mp4
: This is the source file for the copy. %d%f.mp4
:这是副本的源文件。 %d
is a exiftool variable for the directory of the current m4v file being processed. %d
是用于当前正在处理的m4v文件目录的exiftool变量。 %f
is the filename of the current m4v file being processed, not including the extension. %f
是当前正在处理的m4v文件的文件名,不包括扩展名。 The thing to remember is that you are processing m4v files that are in DIR
and this arguments tells exiftool how to find the source mp4 file for the tag copy. 要记住的是,您正在处理
DIR
m4v文件,并且此参数告诉exiftool如何找到标签副本的源mp4文件。 A common mistake is to think that exiftool is finding the source files (mp4 in this case) to copy to the target files (m4v) when exiftool is doing the reverse. 一个常见的错误是认为exiftool执行相反操作时,exiftool正在查找源文件(在这种情况下为mp4)复制到目标文件(m4v)。
"-FileModifyDate<datetimeoriginal"
: The tag copy operation you want to do. "-FileModifyDate<datetimeoriginal"
:要执行的标签复制操作。 Copies the DateTimeOriginal
tag in the file to the system FileModifyDate
. 将文件中的
DateTimeOriginal
标记复制到系统FileModifyDate
。
-ext m4v
: Process only m4v files. -ext m4v
:仅处理m4v文件。
Replace DIR
with the filenames/directory paths you want to process. 将
DIR
替换为要处理的文件名/目录路径。 Add -r
to recurse into sub-directories. 添加
-r
递归到子目录。 If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation. 如果此命令在Unix / Mac下运行,请对任何双引号/单引号进行反向操作,以避免bash解释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.