Skip to main content

Recasting

Recasting publishes the current media to another endpoint while STView is playing it. Use it to forward a stream to a UDP, SRT, WHIP, or LL-HLS receiver without leaving the STView review workflow.

Recasting

Configure recasting from the Recast tab in File > Open Stream. After the stream is open and playback is running, use the Recast button in the transport controls to start or stop the output. Recast is not available for file sources: the Recast tab is disabled in Open File, and the transport button is hidden during file playback.

Pattern sources support all four destinations using Original source with H.264 or H.265. Use WebRTC Transcode for H.265 Patterns; H.264 can also use Passthrough. LL-HLS offers MPEG-TS or fMP4 segments and the same metadata options as other Original sources. AV1 Pattern recasting is not supported.

Basic workflow​

  1. Open File > Open Stream.
  2. Select the source on the Source tab.
  3. Open the Recast tab.
  4. Enable Enable Recast.
  5. Choose the Recast Source: Original or Flywheel.
  6. Choose the target Protocol.
  7. Enter the target address or WHIP endpoint. For LL-HLS, optionally enter a reusable Playback URL and configure its local listener. If you leave the URL blank, STView chooses one when Recast starts.
  8. Configure protocol-specific options if needed.
  9. Open the source, start playback, then press Recast in the transport controls.

The Recast button is disabled until playback is active and Recast is configured.
Press the Recast button to start operation.

Recasting-button

When recasting is active, the Recast button indicates the active state, and the status bar displays the current state, bitrate, and additional information in the tooltips.

Target protocols​

ProtocolUse when
UDPYou need MPEG-TS output to a unicast or multicast UDP address.
SRTYou need MPEG-TS output over SRT with caller, listener, or rendezvous connection setup.
WHIPYou need to publish to a WebRTC ingest endpoint such as a media server, SFU, or CDN.
LL-HLSYou need an HTTP playlist with partial segments for low-latency playback.

For UDP, choose a Network Interface when the output must leave through a specific adapter, especially for multicast. Auto lets the operating system and SDK choose the route.

For SRT, configure:

  • Connection Mode: Caller, Listener, or Rendezvous.
  • Latency (ms) for SRT retransmission tolerance.
  • Poll Timeout (ms) for socket state polling.
  • Optional Stream ID.
  • Optional Passphrase and Key Length when the receiver uses SRT encryption.

For WHIP, enter a full http:// or https:// endpoint. WHIP uses WebRTC signaling and has additional video and KLV options in Recast config.

LL-HLS​

Choose LL-HLS for either Original or Flywheel Recast. STView hosts the playlist at a configurable HTTP(S) playback URL. After starting, open Session > Recasting and copy the playback URL.

Start an LL-HLS target​

  1. Open File > Open Stream, choose a live source, and enable Enable Recast on the Recast tab.
  2. Choose Original to forward compatible source media, or Flywheel to use the configured Flywheel encoder. Select LL-HLS as the protocol.
  3. Choose Segment format. For a new browser integration, start with Fragmented MP4 (CMAF) and a receiver that reads STView's KLV sidecar. Choose MPEG-TS when the receiver expects KLV inside the transport stream.
  4. Enter a Playback URL, for example http://127.0.0.1:56700/live/camera1/index.m3u8. Keep Listen address at 127.0.0.1 for a test on this computer. Leave the URL blank to let STView choose an address automatically.
  5. Keep the default timing settings initially. For Flywheel, make sure its keyframe interval fits the segment duration; at 30 fps, 30 frames is one second and 60 frames is two seconds.
  6. Open the source, wait for playback, and press Recast in the transport controls. Open Session > Recasting and use Copy playback URL.
  7. Open that URL in an LL-HLS-capable receiver. For CMAF metadata, also use Copy metadata URL or a receiver that discovers the adjacent sidecar.

The Playback URL sets the advertised hostname, media port and stream path. It must start with http:// or https:// and end in /index.m3u8; path components may contain letters, digits, underscores and hyphens. If the port is omitted, HTTP uses 80 and HTTPS uses 443. Credentials, query strings and fragments are not supported. When the URL is set, Playback hostname / IP and Media port show its values and cannot be edited separately. STView serves this address locally; entering a remote server URL does not upload the stream there. Listen address must select an interface on the STView computer. The hostname must resolve to that listener from the receiver.

A configured URL is reusable across restarts. It redirects to the current output only after that output starts successfully; before the first successful start, it does not serve a playlist. Clients must follow redirects and resolve relative playlist and sidecar resources against the final response URL. Existing clients can finish the previous output; reopen the stable URL to join the new output. The SDK sample handles this for both media and KLV.

