Configuration

10 min readUpdated 2 weeks ago

Overview

  • shared/config.lua: general settings, performance, camera, possession, flight, recording, world recording, replay, auto drive, rendering, theme and asset lists
  • server/config_server.lua: the ffmpeg path

Asset lists (ped models, vehicle models, props, weapons, scenarios, emotes) are included as data files and loaded automatically.

General

shared/config.lua
1Config.Locale = 'en'
2Config.Debug = false
3Config.Theme = 'default'
4Config.OpenKey = 'F6'
5Config.OpenCommand = 'sceneeditor'
6Config.RequirePermissions = false
7Config.AcePermission = 'ml_mastervideo.access'
8Config.AdminPermissions = { 'command', 'admin', 'god', 'superadmin' }
  • Locale: language file to load from the locales/ folder
  • Debug: Console output for troubleshooting
  • Theme: theme of the noclip panels: 'default', 'cyberpunk', 'wasteland', 'noir' or 'fantasy'. The editor follows Config.UITheme
  • OpenKey: Keybind to open the scene editor (rebindable in FiveM settings)
  • OpenCommand: Chat command to open the editor
  • RequirePermissions: when true, only players with AcePermission or one of AdminPermissions can open the editor. With the default false, every player can open it and save or delete scenes
  • AdminPermissions: ACE names that also pass every permission check
  • AcePermission: ACE node required when RequirePermissions = true

Performance

shared/config.lua
1Config.Performance = {
2    RecordingInterval = 50,
3    PedRecordingInterval = 0,
4}
  • RecordingInterval: milliseconds between vehicle samples, used only when Config.Recording.SampleHz is not set
  • PedRecordingInterval: milliseconds between ped samples. 0 records every frame

Camera Controls

shared/config.lua
1Config.Camera = {
2    LiveSwitchControl = 29,
3    BaseSpeed = 0.3,
4    SlowSpeedMultiplier = 0.1,
5    FastSpeedMultiplier = 5.0,
6    StickDeadzone = 0.2,
7    StickSensitivity = 1.0,
8    StickResponseCurve = 1.4,
9    RotationSensitivity = 1.5,
10    MarkerColor = { r = 90, g = 190, b = 255 },
11    MarkerLabelStep = 1.0,
12    DefaultEase = 'linear',
13    DefaultPathMode = 'spline',
14}
  • LiveSwitchControl: control that swaps between camera and character in the live director. 29 is B

H and TAB hide the whole interface while the camera is free, for clean shots.

  • BaseSpeed: Normal camera movement speed
  • SlowSpeedMultiplier: precision speed while holding CTRL
  • FastSpeedMultiplier: fast speed while holding SHIFT or L3 on a gamepad
  • StickDeadzone: Gamepad: ignore stick movements below this threshold (0.0 - 1.0)
  • StickSensitivity: Gamepad: how fast the sticks affect movement. 1.0 matches keyboard speed
  • StickResponseCurve: Gamepad: response curve after the deadzone. 1.0 is linear
  • RotationSensitivity: Gamepad: how fast the right stick rotates the camera
  • MarkerColor, MarkerLabelStep: color and label spacing of the path markers
  • DefaultEase: easing of new keyframes: linear, in, out, inout, smooth or hold
  • DefaultPathMode: spline for a curved camera path, linear for straight segments

Commands and Keys

shared/config.lua
1Config.Commands = {
2    openEditor = Config.OpenCommand,
3}
4
5Config.Keybinding = {
6    openKey = Config.OpenKey,
7}

Both follow OpenCommand and OpenKey above. Leave them as they are.

UI Theme

shared/config.lua
1Config.UITheme = {
2    preset = nil,
3    colors = {
4        primary = nil,
5        accent = nil,
6        background = nil,
7        surface = nil,
8        text = nil,
9    },
10}
  • preset: theme preset for this resource. nil follows the shared theme set in ml_bridge
  • colors: CSS hex values for single colors. Any nil value follows the shared theme

Possession

When the director records a ped, the player takes the model of that ped, so walk style and size match. Number keys play upper-body emotes for humans or full-body actions for animals, and each one becomes a clip on the timeline.

shared/config.lua
1Config.Possession = {
2    Enabled = true,
3    Keys = {
4        [1] = 157,
5        [2] = 158,
6        clear = 73,
7        toggle = 311,
8    },
9    MinClipDuration = 400,
10    HumanEmotes = {
11        [1] = { dict = 'amb@world_human_smoking@male@male_a@idle_a', anim = 'idle_a', label = 'Fuma', flag = 49 },
12    },
13}
  • Enabled: keep it on. false records without changing the player model
  • Keys: control IDs of the ten emote slots. clear stops the current emote, toggle shows or hides the overlay
  • MinClipDuration: shortest clip in milliseconds. Shorter key presses are padded to it
  • HumanEmotes: default emote of each slot for human peds. Players can change them in the settings, saved on their own machine

Flight

