Live data from Hacker News

Why does MPEG Transport Stream still exist?

obe.tv

31–40 of 54 posts

Re: Why does MPEG Transport Stream still exist?

#31

Drones. EDIT: Big-boy drones.

This takes me back to when I was working on real-time digital video streaming for drones and one of the engineers I was working with had a prized mpeg-ts poster breaking out the protocol on a packet field level. We would frequently be found around that poster reviewing the interpretation of one of the packets making sure we were handling things correctly. Good times!

Re: Why does MPEG Transport Stream still exist?

#32
post #5

MPEG-TS is incorporated in many digital TV standards. They will continue to be around for a long time simply because of that, regardless of technical points.

The new ATSC 3.0 standard (NextGen TV) in the U.S. allows MPEG-TS, but prefers DASH using an OFDP wrapped UDP stream, which after hardware decoding is consumed just like any other network stream. It's really well done. Digital TV in the U.S. will eventually be like a giant, one-way WiFi signal.

Re: Why does MPEG Transport Stream still exist?

#33
> able to recover the clock of the source in order to know when to drop or duplicate video frames

So this is why I can never watch a whole movie and not have a single dropped frame!

Back in the old TV days, the TV camera set the 60 fps frequency, and if it was slightly slow at just 59.9 fps, then your TV would also run slightly slow. The whole system was synced perfectly.

Whereas now every device seems to think it can set it's own version of "60 Hz". Your GPU's 60Hz is inevitably a bit different from your displays idea of "60Hz", which in turn is a bit different from your web browsers idea of "60Hz", which is again a bit different from the livestream you're watchings version of "60 Hz". At every stage, when one clock is slightly faster, frames are dropped, and at other stages duplicate frames are inserted. End result: You can't watch a film without random occasional jitters.

Please, everyone in the AV industry: Design your shit better. We should take away your quartz crystals and force you to have only inaccurate timing devices just so you are forced to properly sync everything!

Re: Why does MPEG Transport Stream still exist?

#34
post #21
post #19

Earlier quoted context omitted.

What about bridging broadcast media to IP or vice versa? One of the advantages of MPEG-TS is that it’s dead simple to map it to RTP or even plain UDP and back even with packet loss and data errors.

Extract the PS from the TS and send that over the network.

How, in a way that preserves all the mentioned properties of MPEG-TS?

There's RTP, but I would definitely not call translating MPEG-TS to RTP and back "dead simple" (unless you're just encapsulating MPEG-TS via RFC 2250, but then you're still using MPEG-TS).

Re: Why does MPEG Transport Stream still exist?

#35

> able to recover the clock of the source in order to know when to drop or duplicate video frames So this is why I can never watch a whole movie and not have a single dropped frame! Back in the old TV days, the TV camera set the 60 fps frequency, and if it was slightly slow at just 59.9 fps, then your TV would also run slightly slow. The whole system was synced perfectly. Whereas now every device seems to think it ca…

What system(s) are you having these problems on? I haven't encountered that type of issue for years, neither on web video on my computer or smartphone, nor on streaming video (VOD and livestreams) on various smart and not-so-smart home devices.

For VOD, your playback system's clock running slightly fast or slow should not be an issue, since all buffers are under its control (it can just send disk loads, HTTP requests etc. at the pace it needs them), and for livestreaming, the most common solutions (HLS and MPEG-DASH, ultimately using MPEG-TS or fragmented MPEG-4 container files) also explicitly specify clock synchronization.

> We should take away your quartz crystals and force you to have only inaccurate timing devices just so you are forced to properly sync everything!

For livestreams, that would ultimately require synchronizing your entire video pipeline to a remote source (i.e. running your video output slightly slow/fast as required) – I'm not sure if devices like set-top boxes or streaming receivers support that, but it seems entirely impossible for anything capable of displaying two video streams (synchronized to different source clocks) at once.

Re: Why does MPEG Transport Stream still exist?

#36
"Error Resilience" / "Clock Recovery"

Don't RTMP and probably WebRTC both handle this in ~1-4 second chunks with video segments and a playlist?

For non-live content a buffer can be attempted multiple times.

Live content, yes that's an issue, but often if it's missed it's too late.

Re: Why does MPEG Transport Stream still exist?

#38

The simple answer: MPEG-TS still exists because it’s still the best media container/transport system in existence. It was designed and has evolved over a long time based on solid foundations by very smart people in the industry, across multiple institutions and professions. As opposed to the “format du jour” that was quickly thrown together by some eastern block script kiddie who saw the basic outline of an AVI file…

(FWIW, DVDs use MPEG-2 program streams, not transport streams. Both MPEG-2 part 1 systems streams, just different kinds.)

Although many DVD video recorders did use MPEG-TS (I don't even know if you can buy a new DVD recorder anymore, I assume HD recorders destroyed their market over a decade ago)

Re: Why does MPEG Transport Stream still exist?

#39
I started using mpeg_ts when I discovered that it streams well, that is, it can start randomly in the middle without much trouble. A few other formats I tried choked under this use case.

I don't know what this property is called so I don't really know how to search how well a format can start mid stream. any hints?

Re: Why does MPEG Transport Stream still exist?

#40
post #39

I started using mpeg_ts when I discovered that it streams well, that is, it can start randomly in the middle without much trouble. A few other formats I tried choked under this use case. I don't know what this property is called so I don't really know how to search how well a format can start mid stream. any hints?

The term you are looking for is ‘random access point’.

This property is more a function of the encoding parameters of the video stream. It just happens that MPEG-TS is typically encoded so as to minimize the reasonable time between RAPs.

Also, MPEG-TS streams have sync bytes every 188 bytes, making it trivial to align the bitstream and then find the RAPs. Basically the use case you are describing is just the normal operation of a broadcast decode; get a stream at some arbitrary point of broadcast and decode it.

Post reply on HN