![]() Output = subprocess. One solution is to make a subprocess call to exiftool and parse the result: EXIFTOOL_DATE_TAG_VIDEOS = "Create Date" I suppose exifread was built for photos, as the code below shows an empty list of tags for this video: import exifread The same camera takes videos with extension. You can also read useful things from avi video files such as framerate, video codes, resolution, color depth, compression algorithm, audio sampling rate, audio coding, number of audio channels, etc.I use exifread (installed with python3 -m pip install exifread) to read EXIF tags from photos. Gzip compression may include other fields. There are useful things in it, such as the uncompressed size of the content, which can be useful if you want to use a script to calculate the uncompressed size of zip files in a directory. Zip File Name : exiftool-gps-adatok-kiolvasasa.png In the following example, one member of one jpg file is uploaded with a value and copied to another jpg file:įinally, by listing all the metadata of the target file, the value set in the other field in the Description field will be displayed, as well as the change timestamps for the file to the current one.įile Modification Date/Time : 2019:06:07 14:46:50+02:00įile Access Date/Time : 2019:06:07 14:46:50+02:00įile Inode Change Date/Time : 2019:06:07 14:47:01+02:00 For multiple files, overwrites the same data in each. target file: You must specify at least one file where you enter the appropriate metadata.Of course, the source and destination data formats must match. > target member: If the source member is specified, here - also optionally - you can specify in which tag file or group to save the data read from the source.If specified, only the specified member or group (eg EXIF, IPTC, XMP, GPS, etc.) will be copied. -tagsFromFile: You will then need to specify the source file to which you want to copy the metadata.It has the following syntax: exiftool -tagsFromFile. You can also use the exiftool command to copy metadata from one file to another file, or to multiple files. The difference is that subtraction with the exact value can be used for conditional deletion, for example in an automation script, where we delete only the value (s) that exactly match the one we specified, or delete it only if the specified value. Where nothing is given after the equal sign. In essence, we could have used the following command instead: exiftool -Description-= proba_php.jpg Finally, by specifying the exact value, we succeed in deleting the tag value. Then we try to take another value from it, which fails. In this example, we first give a text value to a tag and then check it back. Groups work the same way as when you add them, they are optional.Įxample of deleting a value field by specifying the exact value: Delete the value of a member if the exact value is specified.Decrease date / time type values (eg time stamps).I did not intentionally use the name subtraction here because this function cannot be used to extract general numeric values of meta tags, but can be used for: If you do not specify a group name and the member exists in more than one group, it will update the tag with the given field name in each group. May 13, 2021, 02:05:46 PM The -x ( -exclude) option is for excluding a tag from the output when displaying data. The group can be, for example, EXIF, IPTC, XMP, etc. The syntax is as follows: exiftool -Mezőnév+= This option is mainly used for extracting embedded images or other binary data, but it may also be useful for some text strings since control characters (such as newlines) are not replaced by '.' as they are in the default output. Increase the value of numeric type tags Use -b: exiftool -b -make x.jpg From the man page:-b (-binary) Output requested metadata in binary format without tag names or descriptions.Increase date / time type values (eg time stamps). ![]() The add function allows you to do the following: Same with one specific example: exiftool -Headline="Kép címe" proba_php.jpgĪnd the result is shown in the following pictures, where there was no "Headline" tag in the image file before: In this case, you simply enter a value for the tag you want with an equal sign: exiftool -Mezőnév= There are several ways to do the writing operation, depending on what you want to accomplish: assignment Writing metadata is done with the exiftool command in the same way as reading, except that the tags need to be given their own value. On this page, we will expand our knowledge with the write and copy operations of the metadata program, and we will try the command with other file formats through even more quick examples. Az on the first page we got to know that exiftool command and its basic reading capabilities.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |