News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Getting incorrect Start Timecode

Started by jallison7, July 26, 2020, 02:27:42 PM

Previous topic - Next topic

jallison7

Hello!

I'm a VERY new newbie to ExifTool and the forum. It is possible that I am simply misreading the ExifTool output, so I'm wondering if someone can help me out with this.

I have a sample DNXHD 36 MXF OP1A video file. When I bring the file into DaVinci Resolve and go to the head of the clip, the Start Timecode is 19:48:23:00. However, when I look at the file's metadata using ExifTool, it tells me that the Start Timecode is 19:49:34:00. What could be the reason for this discrepancy?

I am launching ExifTool by dragging the video file onto the exiftool(-k).exe in Explorer on Windows 10.

Thanks to anyone who's able to take the time to help me out with this!

-Justin

StarGeek

What is the output of
exiftool -time:all -g1 -a -s FILE

Just copy/paste the output, don't screenshot it.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jallison7

Here's the output for the file in question:

---- System ----
FileModifyDate                  : 2016:09:27 00:33:48-04:00
FileAccessDate                  : 2020:07:26 16:43:19-04:00
FileCreateDate                  : 2020:07:24 22:10:39-04:00
---- MXF ----
ContainerLastModifyDate         : 2016:09:27 04:21:46.812
CreateDate                      : 2016:09:27 04:21:47.128
PackageLastModifyDate           : 2016:09:27 04:21:47.128
CreateDate                      : 2016:09:27 04:21:46.812
PackageLastModifyDate           : 2016:09:27 04:21:46.812
ModifyDate                      : 2016:09:27 04:21:46.812


Thank you!

StarGeek

Hmmm... I had assumed from the name that it might have been part of the Time group, but I guess not.  I don't have any experience with the MXF format.

What's the output of this command?  Hopefully it's not too long due to the wildcards.
exiftool -g1 -a -s -StartTime* -*Duration* FILE
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jallison7

That command gave me:

---- Track1 ----
Duration                        : 0:11:32
---- Track2 ----
Duration                        : 0:11:32
---- Track3 ----
Duration                        : 0:11:32
StartTimecode                   : 19:49:34
Duration                        : 0:11:32
Duration                        : 0:11:32
StartTimecode                   : 19:49:34
Duration                        : 0:11:32
---- Track4 ----
Duration                        : 0:11:32
---- Track5 ----
Duration                        : 0:11:32
---- MXF ----
Duration                        : 0:11:32

jallison7

UPDATE:

I transcoded the file into an Apple ProRes QuickTime and now ExifTool outputs the correct Start Timecode.

Could this be a bug for reading files with an MXF wrapper?

Phil Harvey

StartTimecode is stored in units of the EditRate.  What is this for your file?

Use the -n option to see the raw count.  Multiply this by the EditRate to get the TimecodeStart in seconds.

ExifTool converts this to HH:MM:SS format if it is greater than 30 sec.  It isn't in the time group because generally timecodes don't represent clock times.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jallison7

Wow the maestro himself! Thanks for taking the time!

