Server-side video processing with CE.SDK native Node.js bindings leverages native C++ performance and GPU acceleration. This guide covers resolution and duration limits, codec support, memory management, and hardware considerations for reliable video workflows.
The native Node.js bindings (@cesdk/node-native) support GPU-accelerated video export, unlike the WASM-based @cesdk/node package. This enables server-side video rendering with native performance.
Video Export Support#
The native bindings provide video export capabilities directly, without requiring the separate CE.SDK Renderer. Video encoding uses GPU acceleration via:
- Metal on macOS (ARM and x64)
- EGL on Linux (x64)
import CreativeEngine from '@cesdk/node-native';import fs from 'fs/promises';
const engine = await CreativeEngine.init({ license: 'YOUR_CESDK_LICENSE_KEY' });
try { // Load a video scene await engine.scene.loadFromURL('https://example.com/video-scene.scene');
const [page] = engine.block.findByType('page');
// Export as MP4 video. The engine drives its update loop automatically // during the export — no manual pumping is required. const blob = await engine.block.exportVideo(page, { mimeType: 'video/mp4', targetWidth: 1920, targetHeight: 1080, framerate: 30, onProgress: (rendered, encoded, total) => { console.log( `Progress: ${rendered}/${total} rendered, ${encoded}/${total} encoded`, ); }, });
await fs.writeFile('./output.mp4', Buffer.from(await blob.arrayBuffer()));} finally { engine.dispose();}Resolution Limits#
Video resolution capabilities depend on hardware resources and GPU capabilities. CE.SDK supports up to 4K UHD for processing and export on capable hardware.
The maximum export size varies by hardware capabilities. Before exporting at high resolutions, verify the target dimensions don’t exceed hardware limits.
Duration Limits#
Video duration affects processing time and memory consumption. CE.SDK optimizes for short-form content while supporting longer videos with performance trade-offs.
Stories and reels up to 2 minutes are fully supported with efficient processing. Videos up to 10 minutes work well on modern hardware. Longer videos are technically possible but may increase memory usage and processing time.
For long-form content, consider these approaches:
- Split longer videos into shorter segments for processing
- Use lower resolution for intermediate processing, then export at full quality
- Monitor memory usage to establish acceptable duration limits for your server configuration
Frame Rate Support#
Frame rate affects processing time and output quality. Server environments can handle high frame rates without the real-time playback concerns of browser implementations.
30 FPS at 1080p is broadly supported and provides efficient processing. 60 FPS and high-resolution combinations require more processing time but are well-supported in server environments.
Variable frame rate sources may have timing precision limitations. For best results with variable frame rate content, consider transcoding to constant frame rate before processing.
Supported Codecs#
Video export produces .mp4 files — MP4 is the only supported export container.
Video Codecs#
H.264/AVC is the exportable video codec. On macOS, video is encoded in hardware through Apple VideoToolbox. On Linux, H.264 is encoded in software and may require additional codec libraries to be available in your environment.
H.265/HEVC export is not available with the native bindings.
Audio Codecs#
Audio in exported videos is encoded as AAC inside the .mp4 container.
For importing media, a wider range of codecs is supported — see the file format support list.
Hardware Considerations#
The native bindings leverage hardware resources directly, providing better performance than the WASM-based package.
Recommended Server Specifications#
| Resource | Minimum | Recommended |
|---|---|---|
| Memory | 4 GB | 8+ GB for 4K content |
| CPU | 2 cores | 4+ cores for faster processing |
| GPU | Metal (macOS) or EGL (Linux); none on Windows | Dedicated GPU for best performance on Linux |
| Storage | SSD recommended | Fast I/O for video file handling |
GPU Requirements#
On macOS and Linux, the native bindings render on the GPU by default and fall back to CPU rendering when no compatible GPU is available (the device: 'auto' default — see the configuration guide):
- macOS: Metal-compatible GPU (all Apple Silicon Macs, most Intel Macs). Video encoding runs in hardware through Apple VideoToolbox.
- Linux: EGL-compatible GPU with appropriate drivers installed. Video is encoded in software, so a GPU improves rendering but is not used for encoding.
- Windows: no GPU is used for rendering.
device: 'auto'selects the CPU and'gpu'fails. Video is encoded in software. H.265 import is the exception: it decodes on the GPU through Direct3D 11.
Memory Constraints#
Server-side video processing operates within Node.js memory limits. Monitor consumption using standard Node.js APIs:
const memUsage = process.memoryUsage();console.log(`RSS: ${(memUsage.rss / 1024 / 1024).toFixed(1)} MB`);console.log(`Heap used: ${(memUsage.heapUsed / 1024 / 1024).toFixed(1)} MB`);Export Size Limitations#
Export dimensions are bounded by hardware texture size limits.
Common limits include:
- 4096 pixels: Basic configurations
- 8192 pixels: Most modern server hardware
- 16384 pixels: High-end GPU configurations
Troubleshooting#
| Issue | Cause | Solution |
|---|---|---|
| Export fails | Memory limits exceeded | Reduce resolution or split into segments |
| Codec not supported | Missing system codecs | Install required codec libraries |
| No GPU detected | Missing GPU drivers | Install Metal/EGL drivers for your platform |
| Slow processing | Insufficient hardware resources | Upgrade server specs or optimize content |