# Marker Render Pro 1.1.1

An independent upgrade of the original duration-marker renderer for DaVinci Resolve 21.1+. Your original `marker render v2.1 modern.py` is preserved. The compact main window keeps the everyday workflow visible; profiles, preparation, transcript, and assistant options open only when needed.

## Start exporting

1. Open a project and timeline containing duration markers in Resolve.
2. Choose **Workspace → Scripts → Utility → Marker Render Pro**.
3. Click the folder name in the export card to choose the destination. Open **Profiles** to select the Resolve preset, format, codec, and any additional output versions.
4. Check the markers to include. Highlighting rows selects them for editing; the checkboxes determine what exports.
5. Open **Review** to inspect exact filenames, destinations, ranges, and any issues.
6. Choose **Queue** for review in Deliver, or **Render** to queue and start these jobs.

**More → Appearance** switches between charcoal/orange and soft light/orange themes. The window starts at approximately 560 × 640 pixels and remembers its size. The chevron in the export card expands recipe, folder-path, filename, and batch controls. Timecodes are optional under More → Appearance. Dropdowns use rounded selection popovers with search for long lists. Advanced workflows do not add permanent controls to the main window.

Shortcuts: **Ctrl+F** search, **F5** refresh, **Ctrl+P** preview, **Ctrl+Shift+R** render batch, **Space** toggle the focused marker. Double-click a marker for its range, notes, assigned profiles, filenames, and representative frame. Double-click a job to reveal or verify its file.

## 80 upgrade capabilities

This is the implemented capability inventory, including additions and rebuilt conveniences. Some entries improve an existing workflow rather than representing a completely new concept. Dependencies and API restrictions are identified below.

