简体   繁体   中英

Minimum size of .ts file

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM