Filming

1file
7min read
Sheet 39 of 47 · Filming

Filesconfig/ignitetestcamera.properties

Fileconfig/ignitetestcamera.propertiesIgniteTestTool can film a server: it takes over a bot with a real Minecraft client, flies that client's camera along a planned move and records the window to an MP4. One call, /film, does one shot. Everything here runs over the HTTP API; the window has no screen for it yet. Its settings are on Settings > Filming and Settings > Auto director. Finished shorts cut from these takes are on the Cinematic page.

curl "localhost:8767/join?name=Cam"
curl -H "X-ITT-Token: $TOKEN" "localhost:8767/film?bot=Cam&x=120.5&y=80&z=-40.5&yaw=180&pitch=10&move=push&distance=6&ms=6000&time=gold"

/film and the other filming routes drive the client or start a process (ffmpeg, node, the OBS script), so they need the API token in the default token mode.

The answer names the clip in file, with its frame count and length.

What you need

NeedWhy
Windows with a desktop sessionCapture, key presses and mouse moves go through the Windows API. A service or a hosted CI runner has no window to film
A bot on the server, allowed to run /gamemode, /time, /gamerule, /weather, /tp and /particleStaging is typed as the bot's own chat, so the bot needs the permissions, usually op
ffmpegThe built-in recorder pipes frames into it. ffmpegPath, default ffmpeg on the PATH
The takeover clientA shot runs on a taken over bot. /film takes the bot over by itself when it is not yet

Optional, none of it ships with the tool:

OptionKeyWhat it adds
A modded clienttakeoverLaunchJsonA launch file (main, natives, classpath, args, gameDir) for a client you installed yourself, for example a Fabric profile with shaders. Without it the tool installs vanilla Minecraft
A shader profilecinematicShader, cinematicProfileDirWhile a takeover runs, the profile's options.txt and a Photon shader config are set for filming, see Shader profile
OBSobsScript, nodePathrecorder=obs starts and stops an OBS recording through a Node control script you provide
The camera modmodCamera, modCameraJar, modCameraPortdrive=mod: roll, live fov and keyframes, see Drives
A render kitrenderKitDir, nodePathShorts cut from the clips by /produce and /render, see Auto Director

What a shot does

  1. Takeover

    The bot is taken over when it is not already, and the tool waits until the client is in the world with a visible window, up to filmTakeoverTimeoutSeconds (150). Otherwise the shot fails with <bot> did not become ready to film within N s.

  2. Staging

    The bot types /gamemode spectator (or gamemode=), and with time set /gamerule doDaylightCycle false and /time set, with weather set /weather. The hud goes off with F1 unless hud=show.

  3. Prewarm

    The camera moves to the first pose and waits until the loaded chunk count stops changing, at most filmPrewarmMillis (1500 ms), so the first frames are not half a world.

  4. Record and drive

    The recorder starts, the camera runs the move for ms (6000), the recorder stops. With particles or timeRamp a side thread sends particles every 150 ms or moves the time while it runs.

  5. Restore

    When the shot touched them, the daylight cycle goes back on, the time back to what it was and the weather to clear, also when staging or the recorder failed halfway. The game mode is not set back.

The answer has ok, file, frames, seconds, move, drive, dropped, staged (what was changed) and error when the take broke, for example <bot> dropped the takeover mid-film, the clip is partial.

Recorders

recorderHow it records
internalGrabs the client window with PrintWindow and pipes raw frames into ffmpeg: libx264, yuv420p, at fps (default filmFps, 60, at most 120). The size is the window's client area times scale. No sound
obsRuns node <obsScript> StartRecord and StopRecord, then moves the file OBS reports to the clip path. OBS has to run already, with a source that captures the client

A call without recorder uses filmRecorder (internal). Any other value is an error, and recorder=obs without an obsScript is refused before the bot is taken over or the scene staged: recorder=obs needs obsScript, the OBS websocket control script, in Settings > Filming.

PrintWindow on a window that runs shaders is slow, a few frames a second at full size. For shader footage use recorder=obs, or lower scale.

Clips land in film in the data folder, or filmOutputDir, named <bot>-yyyyMMdd-HHmmss.mp4. /clip?file=<path> serves one back, only from that folder.

Drives

The drive is how the camera is moved.