| # | Capability | Where / behavior |
|---|---|---|
| 1 | Export across multiple timelines | More → Choose source timelines; each job retains its source. |
| 2 | Searchable timeline picker | Find timelines by name and explicitly include them. |
| 3 | Reliable duration-marker exports | One continuous Single clip job per marker/profile combination. |
| 4 | Point marker to next marker | Options → Point markers: next; last point ends with the timeline. |
| 5 | Fixed-length point markers | Options → fixed, with duration in seconds. |
| 6 | Point marker to timeline end | Options → end. The default ignores point markers. |
| 7 | Include supported clip duration markers | Options; trimmed ranges are limited to visible clip bounds. Retimed/nested sources are reported. |
| 8 | Selected clips as temporary ranges | More → Range tools; no source markers need changing. |
| 9 | Create actual duration markers from selected clips | Separate explicit Range tools action; reports occupied marker frames. |
| 10 | Import external range plans | More → Plans → Import ranges; JSON or CSV, validated before any ranges are added. |
| 11 | Split long ranges | Range tools; creates temporary subdivisions of selected ranges. |
| 12 | Merge nearby ranges | Range tools; configurable maximum gap, within each timeline. |
| 13 | Profile head/tail padding | Profiles → Output; frames before and after the range. |
| 14 | Per-marker padding overrides | Marker details; exceptions without duplicating the profile. |
| 15 | Boundary handling | Options → report or clamp ranges that extend outside a timeline. |
| 16 | Overlap reporting | Marker tooltips identify overlaps; intentional overlaps are allowed. |
| 17 | Search names and notes | Main search box; case-insensitive. |
| 18 | Filter by marker color | Filter icon; visible colors have their own marker dots. |
| 19 | Filter by duration | Filter icon → minimum/maximum seconds. |
| 20 | Sort the marker list | Position, name, duration, or color. Ordering also determines numbering. |
| 21 | Include/exclude/invert visible markers | Selection icon menu; hidden rows retain their previous inclusion. |
| 22 | Editing selection independent of export inclusion | Highlight several rows to edit; checkbox state remains independent. |
| 23 | Saved inclusion groups | Selection icon → Save/Load selection group. |
| 24 | Marker notes in details and search | Read context without changing source notes. |
| 25 | Jump to a marker in Resolve | Marker details or row context menu. |
| 26 | Representative frame preview | Marker details → Thumbnail; restores the previous timeline/playhead. |
| 27 | Per-marker output name | Marker details; changes the export name without renaming the source marker. |
| 28 | Per-marker profile assignment | Marker details; explicit assignments override color routing. |
| 29 | Multiple outputs per marker | Enable several profiles, for example video, audio, and vertical. |
| 30 | Enable/disable export profiles | Profiles checkboxes; disabled profiles remain available for explicit assignments. |
| 31 | Duplicate export profiles | Profiles → Duplicate; gives the copy a new identity. |
| 32 | Live format and codec discovery | Encoding choices come from the connected Resolve installation. |
| 33 | Resolution and frame-rate overrides | Profiles → Encoding; zero inherits the preset. |
| 34 | Bitrate override | Encoding → kb/s; zero inherits the preset. |
| 35 | Audio-only exports | Encoding → Audio only; uses the 21.1 audio-format/codec API. |
| 36 | Video-only exports | Encoding → Video only. |
| 37 | Audio bit depth and sample rate | Encoding; availability depends on the format/codec. |
| 38 | Subtitle output modes | Burn-in, embedded captions, separate file, disabled, or preset. |
| 39 | Review burn-in presets | Encoding → Review burn-in; uses installed Resolve burn-in presets. |
| 40 | Alpha-channel export | Encoding; requires a supporting codec. |
| 41 | Web playback optimization | Encoding; supported MP4/MOV exports. |
| 42 | Color-space and gamma tags | Advanced JSON → ColorSpaceTag / GammaTag. |
| 43 | Encoding profile and multipass overrides | Advanced JSON → EncodingProfile / MultiPassEncode; codec-dependent. |
| 44 | Import Resolve render presets | More → Render presets. |
| 45 | Export Resolve render presets | Preset tools; share a preset separately from MRP recipes. |
| 46 | Save current Deliver settings as a preset | Preset tools; uses SaveAsNewRenderPreset. |
| 47 | Update a Resolve render preset | Preset tools; explicit existing-preset choice. |
| 48 | Enable a preset in Quick Export | Preset tools; 21.1 availability. |
| 49 | Reusable recipes | Expand the export card; Save recipe stores profiles, color rules, and batch options. |
| 50 | Per-project defaults | Profiles/options/inclusion overrides are restored by project identity. |
| 51 | Subfolder templates | Profiles → Output; for example `{timeline}/{profile}`. |
| 52 | Filename tokens | Marker, timeline, project, profile, color, index, date, version, start, and end. |
| 53 | Prefix and suffix | Per profile; compatible with naming tokens. |
| 54 | Sequence and version controls | Options; integer padding such as `{index:03}` or `{version:02}`. |
| 55 | Existing-file policies | Review, increment, skip, or replace while retaining the previous export as a backup. |
| 56 | Windows-compatible Unicode filenames | Preserves readable Unicode while handling forbidden characters, reserved names, and length. |
| 57 | Recent output folders | Expanded export card → clock menu; stored after batch creation. |
| 58 | Favorite output folders | Expanded export card → clock menu → Save this folder as a favorite. |
| 59 | Exact export-plan preview | Names, folders, inclusive ranges, status, and per-job issues match the planner used for submission. |
| 60 | Disk-space guidance | Review shows available space and approximate size at configured bitrate; unknown sizes remain identified. |
| 61 | JSON plans and CSV manifests | More / Batch menu → Export plan; manifests include actual jobs when a batch exists. |
| 62 | Queue-only and queue-and-render actions | Main Queue/Render buttons; render starts only the returned IDs for this batch. |
| 63 | Responsive queue creation with cancellation | One API submission per timer step; cancellation keeps already-added jobs visible. |
| 64 | Live render progress and ETA | Queue tab; reads Resolve status and supported current-job ETA. |
| 65 | Retry failed or unfinished outputs | Queue → Retry; selected rows or all failed/unfinished jobs. |
| 66 | Remove this batch's pending jobs | Batch menu; completed jobs and unrelated jobs are retained. |
| 67 | Schedule pending jobs locally | Batch menu; requires this window, Resolve, and the machine to remain running. |
| 68 | Reopen batch history | More → History; retains up to 100 batches and reconnects job IDs to Resolve. |
| 69 | Verify completed media | Job details, or Options → automatically verify; checks duration, streams, and requested dimensions. Requires FFprobe. |
| 70 | Black-frame and silence analysis | Job details; review hints from FFmpeg, not automatic rejection. |
| 71 | Vertical, square, and landscape variants | Preparation creates separate working timelines, with center crop or fit. |
| 72 | Audio/video track selection | Preparation; enable selected numbered tracks on the working timeline. |
| 73 | Audio normalization | Preparation; discovered normalization modes, peak/loudness targets. |
| 74 | Voice isolation | Preparation; strength 0–100 on the working timeline. |
| 75 | Dialogue leveler | Preparation; soft/loud dialogue adjustment. |
| 76 | Audio channel mapping and fades | Preparation; source mapping JSON and clip-edge fade frames. |
| 77 | Transcript-based range selection | More → Transcript; segments, word rows, text/speaker filters, and transcription requests. |
| 78 | Optional AI titles and highlights | Review suggested names or temporary highlight ranges; bundled local Ollama helper or your own helper. |
| 79 | Local MCP plan bridge | Assistants can read cached markers/profiles/plans and stage ranges for human review. |
| 80 | Compact accessible presentation | Light/dark themes, restrained orange action, semantic badges, remembered geometry, shortcuts, and optional always-on-top. |

