Jump to content

How to Convert mm:ss:ff to Bytes?


calweycn
 Share

Recommended Posts

Converting to bytes won't really help. The time versus the size of in bytes is based on the compression used in the video. If you want to know the bytes, you'd have to check out the disc size. Or the size of the stream.

 

 

If you want to do any conversion, just drop the Frames (ff) all together and divide the mm's by 60 to get hours, etc.

Link to comment
Share on other sites

Those MSF times are from the old CD days where 74mins = 640mb, 80 mins = 700mb etc...

It's nothing to do with the length of a bit of video.

Thanks, LUK. I knew it had nothing to do with the actual DVD length, but I

should have guessed it was based on CD. Do you know how many frames

are in a second of CD audio? I think 75. How does your program convert

bytes to MSF, or is it based on something else? Regards

Link to comment
Share on other sites

Yeah 75 sounds about right.

These figures still don't add up for me. A 700 MiB CD should only hold

69.3 minutes of music, not 80. Each minute takes up ~10.1 MiB. (2352

bytes per frame. 75 frames/sec. 60 sec/min.) The MSF is always more

than it should be, according to these figures. WTF?

 

See third paragraph here...

http://www.beatjapan.org/mirror/www.be.com...er/Issue66.html

Link to comment
Share on other sites

Going by this...

 

PLEXTOR DVDR   PX-760A 1.04 (ATA)
Current Profile: CD-R

Disc Information:
Status: Empty
Erasable: No
Free Sectors: 359,847
Free Space: 736,966,656 bytes
Free Time: 79:59:72 (MM:SS:FF)

 

359,847 Sectors = 359,847 Frames (FF).

 

+ 150 FF for 2 second leadin

 

= 359,997 Frames

 

359,997 % 75 = 72 (FF)

 

(359,997 - 72) / 75 = 4799 Seconds

 

4,799 % 60 = 59 (SS)

 

(4,799 - 59) / 60 = 79 (MM)

 

Giving us 79:59:72

 

and 359,847 sectors * 2048 bytes per sector = 736,966,656 bytes = 719,694 KB = 702.826171875 MB

 

The size is calculated using 2048 byte sectors, not 2352.

Link to comment
Share on other sites

The size is calculated using 2048 byte sectors, not 2352.

That's what I calculated, but it should take 2352 bytes per frame to give

CD quality audio. Unless it's compressed to 87% size... So, that's still a

mystery, how they squeeze 2352 bytes into 2048. Plus, eight to fourteen

modulation should increase the bit rate even more.

 

http://en.wikipedia.org/wiki/Eight-to-Fourteen_Modulation

Link to comment
Share on other sites

All CDDA is 2352 bytes per sector.

 

Maybe I just don't get where you're going with all this!

 

The 1 CD = 700mb (of data) = 80mins (of audio) is based on 2048 bytes per sector for the 'data' side.

 

If you're talking image sizes for 80 mins of audio data, it would be something like a 750mb file.

Link to comment
Share on other sites

All CDDA is 2352 bytes per sector.

 

Maybe I just don't get where you're going with all this!

 

I didn't understand how a 700 MiB CD can hold 80 minutes of CDDA,

when it should only hold 69:20 (assuming 2352 bytes per frame). I

knew that DVD sectors were 2048 bytes. I didn't know that the lead

in wasn't included, so that was nice to know. DVDs apparently have

the same 150 sector lead-in. Now the numbers add up.

 

Your use of modulo (remainder) made it more clear. Thanks.

Link to comment
Share on other sites

Yeah just get away from thinking of disc in terms of MB.

 

It's all about sectors and so the actual MB capacity depends on the sector size you use.

 

2048 being the smallest, only gives you (for example) 650mb or 700mb.

 

If you up it to 2352 you get much more data on the same disc.

 

That's how CDDA is burnt and so that's why audio images can be larger than the 650mb / 700mb limits you're expecting.

 

DVDs don't really have a leadin in the same way CD's do.

 

For a CD burn you actually start burning (all be it mainly a bunch of zeros) at LBA -150. For DVD you always start at LBA 0.

 

That's not to say the drive doesn't automatically do the leadin part.... but then to me (as the software programmer), I don't really need to know exactly what the drive does for a leadin, I just need to know I start burning at LBA 0.

Link to comment
Share on other sites

  • 4 weeks later...

The 2352 sector is the entire sector size. However a normal data cd will only use 2048 for actual data. The remaining 304 is used for sub-channel data and error correction bits. If you ever check a full videocd that uses the full 2352 sector for data then you will see that it shows it as having approximately 800MB on it instead of the 700MB that the disc is advertised to hold. A friend of mine didn't believe me until I brought in a disc I made and showed it to him.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.