Guides

Set up post-processing

Post-processing runs actions on your recordings after they are written, such as Convert, Thumbnail, Burn chat in or Upload. Each action is one step. An action preset stores the settings for one step; a workflow stores several steps and how they connect, so you can reuse it. You add steps or workflows to the three post-processing stages on the Pipeline tab of global, platform, template or streamer settings.

In workflow JSON and the API, an action is still called a processor, an action preset a job preset, and a workflow a pipeline preset. See the action reference and workflow reference.

Workflow DAG Simulator

Inspect parallel execution and failure-safe cleanup

DoneRecordingraw.flvDoneRemux MP4Lossless copyDoneThumbnailPreview gridDoneMove to NAS/archive/...

Remux and thumbnail generation run in parallel after recording ends, then move finished outputs to your archive folder.

Post-processing stages

On the Pipeline tab, the Timeline view shows all three stages side by side, each running automatically at a different moment of a recording. Size and duration limits split a recording into parts; a recording without limits has one part.

Each stage column shows what arrives, lists inherited steps from a template, platform or global setting with Override here and Inherit buttons, and lets you drag actions to reorder them within a stage or move them between stages (highlighting whether the target stage fits, with Undo). Below the timeline, You end up with and Removed locally summarise the local files, cloud uploads and deletions across all three stages. Switch to Stage editor (or click Graph on any stage) to edit branching workflows in the graph view.

1. While recording · every part

  • Tab: Every part.
  • Runs: Each time one file of a part finishes downloading: a video file (.flv, .ts, .mp4, .mkv, .mov, .m4s) or, when Record Danmu is on, a chat file (.xml). Video and chat files start separate runs.
  • Good for: Converting, thumbnails, extracting audio, embedding metadata, turning chat into subtitles.
  • Input: One file. Actions that work on video skip chat files and pass them on unchanged, and Chat to subtitles skips video files the same way.

2. When a part's chat is ready

  • Tab: Part + chat ready.
  • Runs: When both the video file and the chat file of the same part are ready, after that part's Every part steps have finished.
  • Good for: Burning chat into the video.
  • Input: The part's video file and its matching chat file.
  • Needs: Record Danmu turned on, on a platform that records chat. Otherwise this stage never runs.

3. When the stream ends

  • Tab: Stream ended.
  • Runs: Once, when the whole live session has ended, its final files are available and all earlier post-processing for that session has finished.
  • Good for: Merging a multi-part recording into one video, uploading everything to cloud storage (for example with rclone to Google Drive or OneDrive), moving files to an archive folder, running a final script.
  • Input: The list of all final files of the session. Parts stay separate files unless you add a Merge step to join them.
Reliability note

If chat finishes before the final video file is ready, rust-srec waits before starting When the stream ends. This keeps final steps such as uploads or cleanup from running with missing video inputs.

Which stage for which task

TaskStageAction (built-in action presets)
Convert FLV to MP4Every partConvert (Remux, Remux and Clean)
Make a thumbnailEvery partThumbnail (Thumbnail, Native Resolution Thumbnail)
Extract the audioEvery partExtract audio (Extract MP3)
Add title, streamer and date tagsEvery partEmbed metadata (Add Metadata)
Turn chat into subtitlesEvery part or Part + chat readyChat to subtitles (Danmaku to ASS Subtitles)
Burn chat into the videoPart + chat readyBurn chat in (ASS Subtitle Burn-in)
Upload each part as soon as it is readyEvery partUpload (Upload (Rclone))
Join a multi-part stream into one videoStream endedMerge (Merge Parts)
Upload the whole stream, then free the diskStream endedUpload (Upload and Delete)
Move finished files to an archive folderStream endedCopy or move (Move File)
Run your own scriptAny stageRun command (Execute Command)

Burn chat in needs a video and its chat at the same time, which Every part never provides, so it belongs under Part + chat ready (or When the stream ends, which also pairs each video with its chat). Merge needs all parts of the stream together, so it belongs under Stream ended. Steps that remove local files, such as Upload and Delete, should run in the last stage that still needs those files: a later stage cannot work on files that are already gone.

