MPEG transport stream
lastmod 2018-08-17created 2015-09-043 edits
MPEG transport stream (abbreviated TS, TP, or MPEG-TS) is a communication protocol for transmitting audio, video, and data. It is a kind of digital container format that holds PES (packetized elementary streams) and other data. TS is specified in MPEG-2 Part 1, Systems (ISO/IEC standard 13818-1). It is also known as ITU-T Rec. H.222.0. The goal of the system is to multiplex digital video and audio and to synchronize the output. Transport stream provides error correction for unreliable media and is used in video applications such as DVB and ATSC. It contrasts with the MPEG program stream, which was developed for reliable media (with no risk of data loss) such as DVDs.
Use ffmpeg
To convert to TS files with ffmpeg:
ffmpeg -i source.mp4 -map 0 -codec:v libx264 -codec:a libfaac -f ssegment -segment_list out.list out%03d.ts
To segment the input file, and create an M3U8 live playlist to use for live HLS source:
ffmpeg -i source.mp4 -map 0 -codec:v libx264 -codec:a libfaac -f ssegment -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 out%03d.ts