Time position of a file

can anybody tell me how to locate the time position and the time duration of a file into a disc?

i mean that the disc is 70 min long and there is a file inside this disc. Can i tell where in the timeline is this file located?

If it’s a CD-ROM:

Parse the ISO-9660 file system to retrieve the logical block address and length of the files. Then, using the Red Book - Yellow Book specs, you can convert the LBA into an A-Time.


thank you very much for the info but i really didn’t understand a lot. can you please be more specific on how to achieve these you describe?

xbass540, assuming you know how to write code you can do what you ask for with your own software.

You should get the ISO-9660 spec (or ECMA-119). In this spec you will learn the layout of the file system pointers that are on a CD. Once you understand this, you can find the starting LBA for each file on the disc. This LBA can then be converted to an actual CD time (A-Time) and then you will know where in the timeline any file is on the disc. You can even go further and calcualte ‘where’ (physically) on the disc the file is. To do these last things you need to understand how data is stored on a CD (or DVD). For this you need to review the CD specs (red, yellow, etc…) or the DVD specs. There are probably free versions of these available somewhere as well.

For commanding the CD/DVD drive you can check the MMC specs. Some specs can be found at www.t10.org.

If you are not able to handle the above, you probably need to just find some software that already does it for you.


Hallo RichMan,

thanks a lot for the info. What i have done so far is:
i insert a known audio CD
i use iso buster to find the LBA starting adress and time length of a file in bytes.
since i already know the duration of the track i convert the file size and LBA value into time and so i have an indication of the time position of the track approximately.

having this equation in mind (e.g. file size,LBA—> time) i then insert the cd i want and now i can convert the file position and length into time duration.

does this look correct to you?

i mean that the problem is that i use another CD for reference and then i insert my own…

i know enough about programming but i haven’t done sth like that in the past so i found this method!

CD’s play at 75 sectors per second. So if you have a start LBA of say 4500, the time for that would be 60 seconds. It does not matter the length of the file just the start LBA. Also, audio CDs do not have any files. They have tracks.


ok correct that’s very usefull but how do i calculate the end of the file? how do i convert the file size to secs?

With the above you can find the time position of the file (where it starts). To find where it ends you would need the file size. For ROM data the sectors are usually 2048 bytes each. So divide file size by 2048 and you have how many sectors big your file is. Add that to the start LBA and you have an end LBA. You convert both start and end LBA to seconds by dividing by 75.