Skip to content

Watch a flight, live or recorded

A gusty hover hop on real ArduPilot SITL, rendered from its own log by render_video: 6 m/s from the west with seeded Dryden gusts, climb to 9 m, hold 12 s, land in QLAND.

Every picture shows the same scene in one of three layouts:

  • fpv: a nose camera with a HUD. It shows height, airspeed, climb rate and the true wind with its gust, plus the mode, armed state, throttle, lift-motor demand, current, voltage, energy and the latest autopilot messages.
  • chase: a camera behind and above the aircraft, showing its track, its shadow and the wind on a compass.
  • pip: the FPV view with the chase view inset.
video_feed(session_id="d224b4")
{ "on": true, "layout": "pip", "viewers": 0, "encoder": "h264_nvenc",
"vlc": "vlc http://127.0.0.1:8440/video.ts",
"page": "http://127.0.0.1:8440/",
"frame": "http://127.0.0.1:8440/frame.jpg" }

Open the vlc line in VLC or mpv, or the page in a browser, which plays an MJPEG stream with nothing to install. The feed listens on MCARDUPILOT_VIDEO_PORT_BASE (8400) plus the instance number, on 127.0.0.1 unless MCARDUPILOT_VIDEO_HOST says otherwise. To change the view live, call video_feed(session_id, layout="chase"). on=false stops the feed, and closing the session stops it too.

The aircraft’s position and attitude come from SITL itself. Every session launches SITL with --enable-fgview, which makes it send its simulated state to UDP 5503 + 10 × instance at every physics step, as it would to FlightGear. That costs SITL about 4% more CPU and changes nothing about the flight. A SITL that sends nothing still gets a picture, from the session’s telemetry at a few hertz.

Ask for the recording when you open the session:

open_sitl(label="gusty-hop", record_video="pip", wind={...})
...
close_sitl(session_id) # "video": {"video_id": "a09ddb", "status": "rendering", ...}
video_status(video_id="a09ddb")

Or render any log afterwards. A log is named the way log_summary takes it: a session id, a kept log’s name, or a path.

render_video(log="20261003T225739Z-video-demo-gusty-hop.BIN", layout="chase")
render_video(log="...", t0_s=60, t1_s=75) # just the part you care about

A recording is drawn from SITL’s own records in the log, so it shows the truth, not the estimator:

  • Pose: from SIM, about 10 Hz for attitude and position, and SIM2, a few hundred hertz for position and velocity.
  • Wind: from the SIM_WIND_SPD and SIM_WIND_DIR changes the gust model sent.
  • Speed: from the logged SIM_SPEEDUP.

Log time is sim time, so the video plays at the speed the aircraft flew, whatever speedup the session ran at, and idle-paced pauses disappear. By default it runs from four seconds before arming to four seconds after disarming. Rendering runs faster than real time: the 51-second flight above took 33 s at 960×540, 5 MB with NVENC.

A kept log’s video goes beside it as <stem>.<layout>.mp4. The log budget counts it and deletes it with the log, and pin_log spares both. A log the server doesn’t own, such as a live session’s or another project’s, renders into <data_dir>/videos instead, so nothing is written next to files that belong to someone else.

A log from a real aircraft has no SIM records. It still renders, from the estimator’s attitude and position, and its wind is then labelled WIND est.

render_video is quick and made to be read: a HUD, a track, the wind on a compass. render_film is made to be watched. It renders the same log in Blender as a lit 3D scene, with sky, sun and shadow and a runway laid along the home heading.

The same gusty hop, filmed by render_film with the built-in quadplane, in its 6 m/s westerly with gusts.

render_film(log="20261003T225739Z-video-demo-gusty-hop.BIN") # chase
render_film(log="...", camera="ground", t0_s=40, t1_s=70) # a spectator
render_film(log="...", camera="fpv") # from the nose
render_film(log="...", engine="cycles") # path traced

