what is difference between mp4 and mpegts?

MPEG-TS is designed for live streaming of events over DVB, UDP multicast, but also over HTTP. It divides the stream in elementary streams, which are segmented in small chunks. System information is sent at regular intervals, so the receiver can start playing the stream any time.

MPEG-TS isn’t good for streaming files, because it doesn’t provide info about the duration of the movie or song, as well as the points you can seek to.

There are some new protocols that can use MPEG-TS for streaming over HTTP, that put additional metadata in files and fix the disadvantage I talked before. These are HTTP Live Streaming and DASH (Dynamic adaptive streaming over HTTP).

On the other hand MP4 has that info in part of the stream, called moov atom. The point is that the moov must be placed before the media content and downloaded from the server first.This way the video player knows the duration and can seek to any point without downloading the whole file (this is called HTTP pseudostreaming).

Sadly ffmpeg places the moov at the end of the file. You can fix that with software like Xmoov-PHP.

Here you can find more info about pseudostreaming.

Leave a Comment