-
ExifTool/사진과 동영상의 Exif 정보 처리코딩 2024. 1. 23. 17:03728x90
사용법
사용법은 아주 간단하다. Exif 정보를 읽을 때는 '-TAG'를 붙이고, 쓸 때는 '-TAG=Value' 형식으로 입력하면 된다.
Reading exiftool [OPTIONS] [-TAG...] [--TAG...] FILE... Writing exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE... Copying exiftool [OPTIONS] -tagsFromFile SRCFILE [-[DSTTAG<]SRCTAG...] FILE... Other exiftool [ -ver | -list[w|f|r|wf|g[NUM]|d|x] ]
폴더 내의 Exif 정보를 CSV로 저장
exiftool -a -G1 -csv -T /yourpath > /yourpath/output.csv
CSV로 저장된 Exif 정보를 원본 파일에 덮어쓰기
exiftool -csv=/yourpath/movies.csv -overwrite_original /yourpath
파일의 Exif 정보와 몇가지 System 변수 변경
# GPS 수정 exiftool -GPSCoordinates="50 deg 5' 2.40"" N, 228 deg 54' 41.40"" E, \ 9.292 m Above Sea Level" /yourpath/230312-145559.MOV # 파일 수정일 변경 exiftool -FileModifyDate="2021:01:20 12:00:00" /yourpath/IMG_3407.MOV
POSIX(Mac OS)에서는 ExifTool로는 파일생성일 변경이 불가하다. 파일생성일은 SetFile로 수정 가능하다.
Python/Mac/POSIX/SetFile로 파일 생성일 변경
파일의 Exif 정보를 삭제
exiftool -all= /yourpath/20230806_153949.jpeg
이미지와 동영상의 Exif tag
Apple:AccelerationVector Apple:AEAverage Apple:AEStable Apple:AETarget Apple:AFStable Apple:FocusDistanceRange Apple:FocusPosition Apple:HDRHeadroom Apple:ImageCaptureType Apple:LivePhotoVideoIndex Apple:MakerNoteVersion Apple:PhotoIdentifier Apple:RunTimeEpoch Apple:RunTimeFlags Apple:RunTimeScale Apple:RunTimeValue Apple:SignalToNoiseRatio Composite:Aperture Composite:AvgBitrate Composite:CircleOfConfusion Composite:DateTimeCreated Composite:DigitalCreationDateTime Composite:FocalLength35efl Composite:FOV Composite:GPSAltitude Composite:GPSAltitudeRef Composite:GPSLatitude Composite:GPSLongitude Composite:GPSPosition Composite:HyperfocalDistance Composite:ImageSize Composite:LensID Composite:LightValue Composite:Megapixels Composite:Rotation Composite:RunTimeSincePowerUp Composite:ScaleFactor35efl Composite:ShutterSpeed Composite:SubSecCreateDate Composite:SubSecDateTimeOriginal Composite:SubSecModifyDate ExifIFD:ApertureValue ExifIFD:BrightnessValue ExifIFD:ColorSpace ExifIFD:ComponentsConfiguration ExifIFD:CompositeImage ExifIFD:CreateDate ExifIFD:DateTimeOriginal ExifIFD:DigitalZoomRatio ExifIFD:ExifImageHeight ExifIFD:ExifImageWidth ExifIFD:ExifVersion ExifIFD:ExposureCompensation ExifIFD:ExposureMode ExifIFD:ExposureProgram ExifIFD:ExposureTime ExifIFD:Flash ExifIFD:FlashpixVersion ExifIFD:FNumber ExifIFD:FocalLength ExifIFD:FocalLengthIn35mmFormat ExifIFD:ISO ExifIFD:LensInfo ExifIFD:LensMake ExifIFD:LensModel ExifIFD:MeteringMode ExifIFD:OffsetTime ExifIFD:OffsetTimeDigitized ExifIFD:OffsetTimeOriginal ExifIFD:SceneCaptureType ExifIFD:SceneType ExifIFD:SensingMethod ExifIFD:ShutterSpeedValue ExifIFD:SubjectArea ExifIFD:SubSecTime ExifIFD:SubSecTimeDigitized ExifIFD:SubSecTimeOriginal ExifIFD:WhiteBalance ExifTool:ExifToolVersion File:BitsPerSample File:ColorComponents File:CurrentIPTCDigest File:EncodingProcess File:ExifByteOrder File:FileType File:FileTypeExtension File:ImageHeight File:ImageWidth File:MIMEType File:YCbCrSubSampling GoPro:AudioSetting GoPro:AutoISOMax GoPro:AutoISOMin GoPro:AutoRotation GoPro:CameraSerialNumber GoPro:ColorMode GoPro:DeviceName GoPro:DigitalZoom GoPro:ElectronicImageStabilization GoPro:ExposureCompensation GoPro:FieldOfView GoPro:FirmwareVersion GoPro:MaximumShutterAngle GoPro:MediaUniqueID GoPro:MetadataVersion GoPro:Model GoPro:ProTune GoPro:Rate GoPro:SensorReadoutTime GoPro:Sharpness GoPro:WhiteBalance GPS:GPSAltitude GPS:GPSAltitudeRef GPS:GPSDateStamp GPS:GPSDestBearing GPS:GPSDestBearingRef GPS:GPSHPositioningError GPS:GPSImgDirection GPS:GPSImgDirectionRef GPS:GPSLatitude GPS:GPSLatitudeRef GPS:GPSLongitude GPS:GPSLongitudeRef GPS:GPSSpeed GPS:GPSSpeedRef GPS:GPSVersionID ICC-header:CMMFlags ICC-header:ColorSpaceData ICC-header:ConnectionSpaceIlluminant ICC-header:DeviceAttributes ICC-header:DeviceManufacturer ICC-header:DeviceModel ICC-header:PrimaryPlatform ICC-header:ProfileClass ICC-header:ProfileCMMType ICC-header:ProfileConnectionSpace ICC-header:ProfileCreator ICC-header:ProfileDateTime ICC-header:ProfileFileSignature ICC-header:ProfileID ICC-header:ProfileVersion ICC-header:RenderingIntent ICC_Profile:AToB0 ICC_Profile:AToB1 ICC_Profile:AToB2 ICC_Profile:BlueMatrixColumn ICC_Profile:BlueTRC ICC_Profile:ChromaticAdaptation ICC_Profile:GreenMatrixColumn ICC_Profile:GreenTRC ICC_Profile:MediaWhitePoint ICC_Profile:ProfileCopyright ICC_Profile:ProfileDescription ICC_Profile:RedMatrixColumn ICC_Profile:RedTRC IFD0:HostComputer IFD0:Make IFD0:Model IFD0:ModifyDate IFD0:Orientation IFD0:ResolutionUnit IFD0:Software IFD0:TileLength IFD0:TileWidth IFD0:XResolution IFD0:YCbCrPositioning IFD0:YResolution IFD1:Compression IFD1:ResolutionUnit IFD1:ThumbnailImage IFD1:ThumbnailLength IFD1:ThumbnailOffset IFD1:XResolution IFD1:YResolution IPTC:ApplicationRecordVersion IPTC:CodedCharacterSet IPTC:DateCreated IPTC:DigitalCreationDate IPTC:DigitalCreationTime IPTC:Keywords IPTC:ObjectName IPTC:TimeCreated ItemList:GPSCoordinates JFIF:JFIFVersion JFIF:ResolutionUnit JFIF:XResolution JFIF:YResolution Keys:CreationDate Keys:GPSCoordinates Keys:LocationAccuracyHorizontal Keys:Make Keys:Model Keys:Software Meta:MetaImageSize Meta:PrimaryItemReference Photoshop:IPTCDigest QuickTime:AverageFrameRate QuickTime:BitDepthChroma QuickTime:BitDepthLuma QuickTime:ChromaFormat QuickTime:CompatibleBrands QuickTime:ConstantFrameRate QuickTime:ConstraintIndicatorFlags QuickTime:CreateDate QuickTime:CurrentTime QuickTime:Duration QuickTime:GeneralLevelIDC QuickTime:GeneralProfileIDC QuickTime:GeneralProfileSpace QuickTime:GeneralTierFlag QuickTime:GenProfileCompatibilityFlags QuickTime:HandlerType QuickTime:HEVCConfigurationVersion QuickTime:ImagePixelDepth QuickTime:ImageSpatialExtent QuickTime:MajorBrand QuickTime:MatrixStructure QuickTime:MediaDataOffset QuickTime:MediaDataSize QuickTime:MinorVersion QuickTime:MinSpatialSegmentationIDC QuickTime:ModifyDate QuickTime:MovieHeaderVersion QuickTime:NextTrackID QuickTime:NumTemporalLayers QuickTime:ParallelismType QuickTime:PosterTime QuickTime:PreferredRate QuickTime:PreferredVolume QuickTime:PreviewDuration QuickTime:PreviewTime QuickTime:Rotation QuickTime:SelectionDuration QuickTime:SelectionTime QuickTime:TemporalIDNested QuickTime:TimeScale System:Directory System:FileAccessDate System:FileInodeChangeDate System:FileModifyDate System:FileName System:FilePermissions System:FileSize Track1:BitDepth Track1:CleanApertureDimensions Track1:CompressorID Track1:CompressorName Track1:EncodedPixelsDimensions Track1:GraphicsMode Track1:HandlerClass Track1:HandlerDescription Track1:HandlerType Track1:HandlerVendorID Track1:ImageHeight Track1:ImageWidth Track1:MatrixStructure Track1:MediaCreateDate Track1:MediaDuration Track1:MediaHeaderVersion Track1:MediaLanguageCode Track1:MediaModifyDate Track1:MediaTimeScale Track1:OpColor Track1:ProductionApertureDimensions Track1:SourceImageHeight Track1:SourceImageWidth Track1:TrackCreateDate Track1:TrackDuration Track1:TrackHeaderVersion Track1:TrackID Track1:TrackLayer Track1:TrackModifyDate Track1:TrackVolume Track1:VideoFrameRate Track1:XResolution Track1:YResolution Track2:AudioBitsPerSample Track2:AudioChannels Track2:AudioFormat Track2:AudioSampleRate Track2:Balance Track2:HandlerClass Track2:HandlerDescription Track2:HandlerType Track2:HandlerVendorID Track2:MatrixStructure Track2:MediaCreateDate Track2:MediaDuration Track2:MediaHeaderVersion Track2:MediaLanguageCode Track2:MediaModifyDate Track2:MediaTimeScale Track2:PurchaseFileFormat Track2:TrackCreateDate Track2:TrackDuration Track2:TrackHeaderVersion Track2:TrackID Track2:TrackLayer Track2:TrackModifyDate Track2:TrackVolume Track3:ContentDescribes Track3:GenBalance Track3:GenFlags Track3:GenGraphicsMode Track3:GenMediaVersion Track3:GenOpColor Track3:HandlerClass Track3:HandlerDescription Track3:HandlerType Track3:HandlerVendorID Track3:MatrixStructure Track3:MediaCreateDate Track3:MediaDuration Track3:MediaHeaderVersion Track3:MediaLanguageCode Track3:MediaModifyDate Track3:MediaTimeScale Track3:MetaFormat Track3:TrackCreateDate Track3:TrackDuration Track3:TrackHeaderVersion Track3:TrackID Track3:TrackLayer Track3:TrackModifyDate Track3:TrackVolume Track3:Warning Track4:ContentDescribes Track4:GenBalance Track4:GenFlags Track4:GenGraphicsMode Track4:GenMediaVersion Track4:GenOpColor Track4:HandlerClass Track4:HandlerDescription Track4:HandlerType Track4:HandlerVendorID Track4:MatrixStructure Track4:MediaCreateDate Track4:MediaDuration Track4:MediaHeaderVersion Track4:MediaLanguageCode Track4:MediaModifyDate Track4:MediaTimeScale Track4:MetaFormat Track4:TrackCreateDate Track4:TrackDuration Track4:TrackHeaderVersion Track4:TrackID Track4:TrackLayer Track4:TrackModifyDate Track4:TrackVolume Track5:ContentDescribes Track5:GenBalance Track5:GenFlags Track5:GenGraphicsMode Track5:GenMediaVersion Track5:GenOpColor Track5:HandlerClass Track5:HandlerDescription Track5:HandlerType Track5:HandlerVendorID Track5:MatrixStructure Track5:MediaCreateDate Track5:MediaDuration Track5:MediaHeaderVersion Track5:MediaLanguageCode Track5:MediaModifyDate Track5:MediaTimeScale Track5:MetaFormat Track5:TrackCreateDate Track5:TrackDuration Track5:TrackHeaderVersion Track5:TrackID Track5:TrackLayer Track5:TrackModifyDate Track5:TrackVolume UserData:FirmwareVersion UserData:LensSerialNumber UserData:SerialNumberHash XMP-dc:Subject XMP-dc:Title XMP-photoshop:DateCreated XMP-x:XMPToolkit XMP-xmp:CreateDate XMP-xmp:CreatorTool XMP-xmp:ModifyDate 728x90'코딩' 카테고리의 다른 글
마우스 오른쪽 버튼 사용 금지가 설정된 블로그에서 오른쪽 버튼 사용하기 (0) 2024.08.11 [Markdown] 마크다운 정리 (0) 2022.12.20 FFMEPG (0) 2022.12.19