The weather is the wind SITL actually flew, gusts included. A windsock beside the runway reads like a real one: it hangs limp in a calm, stands straight out at 15 knots (each of its five stripes is 3 knots), points downwind, and swings with every gust. Paler patches drift across the grass at the wind’s own speed and direction, the way gusts show on a real field, and they grow plainer as the wind strengthens. The windsock is placed for the camera, beyond the aircraft for the ground camera and ahead and to the left for the chase and the nose camera, so it is in the shot at takeoff and landing. Once the aircraft flies out past it, the windsock stands between the camera and the aircraft, and a long lens aimed at the aircraft would sweep it across the frame as a blurred pole many times its size. So while it is in front of the aircraft and in the frame, it is hidden, and it goes and comes back just outside the frame’s edge. SITL’s own turbulence (gusts: "sitl") is not logged, so a film shows its mean wind only.

A film opens on an establishing shot. For 7 seconds (MCARDUPILOT_FILM_INTRO_S) the aircraft sits on the runway with its props still, the windsock blowing, while the camera eases round it from wide and high to exactly where the flight’s own camera starts, so the shot runs straight into the takeoff. Over it, a title card fades up from black. It gives the flight’s name, the airframe and its firmware, the date and local time the session was flown, where it was, and the wind. The time comes from the kept log’s name, which is the wall clock. The log’s own GPS time is the simulator’s, and an exact flight pins it to a fixed date. On the right of the card, “Powered by” and the ArduPilot logo credit the autopilot every film shows. The logo is the project’s own, used unchanged under CC BY-SA 3.0. ArduPilot is a registered trademark of Software in the Public Interest, Inc., and the credit implies no endorsement. render_film(intro=false) starts on the flight. An airframe description’s "name" is what the card calls the aircraft.

A heads-up display carries the flight’s numbers, drawn from the log onto each frame as it is encoded. Top left shows the flight’s name, the date, and a flight clock counting from arming, T−00:04.0 before it and T+01:12.4 after. Bottom left shows altitude in large digits, with climb rate, airspeed and groundspeed. Bottom centre is an attitude ball with heading, roll and pitch. Bottom right shows the flight mode and armed state, bars for lift and thrust, and volts, amps and energy. The wind rose sits top right, with a small north-up map beneath it: the whole ground track drawn faintly, the part flown so far in amber, home as a square, and the aircraft as an arrow pointing along its heading. The map scales to fit the flight, never less than about 40 m across so a hover still has room, and its scale bar reads a round distance in the film’s height unit. The autopilot’s latest messages fade in above the left panel. Heights and speeds are in feet, knots and feet per minute by default, as American pilots and controllers use them. units="imperial" gives feet, mph and feet per minute, and units="metric" gives metres and metres per second. MCARDUPILOT_FILM_UNITS changes the default. The airspeed is SITL’s true airspeed unless you pass airspeed="eas", which shows the airspeed sensor’s equivalent airspeed as the autopilot logged it, labelled EAS. Use EAS when the film sits beside a test card or a stall speed, since that is the speed they are written in. If the SITL models a static-port error (TerraHawk’s build logs it as SACP), the sensor reads low at high angles of attack, and “EAS” for its reading misleads. airspeed="sensor" labels the same reading IAS and, where the log has SACP, puts the pitot’s EAS before the static-port error beside it, so the error shows on screen. render_film(map=false) keeps the HUD without the map, and render_film(hud=false) leaves the picture clean.

There are three cameras. chase sits behind and above and turns with the aircraft after a short lag, like a pilot following it. ground stands beside the takeoff point and follows the aircraft like a spectator. Both zoom as an operator would, keeping the wingspan a steady share of the frame whatever the aircraft’s size or distance. fpv is a nose camera: it sits just ahead of the airframe’s front, looks straight ahead through a wide 18 mm lens, and rolls and pitches with the aircraft, so the horizon tilts in a bank and the runway falls away on the climb. Its establishing shot is filmed from outside, ending where the chase camera would start, and the film cuts to the nose as the flight begins. Its file is <stem>.film-fpv.mp4.

The pose is SITL’s truth from the log, as for render_video, and the film plays at the speed the aircraft flew, unless you fast-forward a stretch. Blender does no arithmetic of its own. The server works out every pose and camera position and passes them in a job file, and Blender only builds the scene and renders frames. Each frame goes to ffmpeg as soon as it is complete and is then deleted, so a long film never holds more than a frame or two on disk.