Example: MP4 recording and thumbnail

Start with a successful recording and make sure FFmpeg is available to the backend. The built-in Standard workflow already converts each part to MP4 and makes a thumbnail; add it under Every part to use it as it is, or build your own:

  1. Open Workflows and choose Create Workflow. Name it MP4 and thumbnail.
  2. Add a Convert (remux) step, set the output format to mp4, and leave source removal disabled for this first test.
  3. Add a Thumbnail (thumbnail) step and make it depend on the convert step. Select a timestamp and image width.
  4. Save the workflow, then add it to a streamer or template's Pipeline tab under Every part.
  5. Record a video part. Inspect the workflow on the Jobs page and confirm that the converted video and thumbnail exist before enabling uploads or deletion.
mermaid
Finished video part Convert to MP4 Make thumbnail

The thumbnail step receives the converted video and outputs only the thumbnail. To add an upload that receives both files, make it depend on both steps, as shown under Data routing. When Record Danmu is on, chat files also start runs under Every part; both steps skip them, and the job shows Done — nothing to do.

Example: burn chat into the video

  1. Turn on Record Danmu for the streamer, or for its template, platform or global settings, and check in the platform guide that the platform records chat. Converting chat to subtitles is built in; burning subtitles into video needs FFmpeg (included in the Docker image).
  2. On the streamer's Pipeline tab, open Part + chat ready.
  3. Add the Danmaku to ASS Subtitles action preset, then add ASS Subtitle Burn-in and make it depend on the first step.
  4. Save. After the next part is recorded, its video is re-encoded with the chat drawn on the picture and saved as a new file ending in _burnin.mp4. The original video is kept.

Burning in re-encodes the whole video and uses a lot of CPU; see the performance tip under Automatic cleanup. A part during which nobody chatted has nothing to burn in, and its jobs show the reason on the job page.

Example: back up to cloud and free the disk

  1. Configure an rclone remote that the backend can use (see the rclone action).
  2. Under Workflows, open the built-in Stream Archive workflow. It converts to MP4 and deletes the original (Remux and Clean), makes a thumbnail (Native Resolution Thumbnail) and moves both to cloud storage (Upload and Delete).
  3. Open the Upload and Delete action preset and set its destination to your remote.
  4. Add Stream Archive under Every part to upload each part as soon as it is ready. Chat files skip the conversion and thumbnail and are uploaded as they are.
  5. Test it with one recording and check the files in your cloud storage before relying on it.

Upload and Delete moves the files, so nothing is left locally for Part + chat ready or Stream ended steps. If you also burn chat in, run the backup in a later stage than the burn-in.

Recipes and setup wizard

Instead of wiring each stage by hand, you can start from Recipes or the Setup wizard right above the Timeline on any Pipeline tab, or browse and manage recipes under Pipeline → Recipes.

  • Recipes gallery: outcome-focused starting points (such as Just MP4, Burn Chat into Video, Merge into One MP4 or Back Up to Cloud & Clean Up) that fill one or more stages at once. Each card shows which stages it uses, whether required tools and Record Danmu are ready, and a live preview of the files you end up with. You can apply a single recipe with Use this, or select several recipes and click Combine & apply.
  • Linked recipes and Detach: applying a single recipe links each stage to the recipe's workflows so future edits propagate, and Recipes shows where each recipe is used. Click Detach on the timeline (or Detach (make local copy) on a linked step) whenever you want to customise a scope locally without affecting other templates or streamers.
  • Setup wizard: answer a few visual questions (video format, chat handling, extras such as thumbnails or audio, where to keep files, and local cleanup). The live Your plan panel places every step in the right stage, turns on Record Danmu automatically when needed, and lets you apply the plan directly or click Save as reusable recipe. You can also save any custom timeline setup with Save as recipe.
  • Backups: configuration export and import include your custom recipes, while older backup files without recipes continue to import unchanged.

Choosing and reusing presets

