Create a Modal.com FastAPI script for video re-encoding. It ...
Prompt
Create a Modal.com FastAPI script for video re-encoding. It should accept a video file as the main input. Users can then provide the format they want, for video and audio. Their options for video should include .MP4 (H.264, AV1), and .WEBM (VP9 only). You can also offer .MOV (H.264, HEVC). For audio, offer M4A/AAC or OPUS. No other audio formats. Use PyTorch tensor batching for ultra-fast rendering speed. Use the L40S for GPU acceleration. It should be high-speed, and highly optimized. When creating the Modal image, use Ubuntu (because of the recent archival of Debian dependency repositories).
Drag to resize
Drag to resize
Drag to resize