Overview
Theexport command converts a .cap project file to a standard MP4 video file.
Usage
Arguments
Path to the
.cap project file to export.Optional path for the output MP4 file. If not specified, the file is saved to a temporary location.
Export Settings
The export command uses the following default settings:Frame rate of the output video
Base resolution for the output video
Compression level applied to the output video. Set to maximum for smallest file size.
Video codec used for encoding
Whether to force using FFmpeg for decoding instead of hardware decoders
Examples
Basic Export
Export to temporary location:Export to Specific Location
Export with custom output path:Export Multiple Files
Batch export multiple recordings:Output
During export, the command displays progress information. Upon completion:Technical Details
Export Process
- Load Project: Read the
.capproject file - Initialize Exporter: Set up export pipeline with configured settings
- Render Frames: Process each frame with effects and overlays
- Encode: Encode frames to H.264 using configured compression
- Write File: Save the final MP4 file
Implementation
The export command is implemented inapps/cli/src/main.rs:151-193:
Export Settings Deep Dive
Resolution Base
Theresolution_base setting defines the maximum dimensions:
- Video scales down if source is larger
- Maintains aspect ratio
- Default: 1920x1080 (Full HD)
Compression Options
Currently, the CLI usesExportCompression::Maximum:
- Optimizes for smallest file size
- May increase export time
- Maintains visual quality
Frame Rate
Default 60 FPS provides:- Smooth playback
- Clear cursor movement
- Professional quality
Performance Considerations
Export Speed
Export Speed
Export speed depends on:
- Source resolution and frame rate
- Recording duration
- CPU performance
- Available hardware encoders
Hardware Acceleration
Hardware Acceleration
The exporter uses hardware acceleration when available:
- macOS: VideoToolbox (AVFoundation)
- Windows: Media Foundation
- Fallback: FFmpeg software encoding
Memory Usage
Memory Usage
Memory usage scales with:
- Source video resolution
- Number of audio tracks
- Recording complexity
Troubleshooting
Export fails with 'Exporter build error'
Export fails with 'Exporter build error'
- Verify the .cap file is not corrupted
- Ensure sufficient disk space
- Check file permissions
- Try exporting to a different location
Output file is too large
Output file is too large
The CLI uses maximum compression by default. File size depends on:
- Recording duration
- Source resolution
- Content complexity (static vs. dynamic)
Export is very slow
Export is very slow
If export is slower than expected:
- Close other applications
- Ensure hardware acceleration is available
- Check CPU/disk usage
- Try setting
force_ffmpeg_decoder: false
Output Video Specifications
The exported MP4 file includes:- Container: MP4 (MPEG-4 Part 14)
- Video Codec: H.264 (AVC)
- Audio Codec: AAC
- Frame Rate: 60 FPS
- Resolution: Up to 1920x1080 (scales down from source)
- Bit Rate: Variable (optimized for compression)
- Color Space: YUV 4:2:0
Next Steps
Record Command
Learn how to create recordings
CLI Overview
Back to CLI overview