When you add a step, the Step Library groups actions by goal (Convert, Create, Chat, Upload, Organise, Clean up and Custom) and nests each action's presets underneath it. Every preset shows its input-to-output flow (such as video → MP4 or video + chat → MP4) and a plain-language summary of its settings, with your own custom presets listed first.

Action preset and workflow cards show where they are used, with links to every workflow, streamer, template, platform or global setting that relies on them. Opening a preset or workflow displays the same list at the top of the editor so you can see what a change will affect before saving.

  • Built-in presets are marked Built-in and offer Duplicate to customise so you can create your own variant without modifying the defaults.
  • Customising a single step: click a linked preset step and choose Detach & Edit to adjust its settings for that pipeline only.
  • Reusing a custom step: click Save as preset inside a step's editor to save its settings to your preset library, with the option to Link this step to the new preset so future edits apply automatically.

Warnings while editing

While you edit a stage, rust-srec checks the steps against that stage and shows warnings on the affected steps and in a list above them. Warnings never block saving or running; they point out steps that will probably never have anything to work with. Errors that would make a workflow fail, such as an action preset that does not exist or a delete step that runs alongside another step still reading the same files, still block saving.

You are warned when:

  • A step is in the wrong stage, such as Burn chat in under Every part. The warning names the stage that fits and offers Move there. Moving a step only takes effect when you save, and the confirmation offers Undo. Moving can change what happens: a burn-in that never ran will start re-encoding.
  • A step never receives a kind of file it works on, such as Remux after Thumbnail, which outputs only the picture.
  • An upload receives only thumbnails, subtitles or archives although the stage has videos to upload.
  • A step comes after one that leaves no files behind, such as a step after Delete or after an upload that moves the files.
  • A required tool is not installed: FFmpeg, rclone, rship, BaiduPCS-Go or aliyunpan (or an explicitly configured deprecated external DanmakuFactory binary) cannot be found using the step's own path setting, the tool's path variable or PATH.

Under Every part, actions that work on one kind of file show a muted note such as "skips chat files" instead of a warning, because skipping the other kind is expected there. Run command steps, and the steps after them, are not checked, because rust-srec cannot know which files a command produces.

When you add a step, the step library groups actions that suit another stage under Fits another stage better, with Add there instead and Add here anyway. Action preset and workflow cards show the stages they fit. On the Workflows page, which is not tied to a stage, the same checks run without the stage-specific ones, and there is no Move there.

Review setups

Existing setups are never changed automatically. When any global, platform, template or streamer stage, or any workflow, has warnings, the Pipeline pages show a notice with the number of affected setups. Review setups lists each one with its warnings and an Open button. Missing tools are not counted there; they are shown on the step and above the stage instead. Dismissing the notice hides it in that browser only.

Readiness banners

The Pipeline tab of global, platform, template and streamer settings shows a banner when a stage has steps that cannot run:

  • Part + chat ready has steps but Record Danmu is off, either in the form or through the inherited setting. The tab is dimmed, and Turn on Record Danmu switches the setting on in the form; save to apply it.
  • Part + chat ready has steps but the platform does not record chat.
  • A step in the stage needs a tool that is not installed.

The banner reflects unsaved edits, so it disappears as soon as you fix the cause in the form.

File-flow graph

Switching a stage to the Graph view shows how files move from step to step:

  • A Start node on the left shows what enters that stage (1 video or 1 chat file, 1 video + its chat file or All files from stream).
  • Every arrow is labelled with what flows along it—for example MP4, JPG, ASS, video / chat, or nothing after a step that removes local files.
  • Steps that delete or move local files show a red trash badge and red arrows so destructive points stand out at a glance.
  • Nodes with warnings display them directly on the card alongside one-click fixes: Move to … for a misplaced stage, and Also send MP4 (or Also send video) when an upload step is wired only after a derivative step such as Thumbnail.

Preview with last stream

On a saved streamer's Pipeline tab, click Preview with last stream to dry-run your current setup—including unsaved edits and inherited stages—against a past recording without creating jobs or changing any files on disk.

  • Pick the most recent stream or switch to an earlier one from the Preview stream selector.
  • Each stage lists how many times each step would run or skip (with the skip reason), shows expanded upload destinations with placeholders filled in from that stream, and notes when Part + chat ready would not run or when required tools are missing.
  • The Simulated outcome summary at the bottom totals what would be Kept locally, Uploaded / Copied and Removed locally.

