Skip to main content

Lifecycle and recovery

A running Packager process can contain tasks that are starting, waiting for input, or reconnecting. Check the state of the required tasks and their media output to understand whether the pipeline is ready.

Desired state and actual state​

target_state describes whether a task should run. It defaults to started. state describes what it is doing now, as reported by the API.

Actual stateMeaning for an operator
startingThe task is attempting to start or connect. Check logs if it stays here.
waitingRequired upstream inputs or tracks are unavailable. Check dependencies and selectors.
startedThe task has started. Confirm media counters advance and the destination receives output.
congestedProcessing or delivery is under pressure. Check output throughput and queues.
stoppingA stop has been requested and is in progress.
stoppedThe task is stopped. Check its desired state before expecting it to resume.

Task dependencies determine startup readiness; their order in the configuration file does not. A downstream task can wait while its source connects and advertises tracks. An SRT listener also needs its peer to connect.

Input loss and reconnection​

Sources and sinks configured to run retry recoverable startup or connection failures. reconnect_delay_ms controls the delay between retries for those tasks. A retry cannot correct a wrong URL, missing credential, unsupported codec or unavailable device: inspect the first relevant error before adjusting delays.

When required inputs disappear, dependent processing may stop and wait for them. Selectors marked is_required and the sink's wait_for_all_sources setting affect which inputs must be available. Keep essential audio and video required so a partially connected pipeline is not mistaken for the intended program.

Reconnection restores the configured path. It does not select a backup camera or promise uninterrupted playback. Receivers may need to reconnect or buffer again; recordings can contain discontinuities. Multi-input compositions also depend on their configured sources and timing. Test source loss with your actual workflow.

Live controls and configuration changes​

ActionWhat to expectHow to keep the setting
Start or stop a task through the APIRequests a transition for that task; dependent output can be affected.Set the intended target_state in the configuration or controlling system.
Replace a task through PUTReconfigures the task and can restart media processing.Save the full task definition in the configuration or controlling system.
Send a compositor filter commandChanges a supported filter while running, such as camera position, text or volume.Update the configured filter values if they should be the startup defaults.
Restart the Packager processStarts from its configuration and operating mode.Store durable settings outside the container.

A successful API response confirms that the request was accepted. Poll task state after start/stop operations, and check the output after filter commands. PUT requires a complete task definition, not a partial patch. See runtime API updates.

API changes do not rewrite the configuration file. Filter commands can also be lost when the processing graph is recreated. For file-based operation, save the desired configuration and restart to apply it; editing a file alone is not a live-update procedure. For managed operation, make durable changes through the system that owns the tasks.

Restart and recovery checks​

Before putting a pipeline into service, test these actions with a test source and destination:

  1. Interrupt and restore the input. Check dependent task states and verify picture, audio and synchronization after recovery.
  2. Disconnect and reconnect an output. If publishing and recording together, verify each sink separately throughout the test.
  3. Restart Packager. Confirm that the intended configuration returns and reapply any live controls that your workflow needs.
  4. For recording, inspect the recovered playlist and playback across the restart.

Keep persistent recording storage mounted when recreating a container. The HLS sink can recover playlist state from the same destination; see recording recovery and retention. Allow for interruption during a single-instance restart or update. If continuous service is required, plan and test a separate redundant deployment and traffic handover.

Use Monitoring to detect missing output and repeated restarts, and Troubleshooting to isolate the first failing task.