Search
Loading...
Skip to content

Supported File Formats for Import (Node.js)

When building server-side creative applications with CE.SDK in Node.js, understanding which file formats you can import is essential for processing user content at scale. CE.SDK’s Node.js package supports the same comprehensive range of modern media formats as the browser version.

This guide provides a complete reference of supported file formats for importing media, templates, and fonts into CE.SDK on Node.js.

Supported Import Formats#

CE.SDK for Node.js supports importing the following media types:

CategorySupported Formats
Images.png, .jpeg, .jpg, .gif, .webp, .svg, .bmp
Video.mp4 (H.264/AVC, H.265/HEVC), .mov (H.264/AVC, H.265/HEVC), .webm (VP8, VP9, AV1)
Audio.mp3, .m4a, .mp4 (AAC or MP3), .mov (AAC or MP3)
Animation.json (Lottie)
Templates.idml (InDesign), .psd (Photoshop), .scene (CE.SDK Native)

Video and Audio Codecs#

While container formats (.mp4, .mov, .webm) define how media is packaged, codecs determine how the content is compressed. CE.SDK for Node.js supports the following codecs:

Video Codecs#

  • H.264 / AVC (in .mp4 or .mov) – Universally supported with software decoding
  • H.265 / HEVC (in .mp4 or .mov) – Requires platform-specific support; availability varies by system libraries
  • VP8, VP9, AV1 (in .webm) – Modern codecs supported through system media libraries

Audio Codecs#

  • MP3 (in .mp3 files or within .mp4/.mov containers)
  • AAC (in .m4a, .mp4, or .mov containers)

Size Limits and Constraints#

CE.SDK for Node.js processes media using the system’s available resources. Server environments typically have more memory and CPU resources than browsers, but you should still be mindful of limits:

Image Resolution Limits#

ConstraintRecommendation / Limit
Input ResolutionMaximum input resolution is 4096×4096 pixels by default. Images from external sources are resized to this size before rendering. You can modify this value using the maxImageSize setting.
Output ResolutionThere is no enforced output resolution limit. The editor theoretically supports output sizes up to 16,384×16,384 pixels. Practical limits depend on available system memory and CPU resources.

All image processing in CE.SDK for Node.js is handled server-side using CPU-based rendering (no GPU required). The default limit of 4096×4096 ensures reasonable processing times and memory usage. Higher resolutions will work but may require more memory and longer processing times.

Video Resolution and Duration Limits#

ConstraintRecommendation / Limit
ResolutionUp to 4K UHD is supported for processing, depending on available system resources. Maximum video size is bounded by the 32-bit address space of WebAssembly (wasm32) and available system memory.
Frame Rate30 FPS at 1080p is recommended; 60 FPS works but increases processing time
DurationStories and reels of up to 2 minutes process efficiently. Longer videos up to 10 minutes are supported, with processing time scaling proportionally with duration.

Format-Specific Considerations#

SVG Limitations#

CE.SDK uses Skia for SVG parsing and rendering. While most SVG files render correctly, there are some important limitations to be aware of:

Text Elements#

  • SVG text elements are not supported – any text in SVG files will not be rendered.
  • Convert text to paths in your vector editor before exporting if text is needed.

Styling Limitations#

  • CSS styles included in SVGs are not supported – use presentation attributes instead.
  • RGBA color syntax is not supported – use fill-opacity and stroke-opacity attributes.
  • When exporting SVGs from design tools, choose the “presentation attributes” option.

Unsupported SVG Elements#

The following SVG elements are not supported:

  • Animation elements (<animate>)
  • Foreign object (<foreignObject>)
  • Text-related elements (<altGlyph>, <font>, <glyph>)
  • Script elements (<script>)
  • Some filter elements (<feComponentTransfer>, <feConvolveMatrix>, <feTile>, <feDropShadow>)
  • Inlined SVGs via <image> or <feImage> elements

WebP Support#

WebP images are fully supported for import in Node.js environments. CE.SDK handles both lossy and lossless WebP formats, including images with transparency (alpha channel). WebP provides excellent compression with high quality, making it ideal for optimizing storage and bandwidth in server applications.

Animated GIF Considerations#

While CE.SDK can import animated GIF files, they are rendered as static images showing only the first frame. For animated content in server environments, consider using:

  • Video files (.mp4) for complex animated content with better compression
  • Process frame-by-frame if you need to extract all GIF frames

Template Format Details#

CE.SDK supports importing templates from popular design applications:

  • IDML (InDesign Markup Language) – Import layouts and designs created in Adobe InDesign
  • PSD (Photoshop Document) – Import layered Photoshop files with preserved layer structure
  • SCENE – CE.SDK’s native scene format, optimized for fast loading and processing

When importing IDML or PSD files in Node.js, CE.SDK preserves layer hierarchy, text formatting, and design structure where possible. Some advanced effects or features specific to the source application may require manual adjustment after import.

Font Format Support#

CE.SDK for Node.js supports modern font formats for typography:

FormatDescription
.ttfTrueType Font
.otfOpenType Font
.woffWeb Open Font Format
.woff2Compressed Web Open Font Format 2

Best Practices for Node.js#

Format Selection#

When building server-side applications, consider these format recommendations:

  • Images: Use .webp for optimal storage efficiency. Use .png for lossless images with transparency or .jpeg for photographs.
  • Video: Prefer .mp4 with H.264 encoding for maximum compatibility across deployment environments.
  • Audio: Use .mp3 for universal compatibility or .m4a (AAC) for better quality at smaller file sizes.
  • Templates: Use .scene format for CE.SDK-to-CE.SDK workflows to minimize parsing overhead.

Validation and Error Handling#

Always validate file formats before processing on the server:

  1. Check file signatures (magic bytes) not just extensions – users may upload misnamed files
  2. Validate MIME types from uploaded content
  3. Set maximum file size limits to prevent resource exhaustion
  4. Implement timeouts for processing operations to prevent hanging requests
  5. Log validation failures for debugging and security monitoring

Resource Management#

For production Node.js deployments, implement proper resource management:

  • Memory limits: Monitor and limit memory per process (use Node.js --max-old-space-size flag)
  • Concurrency control: Limit concurrent processing jobs to prevent resource exhaustion
  • Cleanup: Always dispose of resources after processing (call dispose() on engine instances)
  • Queue systems: Use job queues (Bull, BullMQ) for long-running video processing tasks
  • Progress tracking: Implement progress callbacks for long operations
  • Caching: Cache processed assets when appropriate to reduce redundant processing

File System Considerations#

When working with local files in Node.js:

  • Use absolute paths or resolve paths relative to your application root
  • Clean up temporary files after processing
  • Consider streaming large files instead of loading them entirely into memory
  • Handle file permissions correctly for both reading source files and writing exports