---
name: "ts_packet_insert"
section: "1"
platform: "linux"
package: "tstools"
version: "1.13~git20151030-6"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ts_packet_insert"
---

# ts\_packet\_insert(1)

Insert TS packets into a Transport Stream

## NAME

**ts\_packet\_insert** – Insert TS packets into a Transport Stream

## SYNOPSIS

**ts\_packet\_insert** \[**-err stdout**\] \[**-err stderr**\] \[**-p** *positions*\] \[**-pid** *pid\_no*\] \[**-s** **-string**\] \[**-o** *out\_file*\] *in\_file*

## DESCRIPTION

Insert TS packets into a Transport Stream at positions specified by the user.

### Input

- *in\_file*

  An H.222 Transport Stream file.

### Switches

- **-err stdout**

  Write error messages to standard output (the default)

- **-err stderr**

  Write error messages to standard error (Unix traditional)

- **-p** *positions*

  This a a colon (':') delimited string of numbers between 0 and 1, representing how far through to put each TS packet.  E.g., -p 0.1:0.4:0.7:0.9 will insert 4 packets at 10%, 40%, 70% and 90% through the file.

- **-pid** *pid\_no*

  The inserted packets will have the PID specified. \[default = 0x68\]

- **-s** *string*

  The inserted packets will contain *string* as their payload. \[default = 'Inserted packet'\]

- **-o** *out\_file*

  The new TS file will be written out with the given name \[default = out.ts\]

## EXAMPLES

ts\_packet\_insert -p 0.3:0.6 -o out.ts -pid 89 -s "AD=start" in.ts

## SEE ALSO

[esdots(1)](/esdots/1.md),
