kinetograph.

4K rendering

Render a 3840 by 2160 video, either by declaring a 4K composition or by scaling a 1080p one, and keep a high-quality master.

There are two ways to get 4K. Declare the composition at 3840 by 2160, or keep it at 1080p and add --scale 2. Either way each frame is drawn at the final size, so text and edges stay sharp.

npx kinetograph render src/index.tsx --scale 2 -o out/title-4k.mp4

Scale a 1080p composition

--scale <n> multiplies the output size, from above 0 up to 8. --scale 2 turns 1920 by 1080 into 3840 by 2160, and --scale 0.5 gives 960 by 540. render, still, strip and onion all take it. It is the quickest way to try 4K without touching the project, and it also lets you work at 1080p and export at 4K. --draft is --scale 0.5, and you can't give both.

Declare a 4K composition

Set width={3840} and height={2160} on the Composition (data-width and data-height on a HyperFrames page's root element), and size things for that canvas. This suits a project that is always 4K. Pixel sizes then mean what they say: a 120 px headline is 120 px of 2160.

What it costs

A 4K frame has four times the pixels of a 1080p one, so expect each frame to take longer and use more memory. Don't guess at the numbers: run npx kinetograph bench <entry> on your project at the size you plan to render, and check a still first with still --scale 2.

Masters and 10-bit

For a master you will grade or edit later, ask for a higher-quality file:

npx kinetograph render src/index.tsx --scale 2 --codec prores --prores-profile hq -o out/renders/master.mov
npx kinetograph render src/index.tsx --scale 2 --pixel-format yuv420p10le --codec h265
  • ProRes is 10-bit. hq is the default profile, and the 4444 profiles are 4:4:4.
  • --pixel-format takes 10-bit formats such as yuv420p10le, yuv422p10le and yuv444p10le. Players handle 10-bit H.264 and H.265 unevenly, while 8-bit 4:2:0 plays everywhere.
  • Output is tagged BT.709 SDR whatever the pixel format. See HDR video.

Lower --crf for quality, or set --video-bitrate. The CLI reference lists every flag.

On this page