It is slower than render_video. With Eevee a frame takes about 0.1 to 0.3 s, so a minute of flight takes a few minutes. Cycles is many times slower and looks it. A film is a background job like any render: render_film waits up to about 85 s, then video_status follows it. A kept log’s film goes beside it as <stem>.film-<camera>.mp4, and is pruned and pinned with the log.

The file name comes from the log and the camera, plus -ghost, -ff and -music when a film has them. So the same log rendered the same way twice wants the same file, and the second render is refused rather than quietly replacing the first: a quick check of a log would otherwise overwrite a film you have already published. Pass overwrite=true to replace it on purpose, or name to put a variant beside it, which adds -<name> to the file name. A render still writing a file is never joined by a second one, overwrite or not.

render_film(log="...", t0_s=230, t1_s=232, intro=False, name="check") # <stem>.film-chase-check.mp4
render_film(log="...", overwrite=True) # replace the film on purpose

render_film(ghost=...) flies a second flight’s log in the same scene, as a pale translucent copy of the same airframe beside the main one. The ghost is named the way log is: a session id, a kept log’s name or a path.

render_film(log="20261007T190147Z-batch-dfcd9e-a1", ghost="20261007T190216Z-batch-dfcd9e-b1")

The two flights are lined up by log time: each frame shows the ghost where its own log had it at the same second, measured from its own takeoff point, with its props turning from its own outputs. That is exact for an A/B flown with fly_exact, where both flights share one sim clock from the anchor. The ghost then flies hidden inside the main aircraft until the change takes hold, and comes out of it as the two paths split. Any two logs will play together, but log time only lines them up if they started at the same moment, so for other pairs the picture compares positions at the same second rather than at the same point of the flight.

The HUD gets a legend under the flight clock: GHOST and the ghost’s name in its cyan, and the live separation between the two, across the ground and above or below, in the film’s height unit (feet unless units="metric"). Under ten it shows one decimal, so the first few centimetres register. The map draws the ghost’s track faintly in cyan, solid where it has flown, with the ghost as a ring. Where the two first part visibly, by SITL’s truth more than 1 mm or 0.1° apart (the same test as b_visible from an exact batch), the caption GHOST PARTS HERE shows at the top for a couple of seconds. The title card adds a line naming the ghost. The film goes to <stem>.film-<camera>-ghost.mp4, so it never overwrites the plain film of the same log.

music lays a sound file under the film. Any format ffmpeg reads will do. A track shorter than the film loops, it fades in and out, and it ends with the last frame. music_credit goes on the title card, and the result carries the file’s sha256, so you can always say which recording a film used.

render_film(log="20261010T160618Z-first-hover", title="The first hover",
music="~/music/valkyries-edison-1921.ogg", music_volume=0.9,
music_credit="Wagner, Ride of the Valkyries (American Symphony Orchestra, Edison 1921, public domain)")

Pick a recording you may publish. The composition being old isn’t enough, because every recording has its own rights. Two sources that are clean to use:

  • Wikimedia Commons has the 1921 Edison recording of the Ride of the Valkyries, from the National Park Service’s Edison collection. It’s public domain in the United States, and the file page says so.
  • Musopen records music to give it away. Filter by its public-domain license and check each track’s page, since not every recording there is public domain. Two bulk collections are on the Internet Archive.

Recordings differ in level by as much as 14 dB, a 1921 acoustic disc against a modern orchestra, so set music_volume from a measurement rather than by ear if several films will sit together. ffmpeg -ss <start> -t <film length> -i track.ogg -af ebur128 -f null - prints the integrated loudness of the part a film will use, and a gain of 10^((target − measured)/20) brings it to the target; about −21 LUFS sits well under a film.

Music can follow the flight. The Hall of the Mountain King builds to a break, as a stall test does. The Blue Danube suits a slow approach to a dock. The William Tell finale suits a first transition. Keep the credit on the title card and beside the video wherever it is published, since a video site can flag a public-domain recording that sounds like a copyrighted one.

A film ends on a card. The last frame holds for 5 seconds (MCARDUPILOT_FILM_OUTRO_S) while the picture eases in a little and darkens under the flight’s name, the airframe and its firmware, and three numbers from the log: time aloft from first arm to last disarm, the highest point above home, and how far it went over the ground, in the film’s units. The ArduPilot credit and any music credit sit beneath, and the picture goes down to black. render_film(outro=false) ends on the flight’s last frame instead. The card is drawn from Blender’s last frame, so it adds nothing to the render time.