Jobs with nothing to do

A job that finishes without working on any of its files shows Done — nothing to do instead of Completed, and a job that skipped some of its files shows Partially skipped. Neither is a failure, and there is nothing to retry. The job page lists each skipped file, why it was skipped, and whether it was passed on unchanged to the next step. Common reasons are:

  • the file is the wrong kind for the action, such as a chat file given to Convert;
  • the video has no picture (for a thumbnail) or no audio track (for audio extraction), or the file is already an image;
  • there is no subtitle for the video, or its subtitle was already burned into another copy;
  • nobody chatted during that part, so there was nothing to turn into subtitles;
  • only one video part was recorded, so Merge had nothing to join;
  • the file was excluded by a filter, is already unchanged on the remote, or no longer exists;
  • the step received no files from earlier steps.

Workflow and session views count the steps that had nothing to do, and a workflow in which every step had nothing to do shows Done — nothing to do too. When Part + chat ready did not run for some parts because they had no chat, the session page says so. These states are shown in the interface only; no notification is sent. Jobs from earlier versions have no recorded reasons and show Completed.

Data Routing

Dependencies control both when a step can run and which file paths it receives:

  1. Every root step (a step with no dependencies) receives the stage's original input list.
  2. A non-root step waits for all of its direct dependencies to complete.
  3. Its input list is the merged, de-duplicated output list from those direct dependencies, in depends_on order.
  4. Outputs from transitive ancestors are not inherited automatically.

For a chain A -> B -> C, step C receives only the outputs reported by B. It does not also receive the outputs reported by A. This prevents replaced, deleted, or unrelated intermediate files from leaking into later steps.

What each action outputs also matters:

  • remux outputs the converted file; compression outputs the archive it wrote, not the files it archived.
  • merge outputs the single merged video (plus non-video companion files when Pass Non-Video Files On is enabled); when only one video part was recorded, it skips merging and passes its inputs through unchanged.
  • Derivative actions such as thumbnail and audio_extract output only the generated derivative, not their source file.
  • rclone and rship copy and sync pass their local input paths through; move produces no local outputs because it consumes the local files.
  • baidupcs and aliyunpan pass their local input paths through, unless Delete local files after upload is enabled, in which case the consumed files are dropped from their outputs.
  • ass_burnin outputs the burned videos. With Passthrough Inputs enabled it also passes its inputs through; with it disabled, the videos it left untouched (no matching subtitle, or a second copy of a recording whose subtitle was already burned) stay in its outputs, while subtitles and burned sources are dropped.
  • delete produces no outputs.

A step whose dependencies produced no outputs, such as a delete after an rclone move, completes without running and passes on no outputs, so the steps after it complete the same way. An execute step is the exception: it still runs its command, with {input} empty and {inputs_json} equal to [], so a script after an upload or delete keeps running.

Therefore, a linear remux -> thumbnail -> rclone graph sends only the thumbnail to rclone. To upload both the remuxed video and its thumbnail, route both producers directly to rclone:

mermaid
Remux Thumbnail Rclone

In this graph, rclone still waits for thumbnail because both remux and thumbnail are direct dependencies. The extra remux -> rclone edge routes the video; it does not make the upload start early.

Parallelism & Dependencies (Fan-in / Fan-out)

  • Fan-out: One step routes its outputs to multiple downstream steps. Those steps may run concurrently if all their other dependencies and worker capacity allow it.
  • Fan-in: One step has multiple direct dependencies. It waits for all of them and receives their merged outputs.

Fan-out describes graph routing, not a guarantee of simultaneous execution.

When a worker becomes free, a step that continues a workflow already in progress is claimed before the first step of a new workflow at the same priority, and within that order the oldest job goes first. A busy queue therefore finishes workflows instead of leaving many half done.

Automatic Cleanup

