Node / Video Ffmpeg · guide
Discovery & metadata options
Current Apexify.js 6.0.0 documentation for Discovery & metadata options.
getInfo
What it does: Reads container + primary video stream via ffprobe (duration, size, fps, bitrate, format name). Does not write a file.
When to use: Before cropping/scaling, choosing trim points, or sizing thumbnails.
Effect of the flag
| Input | Behaviour |
|---|---|
getInfo: true | Returns { duration, width, height, fps, bitrate, format }. duration is seconds; fps from r_frame_rate (fallback 30). |
No other fields on VideoCreationOptions matter for this branch besides source.
Example
SOURCEtypescript
typescript
detectFormat
What it does: Same metadata as getInfo, plus a video codec tag (h264, vp9, …) from ffprobe stream codec_name.
When to use: Logging, conditional pipelines (“if HEVC, transcode first”), or debugging uploads.
Options
There are no sub-options — only detectFormat: true.
Return shape
| Field | Meaning |
|---|---|
codec | Video codec short name or unknown. |
format, container | Container format_name from getInfo. |
width, height, fps, bitrate, duration | Same as getInfo. |
Example
SOURCEtypescript
typescript