Color rules additionally route each marker color to profiles and a destination. Row-specific profiles have priority; unset routes inherit enabled profiles.

## 24 fixes and reliability protections

These are concrete corrected behaviors and safeguards in the new implementation. The count is a tracking list, not a claim that 24 separate crashes were reproduced in your original script.

| # | Corrected behavior |
|---|---|
| 1 | Refresh uses the active project instead of a startup-only project reference. |
| 2 | An absent project or timeline opens an actionable empty state with render disabled. |
| 3 | Project changes invalidate old source objects and block cross-project submission. |
| 4 | Timeline marker offsets are converted to absolute render frames. |
| 5 | Duration-marker MarkOut is inclusive: start + duration − 1. |
| 6 | Resolve's exclusive timeline end is converted to the last valid frame. Confirmed live. |
| 7 | Fractional marker positions are reported rather than silently truncated. |
| 8 | Fractional frame rates use rational arithmetic. |
| 9 | Drop-frame timecode skips the correct labels and rejects invalid skipped labels. |
| 10 | Editing row selection does not unexpectedly change export inclusion. |
| 11 | Filtering preserves hidden marker inclusion; visible selection actions receive the intended operation. |
| 12 | Empty/invalid filenames, reserved Windows names, trailing dots, and Unicode lengths are handled. |
| 13 | Case-insensitive filename collisions include generated suffixes and other planned outputs. |
| 14 | Naming/subfolder templates reject unknown fields, traversal, and excessive format widths. |
| 15 | Unavailable drives, unwritable destinations, and overly long paths are reported before submission. |
| 16 | Source marker edits/deletions are detected before queuing a stale plan. |
| 17 | Single clip mode is enforced so a marker produces one continuous export. |
| 18 | Failed preset/settings/AddRenderJob calls do not silently report success. |
| 19 | Unsupported inactive codec options are applied separately; false alpha on H.264 no longer breaks an otherwise valid job. Confirmed live. |
| 20 | Unsupported Single clip SelectAllFrames/replacement setters no longer reject every job. Explicit ranges and retained-file backups are used. Confirmed live. |
| 21 | Replacement preserves the earlier file and restores it when submission fails or an unrendered replacement job is removed. |
| 22 | Partial submission/cancellation records added jobs, exposes retry/removal, and restores the prior Resolve context. |
| 23 | Queue start/removal uses owned IDs; exact duplicate plans and existing queue output paths are detected. |
| 24 | Preferences save atomically with corrupt-file recovery; delivery snapshots retain encoding, timeline/playhead, and valid transient range/name/folder settings. |

Additional hardening includes argument-array subprocesses without a command shell, authenticated loopback access, CSV formula escaping, API calls on the GUI thread, retained working timelines, and duration verification based on source timeline FPS even when export FPS differs.

## Formats, preparation, and API limits

- The planner supports single-file formats shown in the profile UI. Image sequences and IMF packages require different output-path semantics and are intentionally not exposed as ordinary single-file jobs.
- Resolve determines whether a codec supports alpha, subtitles, bit depth, tags, network optimization, and multipass. Unsupported enabled options fail visibly rather than being silently discarded. Use a validated Deliver preset for codec settings the API does not expose.
- Preparation duplicates the source timeline. Those working timelines are retained because queued jobs depend on them. Audio fades apply to clip boundaries, not automatically to every marker boundary. Track numbers refer to the duplicate's numbered tracks. Center crop is not content-aware reframing; inspect the working timeline before final exports.
- Retimed/nested clip-marker and retimed transcript mappings are not guessed. Use explicit reviewed temporary ranges for those cases. Transcript timing should be reviewed, especially for unusual source timecodes and mixed source frame rates.
- Delivery snapshot capture briefly adds and immediately removes one unrendered temporary job to read settings that render presets omit. If current Deliver settings cannot create a job, the encoding preset/timeline/playhead/mode can still be restored, but the prior transient output name/folder/range cannot be recovered. Unexposed Deliver controls are not guaranteed to have an exact getter.
- Replace moves an existing output to a sibling `.mrp-backup-<id>` file at queue time. Backups remain after successful rendering and can be removed manually once the new export is accepted. Pending-job removal restores the old file if no new output exists. A crash leaves the retained backup available; it is never automatically deleted.
- Resolve has no general queued-job edit setter or true render pause/resume exposed here. Modify a profile before queuing, or remove pending jobs and rebuild. **Stop** affects current Resolve render processes and therefore asks for confirmation. **Retry** rerenders; it does not resume a partly encoded file.
- Scheduling uses the local clock and an open window. There is no background Windows scheduler or automatic shutdown action.
- Preview is read-only planning. **Render** is the action that queues and starts jobs. The original script and unrelated Resolve jobs are preserved.