A delete step removes the files produced by the steps it depends on — not the original recording. This is safe after an rclone step in copy mode, which passes the uploaded files through as its output, so a delete that depends on that step implements "delete the local copy after a successful upload".

Do not place a delete step after a remux/transcode or merge step: it would delete the converted or merged result, because that is what the step produced. To delete the original source files after converting or merging, enable Remove Input on Success (remove_input_on_success) on that step instead.

A step that removes its inputs (delete, an rclone, rship, or copy_move step in move mode, or a baidupcs / aliyunpan step with Delete local files after upload) must not share a parent with another step that still reads the same files, because fan-out runs both at once. Such a workflow is rejected when it is saved or validated, with a message naming the steps involved; make the removing step depend on the other reader, directly or through other steps, so it runs after it. Root steps all read the stage's inputs and count as sharing one parent. Removal driven by an action option, such as Remove Input on Success, happens only after that step has succeeded, so beside a reader it is reported as a warning when the workflow is validated or saved and logged when it runs: whichever sibling finishes first decides whether the other still finds its file. Saving a workflow also checks that every action preset and workflow it names exists and that every action is available, instead of failing when the next recording finishes.

Performance Tip

Re-encoding (such as ass_burnin) is CPU-intensive. Set a low Max CPU Jobs (max_concurrent_cpu_jobs) in global settings to avoid system load that could disrupt downloads.

Error handling

When a step fails, dependent steps are cancelled; independent branches can finish. The workflow is marked failed after running steps stop. Retry the workflow to restart failed and cancelled steps without repeating completed steps.

Partial file failures fail the step and identify the affected inputs. Already-published files remain on disk and in the job history. Check per-file results before manually repeating uploads or moves.

Automatic per-step retries keep dependent steps waiting until retries are exhausted. Cancelling the workflow cancels pending retries. See retry counts and timeouts.

If processing is interrupted, restart recovery resumes unfinished work. Stored video/chat paths must still identify the original segments; unmatched chat files are skipped with a warning. See recovery details.

Use Workflow reference for JSON definitions, execution states, and API cancellation. Options for Run command, archives and Baidu Netdisk are in the action reference.

Unresponsive file operations

A step that times out or is cancelled stops right away, but a file operation it has already started, such as a copy to a disk or network share, cannot be interrupted while the file system is not answering. The job is recorded as failed or cancelled, and the operation keeps its worker until the file system returns, so other file jobs may wait in the queue.

Once such an operation has outlived its job by 30 seconds, an indicator appears in the page header. It lists the affected jobs and how long each has not responded, and the job's own page shows a notice. The same condition is logged as a warning. The indicator disappears when the operation returns.

If this happens repeatedly, check that the destination is reachable. For network mounts, prefer mount settings that return an error after a timeout instead of waiting indefinitely, so a lost connection fails the step rather than holding a worker.

Partial files from interrupted jobs

Actions write each output to a temporary file next to its destination, named like video.tmp-<id>.mp4, and rename it into place once it is complete. A failed or cancelled step deletes its temporary file, but a crash, power loss or forced exit can skip that cleanup and leave an unfinished file behind.

The server records each temporary file before creating it. After a restart, files that an interrupted job may have left are listed behind an icon in the page header and on that job's page, with their folder and size. Delete removes the file; Keep leaves it on disk and only removes it from the list. These files are never finished outputs or original recordings, so they are safe to delete. Files that are already gone drop off the list on their own. A file whose folder is unreachable, such as one on a disconnected drive, stays listed until the folder is back.

This section is now in Set up post-processing.

This section is now in Set up post-processing.

This section is now in Set up post-processing.

This section is now in Set up post-processing.

This section is now in Set up post-processing.

This section is now in Set up post-processing.

This section is now in Action reference.

This section is now in Action reference.

This section is now in Action reference.

This section is now in Action reference.

This section is now in Pipeline execution contracts.

This section is now in Pipeline execution contracts.

This section is now in Workflow reference.

This section is now in Workflow reference.

This section is now in Workflow reference.

This section is now in Workflow reference.

This section is now in Workflow reference.