A film with music also opens and closes on its own sound. Over the title card, air rushes in from the left, and each of the airframe’s rotors spins up as its own voice, so they land together on a chord just as the card is fully up. A three-note chime then rings on the title. The music comes in under the tail of that and is at full level as the flight begins. Over the end card, the music fades as the chime falls, the rotors spin down, and a low chord settles. TerraHawk’s five two-bladed rotors give it five voices; a quadcopter gets four.

The sounds are in the music’s key, so the opening chord leads into it rather than beside it. The key is found from the minute of the track the film plays, by measuring each of the twelve notes and matching them against the usual major and minor key profiles; notes in the bass count double, because harmony sits on its root. The result says which key it used. It hears what is played, so an excerpt that dwells on the dominant gets the dominant, the chord that leads into it best; sting_key="E" or "Bm" sets it outright, and without music the sounds are in A major.

These sounds are synthesized when the film is made, in plain Python, rather than taken from a recording, so there is nothing to license or credit. The same airframe always gets the same sound. sting=false leaves them out of a film with music, and sting=true puts them on a film without any, written as <stem>.film-<camera>-sting.mp4 so the silent film beside it stays silent.

Under the music, a film can carry the sound of the flight itself, made from the log. Each rotor is a voice whose pitch and loudness follow its logged output, panned to where it sits on the airframe, so the lift motors swell on the climb, fade through a transition as the pusher’s lower drone takes over, and come back for the hover. A rotor that stops goes quiet: when a lift motor fails, you hear its voice drop out of the chord. The air rushes louder with the logged airspeed and the gusts. Small cues mark what the HUD marks: a click when it arms, a quiet note in the film’s key at each mode change, a swoosh where a fast stretch starts and ends, and a thump at touchdown as hard as the touchdown was, from the speed SITL reports when the aircraft meets the ground. A 0.3 m/s landing barely registers, and a 6.7 m/s impact lands like one.

In a ghost film the ghost’s rotors are a second set of voices, slightly detuned by how far apart the two aircraft are. While the flights are the same they sound in unison. As they part, a slow beating comes up and quickens with the distance, so an A/B difference can be heard before it can be seen. A ping marks the moment they first part visibly.

The closing sound follows how the flight ended. A landing below 3 m/s, or a film that ends in the air, settles on the major chord. After an impact the closing turns minor, the rotors cut out instead of winding down, and the low chord does not resolve.

flight_sound is on whenever the stings are, so a film with music has it unless you pass flight_sound=false. On a film without music, flight_sound=true writes <stem>.film-<camera>-sound.mp4. It is synthesized while Blender renders, a few seconds of work for several minutes of film, so it adds nothing to the wait. It sits about 9 dB under the music.

Real flights have long quiet stretches: a loiter, a climb to height, two minutes circling before a landing. fast_forward plays them faster without cutting them out, so the film stays one continuous flight.

render_film(log="...", fast_forward=[{"from_s": 185, "to_s": 298, "speed": 4}])

Each stretch is given in log seconds, at a speed above 1 and up to 32 (4 if you leave it out), and stretches must not overlap. While one lasts, a pill beside the flight clock reads 4× SPEED, and the clock keeps log time, so it visibly runs fast. Nobody watching mistakes a fast stretch for real time. The camera’s lag and the drifting gust patches follow log time, so the chase camera swings round with the aircraft at the faster pace and the air moves as far as it really did. The props turn at their usual film rate, which was chosen to read on screen, and do not blur into a strobe. A ghost plays fast alongside, since it is lined up by log time. Music plays at its own speed under the shorter film. The film goes to <stem>.film-<camera>-ff.mp4, beside the real-time one, and the result repeats the stretches you asked for.

Without one, the film draws a simple quadplane whose four lift props and pusher spin with the log. To fly your own, describe it in a JSON file. Paths inside it are relative to the file:

