Links
🎬

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

Device
Resolution
Columns
Encoding Format
Looking Glass Portrait
3360x3360
8 x 6
VP8 / H264
Looking Glass Portrait High Res
3840x3840
8x6
VP8 / H264
Looking Glass 16"
4096x4096
5 x 9
VP8 / HEVC
Looking Glass 32"
8192 x 8192
5 x 9
HEVC / VP9

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 25 output.mp4
To Convert an existing video into VP9:
ffmpeg -i input.mp4 -vcodec libvpx-vp9 -crf 25 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 25 -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.
​