How Can I Change Mime Type In the Metadata on File - metadata

I want to change the "MIME Type" in the file:
└──╼ $exiftool realshort.mp4
ExifTool Version Number : 12.10
File Name : realshort.mp4
Directory : .
File Size : 98 kB
File Modification Date/Time : 2021:01:19 23:53:01+00:00
File Access Date/Time : 2021:01:19 23:53:01+00:00
File Inode Change Date/Time : 2021:01:19 23:53:01+00:00
File Permissions : rw-r--r--
File Type : MP4
File Type Extension : mp4
MIME Type : video/mp4
Major Brand : MP4 Base Media v1 [IS0 14496-12:2003]
Minor Version : 0.0.0
Compatible Brands : isom, 3gp4
Movie Header Version : 0
Create Date : 2014:11:05 13:51:33
Modify Date : 2014:11:05 13:51:33
Time Scale : 1000
Duration : 1.20 s
Preferred Rate : 1
Preferred Volume : 100.00%
Preview Time : 0 s
Preview Duration : 0 s
Poster Time : 0 s
Selection Time : 0 s
Selection Duration : 0 s
Current Time : 0 s
Next Track ID : 3
Track Header Version : 0
Track Create Date : 2014:11:05 13:51:33
Track Modify Date : 2014:11:05 13:51:33
Track ID : 1
Track Duration : 1.20 s
Track Layer : 0
Track Volume : 0.00%
Image Width : 320
Image Height : 240
Graphics Mode : srcCopy
Op Color : 0 0 0
Compressor ID : avc1
Source Image Width : 320
Source Image Height : 240
X Resolution : 72
Y Resolution : 72
Compressor Name :
Bit Depth : 24
Video Frame Rate : 30.02
Matrix Structure : 1 0 0 0 1 0 0 0 1
Media Header Version : 0
Media Create Date : 2014:11:05 13:51:33
Media Modify Date : 2014:11:05 13:51:33
Media Time Scale : 48000
Media Duration : 1.17 s
Handler Type : Audio Track
Handler Description : SoundHandle
Balance : 0
Audio Format : mp4a
Audio Channels : 1
Audio Bits Per Sample : 16
Audio Sample Rate : 48000
XMP Toolkit : Image::ExifTool 12.10
Media Data Size : 95268
Media Data Offset : 4610
Image Size : 320x240
Megapixels : 0.077
Avg Bitrate : 636 kbps
Rotation : 0
If I do:
exiftool -artist=ii realshort.mp4
i can add artist tag with the value ii
But if I do: exiftool -"mime type"=ii realshort.mp4 it won't work
I looked at: https://libre-software.net/edit-metadata-exiftool/
And also here: How do you change the MIME type of a file from the terminal?
But I can't find any answer
How can I make it work?

You can't change the MIME type. It's not embedded data. It's a tag derived from what the type of file is.
You could edit try editing the .Exiftool_Config file if you have one (see the example config) to override the base definition, but that will only change what exiftool displays. Another program or another computer will output MP4 as the MIME type.

Related

MCU damaged after FLASH->OPTR register changed

I have changed STM32G431CBT6's default BOOT0/PB8 pin disable via changed FLASH->OPTR register
nswboot0 bit from factory default 1 to 0, however after that I have already damaged (or something else such as locked) 3 MCUs.
Now connect with STM32CubeProgrammer, it's reject with below messages.
16:37:24 : Disconnected from device.
16:37:25 : ST-LINK SN : 50FF73064986495117442387
16:37:25 : ST-LINK FW : V2J37S7
16:37:25 : Board : --
16:37:25 : Voltage : 3.24V
16:37:25 : SWD freq : 4000 KHz
16:37:25 : Connect mode: Normal
16:37:25 : Reset mode : Software reset
16:37:25 : Device ID : 0x468
16:37:25 : Revision ID : Rev Y
16:37:25 : UPLOADING OPTION BYTES DATA ...
16:37:25 : Bank : 0x00
16:37:25 : Address : 0x40022020
16:37:25 : Size : 20 Bytes
16:37:25 : Bank : 0x01
16:37:25 : Address : 0x40022070
16:37:25 : Size : 4 Bytes
16:37:25 : UPLOADING ...
16:37:25 : Size : 1024 Bytes
16:37:25 : Address : 0x8000000
16:37:25 : Read progress:
16:37:25 : Error: Data read failed
Regards,
Tiger

