ES2TS(1)
π ES2TS(1) π
okay bestie, welcome to the es2ts era β she's a General Commands Manual girlie and she is so good at what she does. buckle up, we're turning elementary streams into transport streams and it's gonna be iconic β¨
πΈ NAME πΈ
es2ts β convert an ES video stream to H.222 TS. that's it. that's the whole job. and she ate. π
β¨ SYNOPSIS β¨
es2ts [-err stdout] [-err stderr] [-verbose | -v] [-quiet | -q]
[-pid pid_no] [-pmt pmt_pid_no] [-host host[:port]]
[-max max_units | -m max_units] in_file | -stdin out_file |
[-stdout]
yes the synopsis is giving choose your own adventure and honestly? we love that for her π¦
π DESCRIPTION π
so basically she takes an elementary video stream and converts it into an H.222 transport stream. no cap.
she supports input streams that conform to MPEG-2 (H.262), MPEG-4/AVC (H.264) and AVS. she also supports MPEG-1 input streams, insofar as MPEG-2 is backwards compatible with MPEG-1. (which it is. that's the whole point of backwards compatible. periodt.)
not me about to drop the most important lore: this program works by reading and packaging the elementary stream packages directly β it does not parse them as H.262 or H.264 data. she's a packager, not a parser. know the difference, bestie π
π Files π
in_fileβ is a file containing the Elementary Stream data (but see-stdinbelow, she has options)out_fileβ is an H.222 Transport Stream file (but see-stdoutand-hostbelow, again: options)
π§ Switches π§
-err stdoutβ write error messages to standard output. this is the default, lowkey the normie choice and that's fine π«Ά-err stderrβ write error messages to standard error. the Unix traditional one. vintage. old money. highkey valid π-v,-verboseβ output summary information about each ES packet as it is read. she will not stop talking and honestly? we're listening π-q,-quietβ only output error messages. the "i'm not mad i'm just disappointed" setting π-pid pid_noβpid_nois the video PID to use for the data. use-pid 0x<pid>to specify a hex value. [default = 0x68]-pmt pmt_pid_noβpmt_pid_nois the PMT PID to use. use-pmt 0x<pid>to specify a hex value. [default = 0x66]-max max_units,-m max_unitsβ maximum number of ES data units to read. she'll stop when she's done and she will respect your limits β-stdinβ input from standard input, instead of a file. pipe it in, bestie π-stdoutβ write output to<stdout>, instead of a named file. this forces-quietand-err stderr. she said "if we're doing stdout we're doing it my way." π-host host[:port]β writes output (over TCP/IP) to the named host, instead of to a named file. ifportis not specified, it defaults to 88. she's networking. she's social. she's booked and busy π
π Stream type π
when the TS data is being output, it gets flagged to indicate whether it conforms to H.262, H.264 or AVS. it is important to get this right, because it will affect interpretation of the TS data. like, this is not a vibe check you can skip. this one matters π₯
if input is from a file, then the program will look at the start of the file to determine if the stream is H.264, H.262 or AVS. this process may occasionally come to the wrong conclusion, in which case the user can override the choice using the following switches. she's smart but she's not omniscient, okay? give her a break π
if input is from standard input (via -stdin), then it is not possible for the program to make its own decision on the input stream type. instead, it defaults to H.262, and relies on the user indicating if this is wrong. so like... speak up. use your words. tell her what she's working with π«Ά
-h264,-avcβ force the program to treat the input as MPEG-4/AVC. π-h262β force the program to treat the input as MPEG-2. π-avsβ force the program to treat the input as AVS. π
π SEE ALSO π
(yes that's the whole list. she's a one-recommendation girl. loyal.)
π BUGS π
for the moment, the video input must be H.264 or AVS, and the audio input ADTS, AC-3 ATSC or MPEG layer 2. also, the audio is assumed to have a constant number of samples per frame. so no funny business with the samples. she's counting. she will notice. π
and that's the whole page, bestie β every flag, every default, every dramatic caveat, all of it, preserved in amber β¨
this has been ES2TS(1), from the Debian era, dated October 28, 2015. go forth and convert. slay. πππ¦
π¦ where this page comes from
- debian bookworm: tstools 1.13~git20151030-6 Β· MPL-1.1
- debian trixie: tstools 1.13~git20151030-6 Β· MPL-1.1
- ubuntu jammy: tstools 1.13~git20151030-5 Β· MPL-1.1
- ubuntu noble: tstools 1.13~git20151030-6 Β· MPL-1.1
- ubuntu questing: tstools 1.13~git20151030-7
- ubuntu resolute: tstools 1.13~git20151030-7build1 Β· MPL-1.1
- ubuntu stonking: tstools 1.13~git20151030-8 Β· MPL-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms