2

I'm writing a script to test some .ts files. At this point, I want to judge if each .ts file has any content. So I need to know the minimum size of a 360p quality .ts file (let's say it's just 0.00001s). So can anyone tell me the minimum size of a .ts file in 360p quality? Or is it just 0Byte?

Chris Han
  • 58
  • 1
  • 4

1 Answers1

1

0 bytes is "valid" in that it is a TS file that exists, but does not contain content. The minimum size of a 'parseable' TS file will be 188 bytes. TS is broken into 188 bytes packets and padded if smaller. But a 188 byte TS file will not be playable. You at least need a PAT and PMT. But it still does not contain any video (or audio) The smallest video frame I have ever created was 603 bytes (64x64 pix) here. Plus we need at minimum TS header(4) + AF/PCR(8) + PS Header w/ PTS(13). 603 + 4 + 8 + 13 = 628 / 188 =~ 3.34. Rounded up to 4 packets plus PAT and PMT. 188 * 6 = 1128 bytes. A single audio packet will not likely take more that one packet, so add another 188 for that.

Community
  • 1
  • 1
szatmary
  • 29,969
  • 8
  • 44
  • 57