Codeigniter Upload File Sometimes Not Working

I have a website with an upload profile photos for users.
First Try
When I try to upload a small size image, the upload was succeed.
This file property :
Size : 500 KB
Width : 900
Height : 900
Type : jpg
Second Try
When I try to upload a large iamge, I got error message :
The uploaded file exceeds the maximum allowed size in your PHP configuration file.
This file property :
Size : 7,2 MB
Width : 5200
Height : 3500
Type : JPG
This is my config file in my controller :
$config['upload_path'] = "./assets/gambar/pengguna/";
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$config['max_size'] = 25000;
$config['max_width'] = 7000;
$config['max_height'] = 7000;
I tried to change max_size, max_width, and max_height to 0. But I still get bthe same problem.
Refrence to set it 0 to make it no limit from :
https://www.codeigniter.com/user_guide/libraries/file_uploading.html

Scalable HEVC encoding: How to setup cfg files for quality scalability?

I downloaded SHM12.3 and I started scalable encoding.
This is the script I use in terminal:
/TAppEncoderStatic -c cfg/encoder_scalable_journal_B2.cfg -c cfg/per-sequence-svc/C_L-SNR.cfg -c cfg/layers_journal.cfg -b C_L_SSIM_B2.bin -o0 rec/C_L_B2_l0_rec.yuv -o1 rec/C_L_B2_l1_rec.yuv >> results_B2_26_06_2017.txt
This is the example script given in software description.
I need to perform scalable encoding having a video with different video qualities or video with different bitrate.
Can anyone help me to edit the configuration files to support quality scalability?
Thank you in advance!
I found the solution. The first configuration file is ncoder_scalable_journal_B2.cfg.
My setup includes 3 layers for SNR scalability.
#======== File I/O =====================
BitstreamFile : str.bin
#ReconFile : rec.yuv
#======== Profile ================
NumProfileTierLevel : 3
Profile0 : main # Profile for BL (NOTE01: this profile applies to whole layers but only BL is outputted)
# (NOTE02: this profile has no effect when NonHEVCBase is set to 1)
Profile1 : main # Profile for BL (NOTE01: this profile applies to HEVC BL only)
# (NOTE02: When NonHEVCBase is set to 1, this profile & associated level should be updated appropriately)
Profile2 : scalable-main # Scalable profile
#======== Unit definition ================
#MaxCUWidth : 64 # Maximum coding unit width in pixel
#MaxCUHeight : 64 # Maximum coding unit height in pixel
#MaxPartitionDepth : 16 # Maximum coding unit depth
#QuadtreeTULog2MaxSize : 5 # Log2 of maximum transform size for
# quadtree-based TU coding (2...6)
#QuadtreeTULog2MinSize : 2 # Log2 of minimum transform size for
# quadtree-based TU coding (2...6)
#QuadtreeTUMaxDepthInter : 3
#QuadtreeTUMaxDepthIntra : 3
#======== Coding Structure =============
MaxNumMergeCand : 2
#IntraPeriod : 4 # Period of I-Frame ( -1 = only first)
DecodingRefreshType : 2 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
GOPSize : 6 # GOP Size (number of B slice = GOPSize-1)
# Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs
Frame1: B 1 2 0 0 0.4624 0 0 0 1 1 -1 0
Frame2: B 2 1 0 0 0.4624 0 0 0 1 1 -2 2 1
Frame3: P 3 0 0 0 0.4624 0 0 0 1 1 -3 2 2
Frame4: B 4 2 0 0 0.4624 0 0 0 1 1 -1 2 2
Frame5: B 5 1 0 0 0.4624 0 0 0 1 1 -2 2 3
Frame6: P 6 0 0 0 0.4624 0 0 0 1 1 -3 2 3
#=========== Motion Search =============
FastSearch : 1 # 0:Full search 1:TZ search
SearchRange : 25 # (0: Search range is a Full frame)
BipredSearchRange : 4 # Search range for bi-prediction refinement
HadamardME : 1 # Use of hadamard measure for fractional ME
FEN : 1 # Fast encoder decision
FDM : 1 # Fast Decision for Merge RD cost
#======== Quantization =============
#QP : 32 # Quantization parameter(0-51)
MaxDeltaQP : 0 # CU-based multi-QP optimization
#MaxCuDQPDepth : 0 # Max depth of a minimum CuDQP for sub-LCU-level delta QP
DeltaQpRD : 0 # Slice-based multi-QP optimization
RDOQ : 1 # RDOQ
RDOQTS : 1 # RDOQ for transform skip
SliceChromaQPOffsetPeriodicity: 0 # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
SliceCbQpOffsetIntraOrPeriodic: 0 # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
SliceCrQpOffsetIntraOrPeriodic: 0 # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
#=========== Deblock Filter ============
#DeblockingFilterControlPresent: 0 # Dbl control params present (0=not present, 1=present)
LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter)
LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6
LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6
DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream)
#=========== Misc. ============
#InternalBitDepth : 8 # codec operating bit-depth
#=========== Coding Tools =================
#SAO : 0 # Sample adaptive offset (0: OFF, 1: ON)
AMP : 0 # Asymmetric motion partitions (0: OFF, 1: ON)
TransformSkip : 0 # Transform skipping (0: OFF, 1: ON)
TransformSkipFast : 0 # Fast Transform skipping (0: OFF, 1: ON)
SAOLcuBoundary : 0 # SAOLcuBoundary using non-deblocked pixels (0: OFF, 1: ON)
#============ Slices ================
SliceMode : 0 # 0: Disable all slice options.
# 1: Enforce maximum number of LCU in an slice,
# 2: Enforce maximum number of bytes in an 'slice'
# 3: Enforce maximum number of tiles in a slice
SliceArgument : 1500 # Argument for 'SliceMode'.
# If SliceMode==1 it represents max. SliceGranularity-sized blocks per slice.
# If SliceMode==2 it represents max. bytes per slice.
# If SliceMode==3 it represents max. tiles per slice.
LFCrossSliceBoundaryFlag : 1 # In-loop filtering, including ALF and DB, is across or not across slice boundary.
# 0:not across, 1: across
#============ PCM ================
PCMEnabledFlag : 0 # 0: No PCM mode
PCMLog2MaxSize : 5 # Log2 of maximum PCM block size.
PCMLog2MinSize : 3 # Log2 of minimum PCM block size.
PCMInputBitDepthFlag : 1 # 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth.
PCMFilterDisableFlag : 0 # 0: Enable loop filtering on I_PCM samples. 1: Disable loop filtering on I_PCM samples.
#============ Tiles ================
TileUniformSpacing : 0 # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
# 1: the column and row boundaries are distributed uniformly
NumTileColumnsMinus1 : 0 # Number of tile columns in a picture minus 1
TileColumnWidthArray : 2 3 # Array containing tile column width values in units of CTU (from left to right in picture)
NumTileRowsMinus1 : 0 # Number of tile rows in a picture minus 1
TileRowHeightArray : 2 # Array containing tile row height values in units of CTU (from top to bottom in picture)
LFCrossTileBoundaryFlag : 1 # In-loop filtering is across or not across tile boundary.
# 0:not across, 1: across
#============ WaveFront ================
#WaveFrontSynchro : 0 # 0: No WaveFront synchronisation (WaveFrontSubstreams must be 1 in this case).
# >0: WaveFront synchronises with the LCU above and to the right by this many LCUs.
#=========== Quantization Matrix =================
#ScalingList : 0 # ScalingList 0 : off, 1 : default, 2 : file read
#ScalingListFile : scaling_list.txt # Scaling List file name. If file is not exist, use Default Matrix.
#============ Lossless ================
#TransquantBypassEnableFlag : 0 # Value of PPS flag.
#CUTransquantBypassFlagForce: 0 # Force transquant bypass mode, when transquant_bypass_enable_flag is enabled
#============ Rate Control ======================
#RateControl : 0 # Rate control: enable rate control
#TargetBitrate : 1000000 # Rate control: target bitrate, in bps
#KeepHierarchicalBit : 2 # Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation
#LCULevelRateControl : 1 # Rate control: 1: LCU level RC; 0: picture level RC
#RCLCUSeparateModel : 1 # Rate control: use LCU level separate R-lambda model
#InitialQP : 0 # Rate control: initial QP
#RCForceIntraQP : 0 # Rate control: force intra QP to be equal to initial QP
### DO NOT ADD ANYTHING BELOW THIS LINE ###
### DO NOT DELETE THE EMPTY LINE BELOW ###
The second configuration file is C_L-SNR.cfg.
FrameSkip : 0 # Number of frames to be skipped in input
FramesToBeEncoded : 480 # Number of frames to be coded
Level0 : 3 # Level of the whole bitstream
Level1 : 3 # Level of the base layer
Level2 : 3 # Level of the enhancement layer
Level3 : 3 # Level of the enhancement layer
#======== File I/O ===============
InputFile0 : C_L_560x448_40.yuv
FrameRate0 : 40 # Frame Rate per second
InputBitDepth0 : 8 # Input bitdepth for layer 0
SourceWidth0 : 560 # Input frame width
SourceHeight0 : 448 # Input frame height
RepFormatIdx0 : 0 # Index of corresponding rep_format() in the VPS
IntraPeriod0 : 96 # Period of I-Frame ( -1 = only first)
ConformanceMode0 : 1 # conformance mode
QP0 : 31
LayerPTLIndex0 : 1
InputFile1 : C_L_560x448_40.yuv
FrameRate1 : 40 # Frame Rate per second
InputBitDepth1 : 8 # Input bitdepth for layer 1
SourceWidth1 : 560 # Input frame width
SourceHeight1 : 448 # Input frame height
RepFormatIdx1 : 1 # Index of corresponding rep_format() in the VPS
IntraPeriod1 : 96 # Period of I-Frame ( -1 = only first)
ConformanceMode1 : 1 # conformance mode
QP1 : 26
LayerPTLIndex1 : 2
InputFile2 : C_L_560x448_40.yuv
FrameRate2 : 40 # Frame Rate per second
InputBitDepth2 : 8 # Input bitdepth for layer 1
SourceWidth2 : 560 # Input frame width
SourceHeight2 : 448 # Input frame height
RepFormatIdx2 : 2 # Index of corresponding rep_format() in the VPS
IntraPeriod2 : 96 # Period of I-Frame ( -1 = only first)
ConformanceMode2 : 1 # conformance mode
QP2 : 23
LayerPTLIndex2 : 3
And the last configuration files is layers_journal.cfg.
NumLayers : 3
NonHEVCBase : 0
ScalabilityMask1 : 0 # Multiview
ScalabilityMask2 : 1 # Scalable
ScalabilityMask3 : 0 # Auxiliary pictures
AdaptiveResolutionChange : 0 # Resolution change frame (0: disable)
SkipPictureAtArcSwitch : 0 # Code higher layer picture as skip at ARC switching (0: disable (default), 1: enable)
MaxTidRefPresentFlag : 1 # max_tid_ref_present_flag (0=not present, 1=present(default))
CrossLayerPictureTypeAlignFlag: 1 # Picture type alignment across layers
CrossLayerIrapAlignFlag : 1 # Align IRAP across layers
SEIDecodedPictureHash : 1
#============= LAYER 0 ==================
#QP0 : 22
MaxTidIlRefPicsPlus10 : 7 # max_tid_il_ref_pics_plus1 for layer0
#============ Rate Control ==============
RateControl0 : 0 # Rate control: enable rate control for layer 0
TargetBitrate0 : 1000000 # Rate control: target bitrate for layer 0, in bps
KeepHierarchicalBit0 : 1 # Rate control: keep hierarchical bit allocation for layer 0 in rate control algorithm
LCULevelRateControl0 : 1 # Rate control: 1: LCU level RC for layer 0; 0: picture level RC for layer 0
RCLCUSeparateModel0 : 1 # Rate control: use LCU level separate R-lambda model for layer 0
InitialQP0 : 0 # Rate control: initial QP for layer 0
RCForceIntraQP0 : 0 # Rate control: force intra QP to be equal to initial QP for layer 0
#============ WaveFront ================
WaveFrontSynchro0 : 0 # 0: No WaveFront synchronisation (WaveFrontSubstreams must be 1 in this case).
# >0: WaveFront synchronises with the LCU above and to the right by this many LCUs.
#=========== Quantization Matrix =================
ScalingList0 : 0 # ScalingList 0 : off, 1 : default, 2 : file read
ScalingListFile0 : scaling_list0.txt # Scaling List file name. If file is not exist, use Default Matrix.
#============= LAYER 1 ==================
#QP1 : 20
NumSamplePredRefLayers1 : 1 # number of sample pred reference layers
SamplePredRefLayerIds1 : 0 # reference layer id
NumMotionPredRefLayers1 : 1 # number of motion pred reference layers
MotionPredRefLayerIds1 : 0 # reference layer id
NumActiveRefLayers1 : 1 # number of active reference layers
PredLayerIds1 : 0 # inter-layer prediction layer index within available reference layers
#============ Rate Control ==============
RateControl1 : 0 # Rate control: enable rate control for layer 1
TargetBitrate1 : 1000000 # Rate control: target bitrate for layer 1, in bps
KeepHierarchicalBit1 : 1 # Rate control: keep hierarchical bit allocation for layer 1 in rate control algorithm
LCULevelRateControl1 : 1 # Rate control: 1: LCU level RC for layer 1; 0: picture level RC for layer 1
RCLCUSeparateModel1 : 1 # Rate control: use LCU level separate R-lambda model for layer 1
InitialQP1 : 0 # Rate control: initial QP for layer 1
RCForceIntraQP1 : 0 # Rate control: force intra QP to be equal to initial QP for layer 1
#============ WaveFront ================
WaveFrontSynchro1 : 0 # 0: No WaveFront synchronisation (WaveFrontSubstreams must be 1 in this case).
# >0: WaveFront synchronises with the LCU above and to the right by this many LCUs.
#=========== Quantization Matrix =================
ScalingList1 : 0 # ScalingList 0 : off, 1 : default, 2 : file read
ScalingListFile1 : scaling_list1.txt # Scaling List file name. If file is not exist, use Default Matrix.
#============= LAYER 2 ==================
#QP1 : 20
NumSamplePredRefLayers2 : 1 # number of sample pred reference layers
SamplePredRefLayerIds2 : 0 # reference layer id
NumMotionPredRefLayers2 : 1 # number of motion pred reference layers
MotionPredRefLayerIds2 : 0 # reference layer id
NumActiveRefLayers2 : 1 # number of active reference layers
PredLayerIds2 : 0 # inter-layer prediction layer index within available reference layers
#============ Rate Control ==============
RateControl2 : 0 # Rate control: enable rate control for layer 1
TargetBitrate2 : 1000000 # Rate control: target bitrate for layer 1, in bps
KeepHierarchicalBit2 : 1 # Rate control: keep hierarchical bit allocation for layer 1 in rate control algorithm
LCULevelRateControl2 : 1 # Rate control: 1: LCU level RC for layer 1; 0: picture level RC for layer 1
RCLCUSeparateModel2 : 1 # Rate control: use LCU level separate R-lambda model for layer 1
InitialQP2 : 0 # Rate control: initial QP for layer 1
RCForceIntraQP2 : 0 # Rate control: force intra QP to be equal to initial QP for layer 1
#============ WaveFront ================
WaveFrontSynchro2 : 0 # 0: No WaveFront synchronisation (WaveFrontSubstreams must be 1 in this case).
# >0: WaveFront synchronises with the LCU above and to the right by this many LCUs.
#=========== Quantization Matrix =================
ScalingList2 : 0 # ScalingList 0 : off, 1 : default, 2 : file read
ScalingListFile2 : scaling_list1.txt # Scaling List file name. If file is not exist, use Default Matrix.
NumLayerSets : 3 # Include default layer set, value of 0 not allowed
NumLayerInIdList1 : 2 # 0-th layer set is default, need not specify LayerSetLayerIdList0 or NumLayerInIdList0
LayerSetLayerIdList1 : 0 1
NumLayerInIdList2 : 3 # 0-th layer set is default, need not specify LayerSetLayerIdList0 or NumLayerInIdList0
LayerSetLayerIdList2 : 0 1 2
NumAddLayerSets : 0
NumOutputLayerSets : 3 # Include defualt OLS, value of 0 not allowed
DefaultTargetOutputLayerIdc : 2
NumOutputLayersInOutputLayerSet : 1 1 # The number of layers in the 0-th OLS should not be specified,
# ListOfOutputLayers0 need not be specified
ListOfOutputLayers1 : 1
ListOfProfileTierLevelOls1 : 1 2
ListOfOutputLayers2 : 2
ListOfProfileTierLevelOls2 : 1 2 2

