๐ŸŽฌQuilt Video Encoding

This page goes over video encoding details needed for making Quilt Videos as performant as possible.

Quilt files are quite large when compared to normal online video content. A typical YouTube video is streamed at 1920x1080 (or sometimes even 1080x720). In comparison quilt videos start at 3360x3360 and range all the way up to 8192 x 8192! In order to properly playback videos of these sizes there are a few key techniques and methods to learn, especially when working with 8K quilts.

In general, each step up in a codec (h264 -> h265 for example) will increase the complexity of decoding and encoding the video, so an h265 video is generally twice as complex for a computer to decode than an h264 video. However, this varies quite a bit when larger resolutions are brought into consideration.

8K Quilt videos must be encoded with H265/HEVC or VP9. For greatest compatibility we recommend HEVC.

Note that some platforms, like MacOS and iOS don't have built in support for VP9, or H265. This is changing with some of the newer Mac systems with built in encoding engines. Looking Glass Studio can playback these media types correctly, but playing them back in the browser or with the built in OS video player may not be possible.

Typical Quilt Sizes

DeviceResolutionColumnsEncoding Format

Looking Glass Portrait

3360x3360

8 x 6

VP8 / H264

Looking Glass 16"

4096x4096

5 x 9

VP8 / H264

Looking Glass 32"

8192 x 8192

5 x 9

VP9 / HEVC

Looking Glass 65"

8192 x 8192

8 x 9

VP9 / HEVC

Encoding Quilts with FFMPEG

If you have Looking Glass Studio installed, you also have ffmpeg installed. This means you can use the command line to encode videos, combine frames into a video and much more. Below are some example snippets for creating quilt videos.

Converting Existing Video

To convert an existing video into H265:

ffmpeg -i input.mp4 -vcodec libx265 -crf 20 output.mp4

To convert an existing video into VP9:

ffmpeg -i input.mp4 -vcodec libvpx-vp9 -crf 20 output.mp4

Converting Image Sequences into video

To convert an image sequence into an H265 video:

ffmpeg -r 60 -f image2 -s 1920x1080 -i image%04d.png -vcodec libx265 -crf 20  -pix_fmt yuv420p output.mp4

the command above is quite more complex than the ones above. A quick explanation is as follows:

-r denotes the frame rate you want the video to be, here it's being defined as 60 frames per second.

-f defines the pipeline, in this case it is called image2 and is image to video.

-s defines the resolution, make sure it matches your quilt dimensions!

image$04d.png refers to the file name and amount of numbers following the filename. Typically image sequenes are saved out sequentially like this: filename0001.png, filename0002.png..... the %04d refers to the four digits at the end of the name. If your file has a different number of digits please adjust the command to the appropriate number.

-vcodec refers to the encoding library, in this example we're using libx265 which is a CPU encoder for the h265 codec.

-crf is the quality of the video. 0 is the highest quality but will also result in the largest file and be very difficult to playback. 25 is a good number.

-pix_fmt is the format for the actual picture format, this must be yuv420p.

Depending on your content, you may be able to get away with more or less compression than what is shown below (-crf 20). This is our standard, however, and is used in our Unity plugin. For higher-quality video output, we use -crf 15. Please note that using a compression rate lower than 20 for the 32" and 65" will make playback computationally taxing - we recommend you use a computer with an Nvidia RTX 3090 GPU or better to handle the video playback.

Last updated

#502: August 18 Changes

Change request updated