Is it possible to embed the length of video in a transport stream?

307 views Asked by At

I noticed many players do not display video length when playing ts. Is it possible to embed the length of video in a transport stream so that video player can use that information?

1

There are 1 answers

0
n0p On

This actually does not make sense as the Transport Stream (TS) is... a stream: when you switch on your TV, it plays TS and the video never "ends".
Moreover a TS can contains several videos that are unlikely to have the same length so displaying the length of one video among other would not be relevant.

However, you can still get the duration of each video from SI/PSI tables: if there is an EIT in your TS you can parse it to get the length of each event (video).