driveHow
cineThe tool injects position packets into the takeover client at hz (default the fps)
keysHolds W, S, A, D, Space or Shift in the client window for push, pull, truck, truckl, rise and fall. Other moves fall back to cine
sendinputPlaces the window at 0,0, sets the first pose with /tp, then sends real key presses and mouse moves through Windows at sendinputHz (125) and sendinputPixelsPerDegree (8.0). The server sees normal client movement. It takes the foreground and moves your mouse while it runs
modTalks to the camera mod in the client over 127.0.0.1:<modCameraPort>: freecam, poses, keyframe paths, fov and the hud. The only drive with roll, dutch, fov and kf

A call without drive uses filmDrive (cine). A name that is not one of the four is an error, drive must be cine, keys, sendinput or mod, not a quiet cine clip.

Fileconfig/ignitetestcamera.propertiesWith modCamera on, the mod is used whenever it answers a ping. drive=mod without a mod that answers falls back to sendinput. When a takeover starts with modCamera on, the tool writes port=<modCameraPort> (8769) into config/ignitetestcamera.properties of the client and copies modCameraJar into its mods folder: modCameraModsDir, else mods in cinematicProfileDir, else in the game folder of the client being taken over. A missing jar or mods folder is a warning, the takeover goes on.

Shader profile

With cinematicShader on, or a cinematicFov set, a takeover patches the client profile for filming: cinematicProfileDir, or when that is empty the game folder of the client being taken over (the gameDir of a takeoverLaunchJson). The originals go back when the takeover ends (backups end in .itt-backup). Without a folder to patch the tool warns Cinematic look not applied and films without it.

  • Config keyoptions.txtoptions.txt: view bobbing off, fov effects off, and cinematicFov as the fov when set.
  • A Photon shader config in shaderpacks, when there is one: depth of field with cinematicDofSamples samples (16), TAAU at render scale 0.6, motion blur at 0.5, vignette, crepuscular rays and bloom.
  • With cinematicShader on, every shot runs cinematicSpeedScale (1.5) times its ms, so moves read slower on screen.

The tool does not install shaders, Iris or Fabric. The profile it patches has to be one you set up.

Nametags

cameraNametags changes the player list the takeover client sees, so real players' names do not end up in a clip: off (default), hide or rename, which swaps names for ones from cameraNames. The mod drive also hides nametags on a shot unless nametags=show; by default it follows hud.

Settings

Settings > Filming and Settings > Auto director, with the camera mod on Settings > Mod camera. Configuration has every key with its Settings name.

KeyDefaultMeaning
filmDrive, filmRecordercine, internalThe drive and recorder of a call that names none
ffmpegPathffmpegffmpeg for recording and the smoothness check
filmFps60Default fps of a shot
filmOutputDiremptyEmpty is film in the data folder
filmTakeoverTimeoutSeconds150How long a shot waits for the client, 30 to 600
filmPrewarmMillis1500Upper bound of the chunk wait before recording
filmPresetsFileemptyA JSON file of named shots for preset=, see Camera Moves
filmHandheld0.03Sway amount of handheld=on
filmParticleCount12Particles per burst
sendinputHz, sendinputPixelsPerDegree125, 8.0The sendinput drive
obsScript, nodePathempty, nodeThe OBS control script and the Node that runs it and the render kit
cameraNametags, cameraNamesoff, ten first namesSee Nametags
coverageDistance8.0Default subject distance of /film/coverage and /sequence
cinematicShader, cinematicFov, cinematicProfileDirfalse, empty, emptySee Shader profile
cinematicDofSamples, cinematicSpeedScale16, 1.5
scanRadius, autofilmMaxShots, autofilmSeedVariety, bestLightDefault48, 12, true, falseSee Auto Director
renderKitDir, renderTimeoutSeconds, produce...empty, 1200The render kit and the shorts, see Auto Director
takeoverLaunchJsonemptyLaunch file of your own client, on Settings > Taking over a bot
modCamera, modCameraPort, modCameraJar, modCameraModsDirfalse, 8769, empty, emptyThe camera mod

Limits

  • Windows only, in a desktop session, with the client window not minimized.
  • A shot is one take of one camera. Scenes & Shoots batches shots and stages players, Auto Director finds what to film.
  • Filming has no scenario step. A scenario can take over and take screenshots or GIFs, not MP4 shots.
  • Every filming route that drives the client or starts a process needs the API token in the default token mode: /takeover, /release, /film, /film/coverage, /shoot, /sequence, /job/submit, /scene/stage, /scene/act, /scene/choreo, /autofilm, /produce, /render and /edl. /scan, /scene/surface, /job/status, /job/result, /clip and the old /cine do not.

Loading the index

Enter openUp Down moveEsc close