Select media and KLV delivery​

  • MPEG-TS keeps KLV embedded with video and audio. The receiver must support MPEG-TS partial segments and MISB KLV.
  • Fragmented MP4 / CMAF publishes video and AAC audio renditions, with raw KLV in timestamped JSON sidecar resources. Copy the metadata URL for a custom receiver. This sidecar is an STView contract; generic HLS players play the media but do not automatically display it.

MP4 is not mandatory for LL-HLS; both formats are implemented. Support for partial segments and KLV still depends on the receiver. Selecting CMAF does not embed KLV in MP4. The sidecar preserves raw KLV bytes, source PID, timing classification and timestamps when available; untimestamped packets remain untimestamped. A custom receiver must schedule timestamped metadata against video playback. The supplied SDK player demonstrates both approaches.

Listener and timing settings​

SettingDefaultMeaning
Playback URLEmptyOptional stable HTTP(S) URL ending in /index.m3u8; sets playback hostname and media port.
Segment formatMPEG-TSTS with embedded KLV, or CMAF with a KLV sidecar.
Listen address127.0.0.1Local IP address on which STView accepts media requests.
Playback hostname / IP (optional)EmptyAddress placed in the receiver URL; defaults to the listen address when it is a specific IP. Required for a wildcard listener unless Playback URL supplies it.
Media port (0 = automatic)0Available port chosen by STView, or a fixed port from 1 to 65535.
Segment duration (ms)2000Segment target from 1000 to 10000 ms; source keyframes must fit this interval.
Part duration (ms)200Partial-segment target from 100 to 1000 ms. Segment duration must be at least three times this value.
Live window (segments)15Configured window from 6 to 120 segments; the publisher also retains at least three target durations.
TLS certificate path (optional)EmptyLocal PEM certificate file for HTTPS.
TLS private key path (optional)EmptyMatching PEM key file; required together with the certificate.

The default bind address is 127.0.0.1, for receivers on the same computer. To serve other computers, select a local network address and a reachable advertised hostname or IP. Wildcard bind addresses require an advertised host, supplied directly or by Playback URL. Port 0 chooses an available port. The media listener serves only published resources; it does not expose the application's management or automation API.

For example, if this computer's LAN address is 192.168.1.20, listen on that address and choose port 8088. Leave the playback hostname empty to use the same IP. Another computer can then use the copied URL, provided the port is reachable through the host firewall. Enter an address actually assigned to the STView computer; changing the advertised hostname alone does not change where the listener binds. 127.0.0.1 on a remote receiver refers to that receiver, not to the STView computer.

The defaults are 2-second segments, 200-millisecond parts and a 15-segment playlist window. Original-source keyframes must occur at least as often as the configured segment duration; Flywheel's encoder keyframe interval must also fit. Actual latency depends on the source, encoder, network and receiver.

For HTTPS, provide both a PEM certificate path and its private-key path. HTTPS enables HTTP/2; plain HTTP is useful for local development. A receiver must trust the certificate and be able to reach the advertised address.

Use a certificate valid for the advertised hostname. If a reverse proxy serves the stream, it must preserve playlist query parameters and allow blocking requests to remain open. A static file server or a proxy that buffers or caches live playlists incorrectly can remove the low-latency behavior.

CMAF publication requires the GStreamer isobmff plugin with cmafmux. Video must be H.264 or H.265, with AAC for the separate CMAF audio rendition. Codec playback support depends on the receiver; H.264 8-bit 4:2:0 and AAC are a portable browser test combination. Unsupported codecs or missing plugins are reported as output errors.

Stopping publishes an end marker and retains the output for two minutes so connected clients can finish reading. A configured Playback URL stays the same across starts. With the field empty, a new start receives a new publication URL, even when it reuses the same port. Published-byte counters measure generated media, not bytes downloaded by every receiver.

The SDK repository includes samples/ll_hls_player, runnable from its VS Code STView: LL-HLS player (TS / CMAF + KLV) launch configuration. It demonstrates both metadata paths and reports partial-segment downloads and live latency.

Verify playback and diagnose problems​

In the sample player, confirm that video advances, Parts loaded increases, and KLV appears when the source or Flywheel supplies it. The displayed live latency is a measurement, not a guarantee. An ordinary HLS receiver may wait for whole segments and therefore play farther behind the source.

SymptomCheck
Receiver cannot connectConfirm Recast is active, use the newly copied URL, and check bind address, advertised host, port and firewall reachability.
HTTPS failsSupply both certificate files and verify that the receiver trusts the certificate and its hostname matches.
Output reports missing cmafmuxThe runtime needs the GStreamer isobmff plugin for CMAF; MPEG-TS uses a different publication path.
Output reports a keyframe interval errorReduce the source/Flywheel keyframe interval or increase segment duration within the supported range.
Video plays but KLV is absentConfirm the source contains KLV or Flywheel generates it. For TS, the receiver needs embedded KLV parsing; for CMAF, it must read the sidecar.
Media resources load but video is blankCheck browser codec support; try H.264 8-bit 4:2:0 with AAC. Successful publication alone does not guarantee decoding.
Latency is highCheck source/encoder buffering, partial-segment support and proxy caching. Smaller parts alone do not guarantee lower latency.
An old playback URL stops workingAutomatic URLs expire after the stopped output's grace period. Configure Playback URL for a reusable address, and reopen it after restarting.

