STREAM_TYPE(1)
β¨ stream-type β guess the type of a stream file, bestie β¨
okay so real talk, this is the stream-type page from the General Commands Manual π she's a little detective who looks at a mystery stream file and is like "hmm. i know what you are." π΅οΈββοΈβ¨
π NAME π
stream-type β guess the type of a stream file π
πΈ SYNOPSIS πΈ
stream-type [-err stdout] [-err stderr] [-verbose | -v] [-quiet | -q]
in_file
π DESCRIPTION π
So the whole vibe is: she tries to figure out whether your input stream is a Transport Stream, a Program Stream, or an Elementary Stream β and if it's that last one, whether it's H.262 or H.264 (aka MPEG-2 or MPEG-4/AVC respectively, iykyk). π₯
ngl the mechanisms she uses are fairly crude π like she's not doing forensic science, she's doing vibes-based guesswork. Here's what she's assuming:
- data is byte aligned π§
- for TS, the first byte in the file will be the start of a NAL unit, and PAT/PMT packets will be findable π
- for PS, the first packet starts immediately at the start of the file, and is a pack header π
- if the first 1000 packets could be H.262 or H.264, then the data is assumed to be H.264 β because the program doesn't try to determine sensible sequences of H.262/H.264 packets, so this is a reasonable way of guessing π€·ββοΈ
β οΈ bestie listen β it is quite possible that data which is not relevant will be misidentified. she's guessing!! don't come for her π
π Files π
in_fileβ is the file to analyse π¦
π Switches π
-err stdoutβ write error messages to standard output (this is the default btw β¨)-err stderrβ write error messages to standard error (the Unix traditional way, old school iconic π)-v,-verboseβ output more detailed information about how it is making its decision π (she's telling you her whole thought process, main character energy)-q,-quietβ only output error messages π€«
π RETURN VALUES π
the exit value is literally her whole answer, so here's the decoder ring:
10β if it detects Transport Stream11β if it detects Program Stream12β if it detects Elementary Stream containing H.262 (MPEG-2)14β if it detects Elementary Stream containing H.264 (MPEG-4/AVC)5β if it looks like it might be PES9β if it really cannot decide π0β if some error occurred π
π SEE ALSO π
okay that's the whole page bestie, go forth and identify those streams π«Άβ¨ this was the Debian edition, dated October 28, 2015 β mwah, slay, periodt π π
π¦ 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