How to preserve image metadata in MATLAB imwrite?

I want to preserve image metadata but my code strips all metadata. How do I stop this? I run this script from the MATLAB SDE command prompt. Code is below:
p = which('G0011363.JPG');
filelist = dir([fileparts(p) filesep '*.JPG']);
fileNames = {filelist.name};
fileNames_size = size(fileNames,2);
number_of_colums = fileNames_size;
for k = 1:number_of_colums
imwrite(undistortImage(imread(fileNames{k}), cameraParams2cof, 'OutputView', 'valid'), (strcat(int2str(k), 'R2_3COF_ONRcorrected.jpg')));
end
You can read in metadata using imfinfo, and you can write specific metadata to your image file with imwrite (as long as the particular tag is supported) as key/value pairs. Look at help imwrite for more info.
Example:
>> I = imread('NeverGonnaGiveYouUp.png');
>> imwrite(I, 'output.png', 'png','Author','Rick Astley');
>> Iinfo = imfinfo('output.png');
>> Iinfo.Author
ans =
Rick Astley
I found a solution, but it isn't perfect...
Note: The posted solution applies Windows OS.
Where referring to image metadata, I assume you mean Exif data.
According to https://www.mathworks.com/matlabcentral/answers/152559-writing-exif-data-to-jpg
Unfortunately, there is currently no off-the-shelf functionality to write EXIF data to an image file in MATLAB. You can only read EXIF data from an image file ( exifread and imfinfo ).
You can use run_exiftool do copy Exif data from one image to another:
Download and extract exiftool-10.25.zip
Copy file exiftool(-k).exe to your working folder, and rename file to exiftool.exe
Download run_exiftool from https://www.mathworks.com/matlabcentral/fileexchange/42000-run-exiftool, Copy getexif.m and putexif.m to your working folder.
Try the following code sample:
%Copy the file from c:\Program Files\MATLAB\R2014b\mcr\toolbox\matlab\demos\ to local folder.
%Note: ngc6543a.jpg is part of Matlab installation.
copyfile([matlabroot, '/mcr/toolbox/matlab/demos/ngc6543a.jpg'], cd);
%Read image
I = imread('ngc6543a.jpg');
%Save I to myfile.jpg and add Exif data of ngc6543a.jpg to myfile.jpg
status = putexif(I, 'myfile.jpg', 'ngc6543a.jpg');
%Read Exif data from ngc6543a.jpg
[ngc6543a_exifdata, ngc6543a_nf] = getexif('ngc6543a.jpg');
%Read Exif data from myfile.jpg
[myfile_exifdata, myfilenf] = getexif('myfile.jpg');
I am getting a warning message: Warning: Exif tags may not have been copied, but it seems to work.
Result:
>> ngc6543a_exifdata
ngc6543a_exifdata =
ExifToolVersion : 10.25
FileName : ngc6543a.jpg
Directory : .
FileSize : 27 kB
FileModifyDate : 2014:07:27 12:00:28+03:00
FileAccessDate : 2016:08:14 17:42:23+03:00
FileCreateDate : 2016:08:14 17:18:27+03:00
FilePermissions : rw-rw-rw-
FileType : JPEG
FileTypeExtension : jpg
MIMEType : image/jpeg
JFIFVersion : 1.01
ResolutionUnit : None
XResolution : 1
YResolution : 1
Comment : CREATOR: XV Version 3.00b Rev: 6/15/94 Quality = 75, Smoothing = 0.
ImageWidth : 600
ImageHeight : 650
EncodingProcess : Baseline DCT, Huffman coding
BitsPerSample : 8
ColorComponents : 3
YCbCrSubSampling : YCbCr4:2:0 (2 2)
ImageSize : 600x650
Megapixels : 0.390
>> myfile_exifdata
myfile_exifdata =
ExifToolVersion : 10.25
FileName : myfile.jpg
Directory : .
FileSize : 75 kB
FileModifyDate : 2016:08:14 18:08:51+03:00
FileAccessDate : 2016:08:14 18:08:51+03:00
FileCreateDate : 2016:08:14 17:40:22+03:00
FilePermissions : rw-rw-rw-
FileType : JPEG
FileTypeExtension : jpg
MIMEType : image/jpeg
JFIFVersion : 1.01
ResolutionUnit : None
XResolution : 1
YResolution : 1
Comment : CREATOR: XV Version 3.00b Rev: 6/15/94 Quality = 75, Smoothing = 0.
ImageWidth : 600
ImageHeight : 650
EncodingProcess : Baseline DCT, Huffman coding
BitsPerSample : 8
ColorComponents : 3
YCbCrSubSampling : YCbCr4:2:0 (2 2)
ImageSize : 600x650
Megapixels : 0.390