Output errors appear in Session > Recasting independently of playback status. Starting successfully can initially show a connecting state while the publisher waits for usable media and the first independent video frame.

Original source recasting​

With Source set to Original, Recast publishes from the media source rather than from the composed viewer. This is the lowest-overhead path when you want to forward the input stream itself.

UDP and SRT recast targets are always MPEG-TS outputs. For WHIP targets, open Recast config to choose:

  • Video mode: Transcode or Passthrough.
  • WebRTC codec: H.264, VP8, or VP9.
  • Video bitrate and Keyframe interval when transcoding.
  • KLV data channels: Disabled, Raw, JSON, or Raw + JSON.

Use WHIP passthrough only when the source video is already compatible with the selected WebRTC codec and the receiver can accept it. Use transcode when the source codec or target codec requires re-encoding.

Using Recasting With Flywheel​

Set Source to Flywheel when the recast target should receive the Flywheel program feed instead of the original source.

Flywheel affects recasting in these ways:

  • Recast uses the Flywheel codec, CBR/VBR mode, target and maximum bitrate, keyframe interval, frame rate, width, and height settings from the Flywheel tab. CBR is the default; maximum bitrate is configurable for VBR.
  • The output is re-encoded from the Flywheel path, so source video passthrough is not used.
  • In the current STView recast path, Flywheel source recasting is started without overlay burn-in for the recast output.
  • UDP and SRT targets always receive Flywheel MPEG-TS output. This output is not suitable for reopening in STView as an MPEG-TS source.
  • WHIP targets receive a WebRTC output generated from the Flywheel path.
  • LL-HLS targets publish the Flywheel feed as TS parts with embedded KLV, or CMAF parts with a separate timestamped KLV sidecar.
  • Recast configuration for original-source WHIP video mode does not apply to Flywheel source recasting; the Flywheel path is always encoded.

Enable and configure Flywheel before selecting it as the Recast source. For more information about the Flywheel output path, see Flywheel.

Monitoring and stopping recast​

Use the transport Recast button to stop an active recast before changing source, closing STView, or changing the Recast configuration.

An SRT recast remains active when its receiver is offline or the connection is interrupted. STView discards output packets while the target is unavailable and keeps trying to reconnect. Playback and the Recast controls remain responsive, and the main status plus the Recasting session show the connection error. The error clears automatically after the receiver connects again.

Stopping Recast successfully clears the connection error from the main status and the Recasting session. A stop failure remains visible so you can diagnose the output shutdown problem.

If Recast fails to start or stops unexpectedly, check the error message shown by STView and verify the target URI, network route, receiver state, license option, and protocol-specific settings. For SRT, verify that both sides use compatible connection modes and encryption settings. For WHIP, verify that the endpoint is reachable and accepts the selected codec and KLV data-channel mode.

Output status indicators​

The status bar places Recast after playback Status, followed by Recorder. Indicators appear when an output starts and remain visible after an error until you stop it, retry, or close the source.

  • Active: a green dot with measured bitrate for Recast or recorded size in MB for Recorder, using the same text color as Framerate and KLV Rate. Multiple active outputs show their combined bitrate or size; the tooltip lists each separately.
  • Orange � Connecting / Starting: the initial operation is in progress. An SRT Listener can wait for its first peer without becoming an error.
  • Orange � Waiting for data: the output is running without recent traffic.
  • Red � Disconnected: an established SRT or WHIP connection was lost.
  • Red � Error: starting, writing, sending, or stopping the output failed.

Hover or keyboard-focus an indicator for the destination, Original/Flywheel source, measured bitrate, current error, and timestamped last error. Recorder also shows recorded size, with separate details for each recording. Recovery clears the current error and restores green when traffic resumes; the previous error remains in the tooltip until restart or successful stop. Output errors do not replace the playback status message.

Rates refresh once per second over the latest three seconds. They measure transport output or recording file growth, not the configured encoder bitrate. No traffic for three seconds reports zero; unavailable or stale measurements show Bitrate unavailable. Buffered file writes may make recording rates arrive in bursts. UDP sending confirms local transmission, not receiver delivery. Successful stop hides the indicator and clears its error history.

For a running UDP or SRT MPEG-TS source, Original Recast uses the packets already received by playback. It does not open a competing receiver. UDP sends without a connection or acknowledgement: Waiting for data means no recent output bytes, not that STView is waiting for the target to connect.