Encode Your Frames to Video
Turn rendered 360 and 180 frames into a video: ffmpeg, joining stereo eyes, Premiere Pro export and exporting after grading.
Last updated About 4 hours ago
This article covers turning your rendered frames into a video file you can deliver: which frames to encode, encoding with ffmpeg, joining separate eye files into one video, exporting from Premiere Pro, and exporting after you grade. For the metadata headsets and online players need to play the video as 360 or 180, see 360 and 180 Metadata.
Why Render Frames, Then Encode
Render image frames from
Movie Render QueueorMovie Render Graph, then encode them to video. This lets you render larger thanH.264allows (4096 x 4096), choose a codec your player supports, and add the metadata headsets and online players need to play the video as 360 or 180.For which frame format to render, see Output File Formats.
Which Frames to Encode
To encode
EXRframes straight to video, render them withDisable Tone Curveunticked.ffmpeg cuts
EXRvalues above 1.0 to white, so anEXRrendered withDisable Tone Curveticked loses its highlights in the video. For a graded delivery, grade theDisable Tone CurveEXRfiles in software that reads them directly, such as DaVinci Resolve or Nuke, then encode from that (seeExport After Gradingbelow).When you encode
EXRframes with ffmpeg, put-apply_trc iec61966_2_1before-i, or the video comes out too dark.
Encode with ffmpeg
You must install FFMPEG to use it in the command line.
FFmpeg is a leading free, open-source multimedia framework designed to decode, encode, transcode, mux, demux, stream, filter, and play nearly any audio or video format.
For example, below shows how to encode your saved stills to video using a wider range of formats and color spaces than h.264.
Navigate to the render output folder and type
CMDto bring up the Windows Terminal in the File Directory where you have saved your rendered files.
Paste the below command into the terminal and press enter.
It can help to redraft and save the command in notepad, changing any parameters that are unique to your own PC or render, such as the file names, frame numbers and output path.

ffmpeg -f image2 -framerate 60 -start_number 500 -apply_trc iec61966_2_1 -i "LS_DrivingPlate.%04d.exr" -frames:v 200 -vf "scale=8192:4096:flags=lanczos,format=yuv420p10le" -c:v libsvtav1 -preset 8 -crf 22 -color_primaries bt709 -color_trc bt709 -colorspace bt709 "F:\OWL\Renders\360\ffmpeg\DrivingPlate180.mp4"For a headset, set the size, frame rate and bitrate from the values for your headset in Headset Delivery Settings.
What the Command Does
ffmpeg -f image2: Starts ffmpeg and tells it the input is a numbered image sequence.-framerate: The frame rate the image sequence plays at. The video file uses the same rate. -start_number 500: The number of the first image to read. Images with lower numbers are skipped.-apply_trc iec61966_2_1: Converts the EXR's linear color with the sRGB curve, so the video matches Unreal's own PNG and JPG output. Without it the video comes out too dark.-i "LS_DrivingPlate.%04d.exr": Finds any files with the name LS_DrivingPlate.exr and with four integers to label the frame number.-frames:v 200: How many images to put in the video, counting from the start number.-vf: Video Filters"scale=8192:4096:flags=lanczos,format=yuv420p10le": Resizes every frame to 8192 x 4096 with the Lanczos filter, which keeps detail sharp, then converts it to 10-bit color (yuv420p10le), which gives smoother gradients than 8-bit.-c:v libsvtav1: The encoder: SVT-AV1, which makes AV1 video, a high quality compressed format.-preset 8: The encoding speed. Lower numbers encode more slowly but give better quality for the same file size. It doesn't change how fast the video plays back.-crf 22: (Constant Rate Factor) The quality level, from 0 to 63. Lower numbers give higher quality and bigger files. It gives more data to busy, fast-moving shots and less to still ones, so the quality stays even. -color_primaries bt709 -color_trc bt709 -colorspace bt709: Labels the video as Rec. 709, the standard color space for online video. These flags only label the file. They don't convert the color, which is what -apply_trc does. "F:\OWL\Renders\360\ffmpeg\DrivingPlate180.mp4": The final output directory for the video file.
Join Separate Eyes into One File
To join Separate Eyes files into one Top-Bottom video, stack the left eye on top of the right:
ffmpeg -framerate 60 -apply_trc iec61966_2_1 -i "Shot_L.%04d.exr" -framerate 60 -apply_trc iec61966_2_1 -i "Shot_R.%04d.exr" -filter_complex "[0:v][1:v]vstack=inputs=2,format=yuv420p10le" -c:v libx265 -crf 18 "Shot_TB.mp4"For Side-by-Side (left eye on the left), use
hstackinstead ofvstack.Then add the stereo metadata (see 360 and 180 Metadata).
Add the 360 or 180 Metadata
ffmpeg doesn't add the metadata that tells YouTube and VR players a video is 360 or 180, so they play it as a flat video. Add it afterwards with Google's Spatial Media Metadata Injector: see 360 and 180 Metadata.
Export from Premiere Pro
In Premiere Pro, right click in a project's
Binand selectImport, select this first image in animage sequence, ensureImage Sequenceis ticked and clickImport.
Check the
Frame Rateis correct usingModify > Interpret Footage:
Select an
Assumed Frame Rateof whatever you have rendered at in Unreal.
Right click on the
sequenceand selectNew Sequence from Clip.
Use
File > Export Mediato bring up the Export Tab. For example, you can follow the steps below for Quest 3 (the screenshots show example values):Create a new preset and ensure it is set to
Custom. Set the format to theCodecfor your headset in Headset Delivery Settings. For Quest 3, useHEVC (H.265), which plays well at high bitrates;AV1is also suitable:
Set the resolution and frame rate to the values for your headset. For Quest 3 that is
5760×5760at60 fpsfor stereo 360, or8192×4096at60 fpsfor mono:
Set the Encoding settings to
Hardware Encodingfor the fastest rendering,Main 10 Profilefor 10-bit color andLevel 6.1as a performance constraint for 8k video:
Set the
Target Bitrateto the value for your headset (120-180 Mbpsfor Quest 3).
Set the VR Metadata to match your 360 format. Stereoscopic Side by Side with a 180 Horizontal and Vertical field of View is suitable for VR 180 format. For
Equirectangular ODS (VR 360), use Stereoscopic Over/Under with 360 by 180. Match the eye order to the camera'sLayout:VR 180defaults toSide-by-Side (Left Eye on Left), andEquirectangular ODS (VR 360)toTop-Bottom (Left Eye on Top).
Export After Grading
Export the graded film from your grading software as an image sequence or a high-quality master such as
ProRes, then encode it for where it plays.For headsets, use the values in Headset Delivery Settings. For domes, ask the venue for its playback specification (see Deliver to Domes).
ffmpeg clips values above 1.0, so encode from the graded export, not from
Disable Tone CurveEXRs.