ESFILTER(1)
β¨ ESFILTER(1) β¨
okay bestie, welcome to the esfilter page from the General Commands Manual, section 1. this one's giving "output a filtered or truncated version of an elementary stream" and honestly? it ate. let's get into it π
πΈ NAME πΈ
esfilter β output a filtered or truncated version of an elementary stream π¦
π SYNOPSIS π
esfilter -copy | -filter | -strip [-err stdout] [-err stderr]
[-verbose | -v] [-quiet | -q] [-host dest_ip[:port]]
[-max max_frames | -m max_frames] [-freq keep_frequency]
[-allref] [-tsout] [-pes | -ts] [-h264 | -avc | -h262] in_file
| -stdin out_file | -stdout
π DESCRIPTION π
so what this does is: it outputs a filtered or truncated version of an elementary stream. that's the whole vibe. the input is either H.264 (MPEG-4/AVC) or H.262 (MPEG-2), and the output is either an elementary stream, or an H.222 transport stream.
heads up bestie: if the output is going to an H.222 Transport Stream, then fixed values get used for the PMT PID (0x66) and the video PID (0x68). no cap. π₯
π Files π
in_fileβ this is your input elementary stream (but peek at-stdinbelow, okay?).out_fileβ this is your output stream, either an equivalent elementary stream, or an H.222 Transport Stream (but see-stdoutand-hostbelow).
π¬ Actions π¬
-copyβ copies the input data straight to the output file. it's mostly useful as a way of truncating data with-max. lowkey just a lil photocopier.-filterβ filters data from input to output, aiming to keep every keep_frequencyth frame (where keep_frequency is specified by-freq). the way it's out here cherry-picking frames... iconic.-stripβ for H.264, outputs just the IDR and I pictures; for H.262, outputs just the I pictures β but bestie, check-allrefbelow first, fr fr.
π Switches π
-err stdoutβ write error messages to standard output (this is the default).-err stderrβ write error messages to standard error (Unix traditional, very old money of it).-stdinβ input from standard input, instead of from a file.-v,-verboseβ output extra information about packets. nosy girlie behavior and I respect it.-q,-quietβ only output error messages. silent but deadly.-host dest_ip[:port]β writes output (over TCP/IP) to the named host, instead of to a named file. if port isn't specified, it defaults to88. implies-tsout. it's networking, periodt.-max max_frames,-m max_framesβ maximum number of frames to read (for-filterand-strip), or ES units/NAL units (for-copy). that's your cap, bestie.-freq keep_frequencyβ specify the frequency of frames to try to keep with-filter. defaults to8.-allrefβ with-strip, keep all reference pictures (H.264) or all I and P pictures (H.262). greedy in the best way π-tsoutβ output data as Transport Stream PES packets (the default is as Elementary Stream).-pes,-tsβ the input file is TS or PS, to be read via the PES->ES reading mechanisms. not allowed with-stdin. π«
π§ Stream type: π§
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 or H.262 data. this process may occasionally come to the wrong conclusion π, in which case the user can override the choice using the switches below.
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. main character energy: you have to tell it what's up.
-h264,-avcβ force the program to treat the input as MPEG-4/AVC.-h262β force the program to treat the input as MPEG-2.
π SEE ALSO π
and that's the whole page bestie!! this cutie came from Debian and it's dated October 28, 2015 β so yes, it's a vintage, and yes, it still slays. go filter something, mwah π«Άπ β¨
π¦ 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