Summary
Add support for uploading MP4 (video) and M4A (audio) files for stem separation.
Why
Users want to drop a music video or downloaded M4A track directly without converting to MP3/WAV first. ffmpeg already handles the transcode step in the pipeline -- MP4/M4A support is essentially free.
What changes
app/api/jobs.py -- add .mp4 and .m4a to _ALLOWED_EXTS; raise _MAX_UPLOAD_BYTES from 100 MB to 400 MB (covers 4-min 1080p music video); add post-transcode duration check to catch oversized video files that slip under the size limit
static/js/main.js -- add .mp4, .m4a to client-side extension check
static/index.html -- add .mp4,.m4a,video/mp4 to file input accept attribute
- Error messages updated to include the new formats
What does NOT change
The pipeline itself is unchanged. ffmpeg already extracts the audio stream from MP4 and discards video automatically -- no new flags needed.
Size rationale
| Format |
Typical 4-min size |
| MP3 (320kbps) |
~10 MB |
| FLAC |
~20-30 MB |
| WAV (CD quality) |
~40 MB |
| MP4 (1080p) |
up to ~400 MB |
400 MB covers all formats. A 400 MB WAV would be ~45 min of audio and would be rejected by the existing duration check anyway.
Summary
Add support for uploading MP4 (video) and M4A (audio) files for stem separation.
Why
Users want to drop a music video or downloaded M4A track directly without converting to MP3/WAV first. ffmpeg already handles the transcode step in the pipeline -- MP4/M4A support is essentially free.
What changes
app/api/jobs.py-- add.mp4and.m4ato_ALLOWED_EXTS; raise_MAX_UPLOAD_BYTESfrom 100 MB to 400 MB (covers 4-min 1080p music video); add post-transcode duration check to catch oversized video files that slip under the size limitstatic/js/main.js-- add.mp4,.m4ato client-side extension checkstatic/index.html-- add.mp4,.m4a,video/mp4to file inputacceptattributeWhat does NOT change
The pipeline itself is unchanged. ffmpeg already extracts the audio stream from MP4 and discards video automatically -- no new flags needed.
Size rationale
400 MB covers all formats. A 400 MB WAV would be ~45 min of audio and would be rejected by the existing duration check anyway.