Use run.oppr from the zip. Headless mode needs a graphics renderer.
dotnet tool install -g RecursiveAI.OneScope.ToolRequires .NET 10 (net10.0); .NET 9 and earlier aren’t supported.
onescope open run.oppr --headless \ --run 'seek {"step":20}' \ --run 'play {"speed":-60,"frames":5}' \ --run 'play {"speed":0}'
The example is the full program below: unzip it and dotnet run.
The zip contains run.oppr and a C# program that runs the same operations, so you can use either the command above or dotnet run.
The playback result reports "step":15. The pause result keeps step 15 and reports "playing":false.
The full program
The download uses OneScope.Tool 1.0.0 to open a 120-step OnePhysics replay. The headless commands rewind for five presentation frames (counted at 60 per second), then pause; the program prints the cursor after each operation.
using System.Diagnostics; using System.Text.Json; string toolDir = Path.GetFullPath("obj/onescope-tool"); string tool = Path.Combine(toolDir, OperatingSystem.IsWindows() ? "onescope.exe" : "onescope"); if (!File.Exists(tool)) Run("dotnet", "tool", "install", "RecursiveAI.OneScope.Tool", "--version", "1.0.0", "--tool-path", toolDir); var results = Open( """seek {"step":20}""", """play {"speed":-60,"frames":5}""", """play {"speed":0}"""); foreach (var state in results.TakeLast(2)) { string label = state.GetProperty("playing").GetBoolean() ? "Playing backward" : "Paused"; Console.WriteLine($"{label}: step {state.GetProperty("step")}"); } JsonElement[] Open(params string[] operations) { var arguments = new List<string> { "open", "run.oppr", "--headless", "--size", "640x480" }; foreach (string operation in operations) arguments.AddRange(["--run", operation]); return Run(tool, arguments.ToArray()) .Split('\n', StringSplitOptions.RemoveEmptyEntries) .Select(line => JsonDocument.Parse(line).RootElement.Clone()) .ToArray(); } static string Run(string command, params string[] arguments) { var start = new ProcessStartInfo(command) { RedirectStandardOutput = true, RedirectStandardError = true }; foreach (string argument in arguments) start.ArgumentList.Add(argument); using var process = Process.Start(start)!; var output = process.StandardOutput.ReadToEndAsync(); var errors = process.StandardError.ReadToEndAsync(); process.WaitForExit(); if (process.ExitCode != 0) throw new InvalidOperationException(output.Result + errors.Result); return output.Result; }
Playing backward: step 15 Paused: step 15
If reverse playback reaches the start with looping off (the default), playback stops there. Seek to a later step first if there’s nothing to rewind.
Variations
Watch the replay run backward in a window. In a terminal, open a window with a control socket. Leave it running:
onescope open run.oppr --live "$PWD/replay.sock" \ --run 'seek {"step":100}'
In another terminal in the same directory, start reverse playback. Run the second command when you reach the moment you want to inspect:
onescope play '{"speed":-30}' \ --socket "$PWD/replay.sock" onescope play '{"speed":0}' \ --socket "$PWD/replay.sock"
The pause response gives the step where you stopped. Close the replay window when you’re done.
Go back exactly one simulation tick. Replace both play lines in the headless command with this line; it lands on step 19 without starting playback:
--run 'step {"delta":-1}'Related recipes
The short answer
Set play to a negative speed to move backward through the recording, then set speed to zero to pause without changing the current step. An open desktop window advances playback as it presents frames. For a headless command, supply frames to advance a fixed number of presentation frames before reading the result.
How do I rewind a replay without restarting it?
Seek to a step after the event you want to review, then start playing at a negative speed. Speed is in simulation steps per presentation second. OneScope’s playback calculation counts 60 presentation frames per second, so at -60 five frames rewind five steps, as long as the cursor stays away from the start. moved is the number of steps moved, not a signed delta; the falling step value shows the direction. No simulation state is changed by choosing a playback rate: it only decides which recorded step is shown next.
A window keeps presenting after play returns, so for continuous review you don’t need frames. If you omit frames in a headless run, play can report playing:true without moving the cursor. Set frames there to make the command do the movement immediately. The example starts at step 20 and ends at 15 every run, unlike pausing a window by hand.
Can I pause a replay and go back one frame?
Pause with speed:0 before stepping so the window doesn’t continue to advance. If by “frame” you mean one simulation tick, use step with delta:-1. It’s independent of the playback speed, and clamps at the beginning of the recording. If you know the exact tick you want to inspect, use seek instead; the result’s hash identifies the state at that tick, regardless of how you reached it.