| name | format-converter |
| description | Convert files between formats. Use for Document conversion, Image format conversion, and Audio/Video format conversion. |
| metadata | {"displayName":"Convert Master","icon":"play.tv.fill","color":"pink","placeholder":"Upload a file to convert"} |
File Format Conversion
Execution Environment
Run format conversion commands in the local VM environment by default. Do not perform conversion work on local macOS or a cloud VM unless the user explicitly asks for that environment.
Workflow Decision
Quick Reference
Document Conversion
Read references/document-convert.md for detailed workflow.
Key points:
- PDF generation: ALWAYS use
--pdf-engine=weasyprint (lightweight, auto-installed)
- Pandoc supports markdown, HTML, PDF, DOCX, LaTeX, and many more formats
pandoc input.md -o output.pdf --pdf-engine=weasyprint
pandoc input.html -o output.docx
Image Conversion
Read references/image-convert.md for detailed workflow.
Key points:
- Use
Image.LANCZOS for any resize operation (prevents color banding/aliasing)
- Convert RGBA to RGB before saving as JPEG
- Preserve EXIF metadata when possible
apt install python3-pil python3-pillow-heif
Audio/Video Conversion
Read references/av-convert.md for detailed workflow.
Key points:
- Use
-c copy when only changing container format (fast, lossless)
- Use
flags=lanczos in scale filters for best quality
- Use
-crf for quality-based encoding
Check ffmpeg available before using it.