if we open the mxf file in binary editor we can see the Duration exist in the xml header..like below
Duration value="89"
In code you can read it by opening the file
FileStream streamL =
File.Open("C:\\temp\\test.mxf", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
Then read the bytes in a loop until you find the Duration
int nBytesReadL = streamP.Read(HeaderBufferL, 0, BufferLengthL);
string zTextRepresentationL =
System.Text.ASCIIEncoding.Default.GetString(HeaderBufferL, 0, nBytesReadL);
from the above string xml you can get the duration