← All posts

Practice

One parameter set for preview and export

Process a preview-sized frame while dragging sliders, then the original on export. Both calls use the same beauty parameters.

In a camera or a short-video editor, the user watches a preview while dragging sliders, and the original is processed on export. If those two steps use different filters, the file will not match what they saw.

Facebetter runs both calls with one parameter set. Preview uses a scaled frame. Export uses the original resolution. What changes is the input size, not the whitening, reshape, or filter values.

Adjusting

Don’t send the full-resolution original on every slider move, and don’t throw the original away after you scale it. The preview frame is there so the slider feels immediate. Keep the original for export. A frame is about 10ms; preview size is what you want while dragging. Export runs the original, up to 2K.

A parameter change applies on the next process call. Don’t add a cloud filter between preview and export. The strength will drift, and the frame will leave the device.

Live video is different

A live room has no separate export. Local preview and the frame you send should be the same processed result. See Process frames inside TRTC. Short video is the case that splits preview and export into two calls. The parameters stay shared.