shared/config.lua
1Config.Flight = {
2    Speed = 0.3,
3    Sensitivity = 1.5,
4    InvertLookY = false,
5    ZoomSpeed = 2.0,
6    RollSpeed = 1.0,
7    TurboMultiplier = 5.0,
8    PrecisionMultiplier = 0.1,
9    Collision = false,
10    LockAltitude = false,
11    Walk = false,
12    WalkHeight = 1.7,
13    RememberPosition = false,
14    ShowInfo = false,
15    ShowLockMarker = true,
16    ShowMarkers = true,
17    ShowMarkerLabels = false,
18    AimLockRange = 150.0,
19    NearestVehicleRange = 30.0,
20    Drone = {
21        Enabled = false,
22        Drag = 3.0,
23        Accel = 15.0,
24        Gravity = 0.0,
25        BankingDeg = 15.0,
26        RotSmoothing = 8.0,
27        FovSmoothing = 5.0,
28    },
29}

Defaults of the free camera. Players can change most of them from the editor.

  • Speed, Sensitivity, ZoomSpeed, RollSpeed: movement, look, zoom and roll speed
  • InvertLookY: reverses vertical gamepad look
  • TurboMultiplier, PrecisionMultiplier: fast and slow movement multipliers
  • Collision: the camera stops at walls and ground
  • LockAltitude: keeps the camera at the same height
  • Walk, WalkHeight: walks the camera on the ground at eye height
  • RememberPosition: reopens the camera where it was left
  • ShowInfo, ShowLockMarker, ShowMarkers, ShowMarkerLabels: on-screen info and markers
  • AimLockRange: farthest distance to lock the camera on an entity
  • NearestVehicleRange: distance to find the nearest vehicle to follow
  • Drone: drone mode with inertia. Drag, Accel and Gravity set the physics, BankingDeg the tilt in turns, RotSmoothing and FovSmoothing the smoothing

Camera Shake

shared/config.lua
1Config.Shake = {
2    Presets = {
3        subtle     = { amplitude = 0.35, freqHz = 1.1, rotWeight = 1.0, posWeight = 0.4, speedAmp = 0.0,  speedFreq = 0.0  },
4        handheld   = { amplitude = 1.0,  freqHz = 1.7, rotWeight = 1.0, posWeight = 1.0, speedAmp = 0.0,  speedFreq = 0.0  },
5        action     = { amplitude = 2.0,  freqHz = 3.2, rotWeight = 1.2, posWeight = 1.4, speedAmp = 0.02, speedFreq = 0.01 },
6        earthquake = { amplitude = 4.0,  freqHz = 6.0, rotWeight = 0.8, posWeight = 2.6, speedAmp = 0.0,  speedFreq = 0.0  },
7    },
8}
  • Presets: shake presets offered in the editor. amplitude and freqHz set strength and speed, rotWeight and posWeight how much rotation and position shake, speedAmp and speedFreq how much the shake grows with camera speed

Recording

shared/config.lua
1Config.Recording = {
2    SampleHz = 30,
3    SteerGain = 1.0,
4    CaptureQuaternion = true,
5    CaptureWheels = true,
6}
  • SampleHz: samples per second of a vehicle path
  • SteerGain: steering strength on replay
  • CaptureQuaternion, CaptureWheels: also record the full rotation and the wheel state

World Recording

Records the gameplay around the player and turns the take into a scene, with a path for each actor.

shared/config.lua
1Config.WorldRecord = {
2    Command = 'mvworldrec',
3    SampleHz = 30,
4    Radius = 250.0,
5    MaxSeconds = 120,
6    MaxEntities = 60,
7    CountdownMs = 0,
8    IncludeNpcs = true,
9    IncludeVehicles = true,
10    IncludeObjects = true,
11    CaptureAnims = true,
12    AnimProbeBudget = 120,
13    AnimProbeIntervalMs = 150,
14    EmoteResource = 'ml_emotes',
15}
  • Command: starts and stops the recording. It has no key by default, bind one in the GTA key settings
  • SampleHz: samples per second for every actor
  • Radius: meters around the player that are recorded, up to 600
  • MaxSeconds: longest take before the recorder stops on its own
  • MaxEntities: most actors, vehicles and props tracked
  • CountdownMs: delay before the first sample
  • IncludeNpcs, IncludeVehicles, IncludeObjects: what gets recorded besides players
  • CaptureAnims, AnimProbeBudget, AnimProbeIntervalMs: record the animations actors play, and how many lookups run per tick
  • EmoteResource: emote resource asked for the animation of the local player. '' skips it

Replay and Auto Drive