{
"axes": "-y,x,z", // the mesh's forward, left and up: here +x port, +y aft, +z up
"scale": 1.0, // mesh units to metres (0.001 for millimetres)
"cg": [0, 0.25, 0], // where SITL's position sits, in mesh units
"parts": [
{"stl": "geo/fuselage.stl", "colour": "#ecebe7", "rough": 0.35, "faces": 30000},
{"stl": "geo/keel.stl", "colour": "#1c1e21", "metal": 0.15}
],
"rotors": [
{"at": [-0.2, 0.05, 0.0], "diameter": 0.2, "drive": "motor1", "spin": "ccw"},
{"at": [0, 0.6, 0], "diameter": 0.25, "drive": "throttle", "axis": [0, -1, 0], "spin": "cw"}
]
}

Each part is an STL with its own colour, roughness and metalness, decimated to about faces (a CAD mesh of a million triangles renders fine at tens of thousands). Each rotor spins with its own output. drive is motor1 to motor8 or throttle, read from the log’s RCOU through that log’s SERVOn_FUNCTION parameters, so a board that wires its outputs differently still spins the right prop. axis is the way the rotor’s thrust points, [0, 0, 1] for a lift rotor, and spin is its direction seen from that side. The pusher above thrusts forward, so it turns cw seen from ahead, which is counter-clockwise from behind. Blades spin at a speed a camera can show, and a faint disc thickens with the output, the way a fast prop reads on film.

Mind the handedness of axes. A real, right-handed mesh needs a proper rotation. A spec that mirrors the mesh, such as -y,-x,z for a mesh with +x to port, still renders, with its normals flipped back, but as a mirror image.

The film finds its airframe in this order:

  1. render_film(airframe=...).
  2. The log’s recipe. A preset that names "airframe" (relative to the preset) records it when it opens the session, and so does open_sitl(airframe=...). A project’s flights then film as its own aircraft without anyone asking, while a flight on SITL’s stock model still films as the stand-in.
  3. MCARDUPILOT_FILM_AIRFRAME, the server’s default.
  4. MCARDUPILOT_FILM_MESH with _AXES, _SCALE, _CG and _FACES: one STL, in one colour, with no rotors.
  5. The stand-in quadplane.

When none of the first three gives an airframe, airframe comes back null and airframe_note says why and what was drawn instead: the mesh, or the stand-in.

An airframe named by a preset is forgiven when it fails to load, because its parts may be generated files that aren’t there yet. open_sitl opens the session anyway and says so in warnings, and a film falls back to the mesh or the stand-in with the reason in airframe_note. An airframe passed by name, to either tool, is refused if it doesn’t load.

The aircraft rests on its lowest point when SITL puts it on the ground, so an airframe with its CG above its landing gear stands on the runway rather than sinking into it.

MCARDUPILOT_FILM_BLENDER is blender on PATH by default, and any Blender from 4.2 up works. On a machine without one, run it in a container:

Terminal window
MCARDUPILOT_FILM_BLENDER=docker:registry.example/blender:5.2

Any image with blender on its PATH will do. The container gets the GPU, runs as your user, and sees only the film’s work directory and the mesh’s directory, the second read-only. MCARDUPILOT_FILM_SIZE (1280x720) and MCARDUPILOT_FILM_ENGINE (eevee) set the defaults. The frame rate is MCARDUPILOT_VIDEO_FPS.

A Blender on the host runs with factory settings and its own extensions folder, films/.blender-extensions in the server’s data directory, so a render never touches the extensions installed in your own Blender, even one open on the desktop while films render. Before 2026.10.11 it could: the render reset Blender in a way that made it delete the Python packages of every installed extension, and the desktop Blender lost its add-ons until it was restarted. Upgrade if you are on an older release.

video_frame(session_id="d224b4") # the picture now
video_frame(log="...gusty-hop.BIN", t_s=75.0, layout="chase")

video_frame returns one frame as an image. For a session with a live feed it is exactly the frame on the viewer’s screen. It’s the quickest way for an agent to check what a person is looking at before describing it.

ffmpeg on PATH. Encoding uses NVENC when ffmpeg can open it, else libx264. Set MCARDUPILOT_VIDEO_ENCODER to choose one. MCARDUPILOT_VIDEO_SIZE (960x540) and MCARDUPILOT_VIDEO_FPS (30) apply to both live feeds and renders.