What information is stored in EFIX/JPEG photos taken on the iPhone with geotagging enabled?

I know that some of this data is viewable in iPhoto, such as latitude, longitude, and altitude, but is there more than this available? More specifically I am wanting to get the direction of the image as well, which is part of the EXIF format. Or does something other than geotagging need to be enabled (something to do with the compass)?
I suggest installing the command line tool exif. You can get it through Mac Ports by executing port install exif as root.
Here's an example of the exif info stored in a photo I took on an iPod Touch:
bash:$ exif Oct\ 9\,\ 2010/IMG_0038.JPG
EXIF tags in 'Oct 9, 2010/IMG_0018.JPG' ('Motorola' byte order):
--------------------+----------------------------------------------------------
Tag |Value
--------------------+----------------------------------------------------------
Manufacturer |Apple
Model |iPod touch
Orientation |right - top
x-Resolution |72.00
y-Resolution |72.00
Resolution Unit |Inch
Software |4.1
Date and Time |2010:10:06 17:43:43
YCbCr Positioning |centered
Compression |JPEG compression
x-Resolution |72.00
y-Resolution |72.00
Resolution Unit |Inch
Exposure Time |1/120 sec.
FNumber |f/2.4
Exposure Program |Normal program
ISO Speed Ratings |320
Exif Version |Exif Version 2.21
Date and Time (origi|2010:10:06 17:43:43
Date and Time (digit|2010:10:06 17:43:43
Components Configura|Y Cb Cr -
Shutter speed |6.91 EV (1/120 sec.)
Aperture |2.53 EV (f/2.4)
Metering Mode |Average
Flash |No flash function
Focal Length |3.9 mm
FlashPixVersion |FlashPix Version 1.0
Color Space |sRGB
PixelXDimension |640
PixelYDimension |480
Sensing Method |One-chip color area sensor
Exposure Mode |Auto exposure
White Balance |Auto white balance
Scene Capture Type |Standard
Sharpness |Normal
North or South Latit|N
Latitude |44.00, 22.12, 0.00
East or West Longitu|W
Longitude |56.00, 23.98, 0.00
GPS time (atomic clo|17:43:41.60
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (10215 bytes).
I don't think the iPod Touch has the same capabilities as an iPhone regarding GPS.
It looks like an iPhone will have the data 'GPSImg Direction' as well, which sounds like what you want. I don't think you have to do anything special to enable it, as I haven't found much info on this through searching.
Okay, good news :). The direction is stored in GPS Img Direction. Here's what I was able to get from a photo taken from an iphone (with location services and compass turned on) using the ExifTool mentioned by #rwong.
ExifTool Version Number : 8.34
File Name : photo.JPG
Directory : C:/Documents and Settings/user/My Document
s/Downloads
File Size : 349 kB
File Modification Date/Time : 2010:10:19 14:05:39-06:00
File Permissions : rw-rw-rw-
File Type : JPEG
MIME Type : image/jpeg
JFIF Version : 1.01
Exif Byte Order : Big-endian (Motorola, MM)
Image Description : Back Camera
Make : Apple
Camera Model Name : iPhone
Orientation : Horizontal (normal)
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : 4.0.1
Modify Date : 2010:10:19 14:00:52
Y Cb Cr Positioning : Centered
Exposure Time : 1/146
F Number : 2.4
Exposure Program : Program AE
ISO : 80
Exif Version : 0221
Date/Time Original : 2010:10:19 14:00:52
Create Date : 2010:10:19 14:00:52
Shutter Speed Value : 1/146
Aperture Value : 2.4
Metering Mode : Average
Flash : Off, Did not fire
Focal Length : 3.9 mm
Subject Area : 1295 967 699 696
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 1296
Exif Image Height : 968
Sensing Method : One-chip color area
Exposure Mode : Auto
White Balance : Auto
Scene Capture Type : Standard
Sharpness : Hard
GPS Latitude Ref : North
GPS Longitude Ref : West
GPS Time Stamp : 14:00:46.81
GPS Img Direction Ref : True North
GPS Img Direction : 32.52336904
Image Width : 1296
Image Height : 968
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Aperture : 2.4
GPS Latitude : 45 deg 14' 58.20" N
GPS Longitude : 121 deg 39' 4.80" W
GPS Position : 45 deg 14' 58.20" N, 121 deg 39' 4.80" W
Image Size : 1296x968
Shutter Speed : 1/146
Focal Length : 3.9 mm
Light Value : 10.0
you don't need an 'external' tool to view all the EXIF-infos, with the iPhone-app iMetaPhoto you can show all metainfos (EXIF, TIFF, IPTC, GPS, AUXiliary EXIF,...) and (the best of all) you can modify the most of them, esp. you can modify GPS ImgDirection.