## Optional tools and local AI

Normal exports need Resolve plus PySide6. FFmpeg and FFprobe are discovered on PATH or configured in **More → Assistants & tools → Optional tools**. No packages or models are downloaded automatically.

For the bundled local AI helper, run a local Ollama server with a model you already installed. Enter that model's name in Optional tools, click **Use bundled local AI helper**, and save. The helper uses Ollama's documented [chat API](https://docs.ollama.com/api/chat) with non-streaming JSON output. It only sends the selected marker names/notes or timed transcript to the local server. Model-generated titles and timing still need review. Model inference itself was not tested because no model was configured for this installation.

Your own helper can use any provider. Configure a JSON argument array, for example:

```json
["C:/path/to/python.exe", "C:/path/to/helper.py"]
```

Input is one JSON object on stdin:

```json
{"schema":1,"task":"titles","payload":{"markers":[{"id":"marker-id","name":"Opening","note":"A helpful introduction"}]}}
```

Title output: `{"titles":{"marker-id":"Suggested title"}}`. Highlight requests use `task: "highlights"` with timed `segments` and `timelines`; return `{"markers":[{"timeline_id":"actual-id","start":86400,"end":86519,"name":"Suggested highlight"}]}`. The script validates imports before adding temporary ranges. Helpers return JSON only on stdout; diagnostics belong on stderr. Commands are executed as argument arrays, without a shell.

## MCP bridge

**More → Assistants & tools → Local MCP bridge → Start / stop local bridge** shows the URL and bearer header. The server is bound to loopback, uses a fresh token each run, and stops when the window closes. It implements JSON-response Streamable HTTP for MCP protocol 2025-03-26 and 2025-06-18; no SSE stream is required for these tools.

Tools: `get_markers`, `get_profiles`, `get_export_plan`, `stage_export_plan`. Reads are cached snapshots updated by the GUI. Staging shows a human review prompt and never queues or renders. For automation that directly changes Resolve, use Resolve's own MCP separately; the MRP bridge deliberately limits its authority to plans.

## Plan interchange

Ranges use **absolute timeline frames with an inclusive end**, not seconds, relative marker offsets, or timecode strings. A missing timeline_id means the current source; a stale ID can be resolved by a unique matching timeline name.

```json
{"markers":[{"timeline":"Episode 12","name":"Opening","start":86400,"end":86519,"color":"Blue","note":"Review before export"}]}
```

CSV range imports use `timeline_id` or `timeline`, `name`, `start`, `end`, and optional `color`, `note`, `output_name`, `profile_ids`. JSON plan exports include markers, profiles, color rules, and planned jobs for inspection; importing a plan imports its ranges, not arbitrary external preset definitions. CSV export manifests describe jobs and are not a substitute for the range-import schema.

## Installation and verification

Keep `Marker Render Pro.py` and `_MarkerRenderPro` together in the Utility folder. Keep this guide beside the launcher. The launcher finds an installed Python with PySide6 if Resolve's bundled Python lacks it. On this machine, Python 3.12 with PySide6 6.11.2 is available; Resolve's Python 3.14 lacks PySide6. If needed, point `MARKER_RENDER_PRO_PYTHON` to a compatible `python.exe`. Enable **Preferences → System → General → External scripting: Local** if external connections are unavailable.

Resolve's menu can execute Python without a `__file__` variable. Version 1.1.1 locates its installed Utility folder in that environment and uses the same absolute launcher path for the external Python handoff. Regression tests cover missing and stale host file variables.

Preferences/history: `%APPDATA%/Marker Render Pro/state.json`. They are separate from the original renderer. Corrupt preferences are preserved with a recovered preferences file rather than overwritten.

Verification used Resolve Studio **21.1.1.10** in an isolated QA project. Two duration markers generated four successfully rendered outputs: two MP4 files with exactly 12 video frames each and two WAV files, all matching half-second planned ranges within audio-container tolerance. A separate 360 × 640 working-timeline export completed with normalization, fades, voice isolation, and dialogue leveling; the source stayed 640 × 360. A live queue probe confirmed restoration of the original timeline, MarkIn/MarkOut, output basename, and destination. Automated coverage includes planning, filenames/timecode, store recovery, API failures, queue ownership, UI selection/cancellation/themes, HTTP bridge, and helper contracts. See the verification report for exact totals and limitations.