shared/config.lua
1Config.ReplayDefaults = {
2    muted = false,
3    speedMult = 1.0,
4    lights = 'auto',
5    engine = true,
6    siren = false,
7    showDriver = false,
8    collision = true,
9    godmode = true,
10}
11
12Config.AutoDrive = {
13    DefaultSpeed = 20.0,
14    DefaultStyle = 'normal',
15    Styles = {
16        normal                = 786603,
17        rushed                = 1074528293,
18        avoidTraffic          = 786468,
19        ignoreLights          = 2883621,
20        sometimesOvertake     = 5,
21        avoidTrafficExtremely = 6,
22    },
23}
24
25Config.WorldTools = {
26    SlowMotionScale = 0.3,
27    FocusIntervalMs = 500,
28    ResweepMs = 5000,
29}
  • ReplayDefaults: settings a new vehicle replay starts with: sound, speed, lights, engine, siren, visible driver, collision and invincibility
  • AutoDrive: AI driving of vehicles told to drive somewhere. DefaultSpeed in m/s, DefaultStyle one of Styles, which maps names to GTA driving flags
  • WorldTools: SlowMotionScale is the game speed in slow motion, FocusIntervalMs and ResweepMs how often the world tools refresh

Persistence

Large scenes are sent to the server in pieces.

shared/config.lua
1Config.Persistence = {
2    DirectLimit = 24576,
3    ChunkSize = 8192,
4    SaveBps = 2000000,
5    MaxSceneBytes = 4194304,
6    MaxSceneChunks = 600,
7    MaxModelBytes = 1048576,
8    MaxModelChunks = 256,
9    SessionTtl = 60000,
10}
  • DirectLimit: bytes below which a scene is sent in one call
  • ChunkSize: bytes per piece when the latent transfer fails
  • SaveBps: transfer rate in bytes per second, up to 10000000
  • MaxSceneBytes, MaxSceneChunks: largest scene and most pieces per scene
  • MaxModelBytes, MaxModelChunks: same for a custom model with its photo
  • SessionTtl: milliseconds before an unfinished transfer is dropped

Rendering

Renders a scene frame by frame and encodes it into a video with ffmpeg on the server. Videos land in renders/, photos in gallery/.

shared/config.lua
1Config.Render = {
2    Port = 3971,
3    Host = '127.0.0.1',
4    KeepJobs = 10,
5    MaxUploadMb = 96,
6    MaxFrames = 18000,
7    PhotoTimeoutMs = 30000,
8    KeepFrames = false,
9    Crf = 14,
10    Preset = 'slow',
11    Fps = 30,
12    Format = 'jpg',
13    Quality = 0.97,
14    Resolution = '1080',
15    MotionBlur = {
16        Samples = 4,
17        MaxSamples = 8,
18        Shutter = 0.5,
19    },
20    Fidelity = {
21        Enabled = true,
22        LodScale = 3.0,
23        HdRadius = 350.0,
24        EntityLod = 2000,
25        EntityLodMultiplier = 4.0,
26        Shadows = true,
27        ShadowBoundsScale = 0.7,
28    },
29    DrainMs = 8000,
30    Bokeh = {
31        Samples = 48,
32        MinSamples = 8,
33        MaxSamples = 96,
34        Aperture = 0.06,
35        MinAperture = 0.005,
36        MaxAperture = 0.5,
37        SettleMs = 140,
38        PauseMs = 120,
39        FocusRange = 300.0,
40        SampleFormat = 'jpg',
41    },
42}
server/config_server.lua
1ServerConfig.FfmpegPath = ''
  • Port, Host: address the client uploads frames to. Keep Host on 127.0.0.1
  • KeepJobs: finished render jobs kept on disk
  • MaxUploadMb, MaxFrames: largest upload and most frames per render
  • PhotoTimeoutMs: time before a single photo counts as failed
  • KeepFrames: keeps the single frames after the video is encoded
  • Crf, Preset: ffmpeg quality (lower is better, 0 to 51) and encoder preset
  • Fps, Format, Quality, Resolution: frame rate, frame format, frame quality and output resolution
  • MotionBlur: samples blended per frame and shutter length
  • Fidelity: raises level of detail, the high detail radius and shadow quality while rendering
  • Bokeh: depth of field samples, aperture range and focus range of the photo mode
  • DrainMs: time the server waits for the last frames to arrive before it encodes
  • FfmpegPath: path to the ffmpeg program. Empty uses ffmpeg from the system path
Same Machine

The frame receiver listens on 127.0.0.1 only. Rendering works when the game client that renders runs on the same machine as the server, as on a local video server.

The file also holds timing values for the frame capture, such as SettleMs, FramePauseMs, WarmupMs and the world sync settings. Leave them as they are unless renders show stutter or missing frames.

Particle Effects

shared/config.lua
1Config.ParticleFx = {
2    { asset = 'core', effect = 'exp_grd_grenade', label = 'Grenade Blast', category = 'Explosions', scale = 1.0 },
3}
  • ParticleFx: world effects that can be placed on the timeline. asset is the particle dictionary, effect the effect name, category the group in the picker and scale the default size

Server Configuration

server/config_server.lua
1ServerConfig.FfmpegPath = ''
  • FfmpegPath: path to the ffmpeg program. Empty uses ffmpeg from the system path

The same file holds webhook, permission and rate limit fields. The script does not read them, so leave them as they are.