I try to get some metadata from OP1A MXF files including time code of first frame.
I use bmx::MXFFileReader GetMaterialTimecode(), GetSourceTimecode().
It works fine, but some files reports 00:00:00.00 timecode.
However MediaInfo reports 00:00:00:01 in video stream.
It is critical for me.
Maybe it is wrong way?
Prompt please where to go.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A MXF file can have several timecodes in different places, e.g. in the MXF header metadata and in the video essence. The GetMaterialTimecode() method returns the timecode in the MXF header metadata's Material Package. If there is no timecode then GetMaterialTimecode() returns a 00:00:00:00 timecode. Use HaveMaterialTimecode() to check that the timecode exists in the file.
You can see what that value should be by using MXFlibs mxfdump for example; look for the Timecode Component in the Material Package.
I don't know where MediaInfo is extracting the timecode. It might be finding a timecode in the video essence which bmx is not reading.
Philip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
bmx (and libMXF) only reads timecode from the MXF wrapper. The timecode you are referring to is in the DV essence, which bmx does not read. The bmxparse utility shows the information that is extracted from raw essence when wrapping using raw2bmx.
Generally I would expect MXF readers to use the timecode in the MXF wrapper, e.g. the Material Package timecode, and ignore any timecode that might be in the essence. MediaInfo should be showing the MXF timecode. See EBU MXF Timecode Implementation for a description of timecode in MXF.
Philip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
I try to get some metadata from OP1A MXF files including time code of first frame.
I use bmx::MXFFileReader GetMaterialTimecode(), GetSourceTimecode().
It works fine, but some files reports 00:00:00.00 timecode.
However MediaInfo reports 00:00:00:01 in video stream.
It is critical for me.
Maybe it is wrong way?
Prompt please where to go.
Thanks.
A MXF file can have several timecodes in different places, e.g. in the MXF header metadata and in the video essence. The GetMaterialTimecode() method returns the timecode in the MXF header metadata's Material Package. If there is no timecode then GetMaterialTimecode() returns a 00:00:00:00 timecode. Use HaveMaterialTimecode() to check that the timecode exists in the file.
You can see what that value should be by using MXFlibs mxfdump for example; look for the Timecode Component in the Material Package.
I don't know where MediaInfo is extracting the timecode. It might be finding a timecode in the video essence which bmx is not reading.
Philip
Thanks Philip for quick answer.
Maybe not bmx, but mxf or mxfpp will help me?
I try to get timecodes:
// time codes
if (fr->HaveMaterialTimecode())
test_info->material_time_code = fr->GetMaterialTimecode();
if (fr->HaveFileSourceTimecode())
test_info->file_source_time_code = fr->GetFileSourceTimecode();
if (fr->HavePhysicalSourceTimecode())
test_info->physical_source_time_code = fr->GetPhysicalSourceTimecode();
if (fr->HavePlayoutTimecode())
test_info->playout_time_code = fr->GetPlayoutTimecode();
if (fr->HaveSourceTimecode())
test_info->source_time_code = fr->GetSourceTimecode();
But they all reports 00:00:00:00.
I tried MXFDump.exe and mxf2raw.exe. Unfortunately they skip over (timecode component is located on file offset 0x0002B46A).
...
I try MediaInfo details mode and get information:
....
I see the timecode component on 0002B46A offset.
I got the same offset while debuging MediaInfo with MS Visual Studio.
I can not use MediaInfo because this is very very slow.
I will be glad to any information on this topic.
Thanks in advance.
bmx (and libMXF) only reads timecode from the MXF wrapper. The timecode you are referring to is in the DV essence, which bmx does not read. The bmxparse utility shows the information that is extracted from raw essence when wrapping using raw2bmx.
Generally I would expect MXF readers to use the timecode in the MXF wrapper, e.g. the Material Package timecode, and ignore any timecode that might be in the essence. MediaInfo should be showing the MXF timecode. See EBU MXF Timecode Implementation for a description of timecode in MXF.
Philip
Much thanks, Philip.