The EditRate is 23.97602398 (which I'm guessing is just the exact value for 23.98fps).

This is the output of exiftool -g1 -a -s -n -StartTime* -*Duration* FILE for the original DNXHD 36 MXF file:

---- Track1 ----
Duration                        : 692.400041551844
---- Track2 ----
Duration                        : 692.400041551844
---- Track3 ----
Duration                        : 692.400041551844
StartTimecode                   : 71374.3029881638
Duration                        : 692.400041551844
Duration                        : 692.400041551844
StartTimecode                   : 71374.3029881638
Duration                        : 692.400041551844
---- Track4 ----
Duration                        : 692.400041551844
---- Track5 ----
Duration                        : 692.400041551844
---- MXF ----
Duration                        : 692.400041551844


This is the output of the same command executed on a transcoded version of the file that is an Apple ProRes 422 QuickTime:

---- QuickTime ----
Duration                        : 692.400041666667
PreviewDuration                 : 0
SelectionDuration               : 0
---- Track1 ----
TrackDuration                   : 692.400041666667
MediaDuration                   : 692.400041666667
---- Track2 ----
TrackDuration                   : 692.400041666667
MediaDuration                   : 692.400041666667
---- Track3 ----
TrackDuration                   : 692.400041666667
MediaDuration                   : 692.400041666667
---- UserData ----
StartTimecode                   : 19:48:23:00
StartTimeScale                  : 24000
StartTimeSampleSize             : 1001
---- XMP-xmpDM ----
StartTimeScale                  : 24000
StartTimeSampleSize             : 1001
DurationValue                   : 16617601
DurationScale                   : 4.16666666666667e-005
StartTimecodeTimeFormat         : 23976Timecode
StartTimecodeTimeValue          : 19:48:23:00


Why might these outputs be different?

Thanks!

Phil Harvey

Well, the new file shows a time scale of 24 fps (StartTimeScale).  But the old file shows 23.97602398 (EditRate).

This is exactly the difference between the StartTimeCode values:

19:49:34 = 19:48:23:00 * 24 / 23.97602398

Can you show me the output from exiftool -a -g1 -s on the original file?  I'm wondering where the 24 fps came from.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jallison7

Sure! This is for the original MXF file:

---- ExifTool ----
ExifToolVersion                 : 12.01
---- System ----
FileName                        : BTBD-ASN_S038_S001_T018.mxf
Directory                       : G:/py_scripts/vfx_import/test_media/mxf
FileSize                        : 3.4 GB
FileModifyDate                  : 2016:09:27 00:33:48-04:00
FileAccessDate                  : 2020:07:27 15:04:01-04:00
FileCreateDate                  : 2020:07:24 22:10:39-04:00
FilePermissions                 : rw-rw-rw-
---- File ----
FileType                        : MXF
FileTypeExtension               : mxf
MIMEType                        : application/mxf
---- MXF ----
MXFVersion                      : 1.2
ObjectModelVersion              : 1
SDKVersion                      : 1.2
ContainerLastModifyDate         : 2016:09:27 04:21:46.812
PackageName                     : Source Package
CreateDate                      : 2016:09:27 04:21:47.128
PackageLastModifyDate           : 2016:09:27 04:21:47.128
SampleRate                      : 23.97602398
CreateDate                      : 2016:09:27 04:21:46.812
PackageLastModifyDate           : 2016:09:27 04:21:46.812
EssenceStreamID                 : 2
IndexStreamID                   : 1
ApplicationSupplierName         : Adobe Systems Incorporated
ApplicationName                 : Adobe Media Encoder
ApplicationVersionNumber        : 1.0.0.0 released
ApplicationVersionString        : 10.4.0
ApplicationPlatform             : win32
ToolkitVersion                  : 4.5.12.0 patched
ModifyDate                      : 2016:09:27 04:21:46.812
Duration                        : 0:11:32
---- Track1 ----
PresentationAspectRatio         : 1.777777778
FrameLayout                     : 0
HorizontalSubsampling           : 2
SampledHeight                   : 1080
SampledWidth                    : 1920
DisplayHeight                   : 1080
DisplayWidth                    : 1920
ImageHeight                     : 1080
ImageWidth                      : 1920
SampleRate                      : 23.97602398
EssenceLength                   : 0:11:32
VideoLineMap                    : 2 4 42 0
VerticalSub-sampling            : 1
ComponentDepth                  : 8
ImageAlignmentOffset            : 8192
LinkedTrackID                   : 512
TrackNumber                     : 352390144
TrackID                         : 512
EditRate                        : 23.97602398
Origin                          : 0 s
ComponentDataDefinition         : Picture Essence Track
Duration                        : 0:11:32
---- Track2 ----
AudioReferenceLevel             : 0
SampleRate                      : 48000
EssenceLength                   : 0:11:32
LockedIndicator                 : True
BitsPerAudioSample              : 24
ChannelCount                    : 2
AudioSampleRate                 : 48000
BlockAlign                      : 6
AverageBytesPerSecond           : 144000
DialNorm                        : 0
LinkedTrackID                   : 768
TrackNumber                     : 369164544
TrackID                         : 768
EditRate                        : 23.97602398
Origin                          : 0 s
ComponentDataDefinition         : Sound Essence Track
Duration                        : 0:11:32
---- Track3 ----
TrackNumber                     : 0
TrackID                         : 0
EditRate                        : 23.97602398
Origin                          : 0 s
ComponentDataDefinition         : SMPTE 12M Timecode Track
Duration                        : 0:11:32
DropFrame                       : False
RoundedTimecodeTimebase         : 24
ComponentDataDefinition         : SMPTE 12M Timecode Track
StartTimecode                   : 19:49:34
Duration                        : 0:11:32
TrackNumber                     : 0
TrackID                         : 0
TrackName                       : Timecode
EditRate                        : 23.97602398
Origin                          : 0 s
ComponentDataDefinition         : SMPTE 12M Timecode Track
Duration                        : 0:11:32
DropFrame                       : False
RoundedTimecodeTimebase         : 24
ComponentDataDefinition         : SMPTE 12M Timecode Track
StartTimecode                   : 19:49:34
Duration                        : 0:11:32
---- Track4 ----
TrackNumber                     : 0
TrackID                         : 1
TrackName                       : Track 1
EditRate                        : 23.97602398
Origin                          : 0 s
ComponentDataDefinition         : Picture Essence Track
Duration                        : 0:11:32
---- Track5 ----
TrackNumber                     : 0
TrackID                         : 2
TrackName                       : Track 2
EditRate                        : 23.97602398
Origin                          : 0 s
ComponentDataDefinition         : Sound Essence Track
Duration                        : 0:11:32
---- Composite ----
ImageSize                       : 1920x1080
Megapixels                      : 2.1

Phil Harvey

Well, RoundedTimecodeTimebase is 24 fps.  I'll have to re-read the MXF specification, but I should have been going by the spec when I decided to use EditRate in the calculation.  I don't know why the other apps seem to be using a rounded timescale.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jallison7

Interesting...well for my project transcoding to QuickTimes first is an acceptable workaround. Thanks so much for looking into it!

-Justin