OpenCut-app / OpenCut-app/OpenCut
[BUG] Cannot import plain *.mp4 file produced by windows clipchamp
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 89.8k
- Forks
- 8.9k
- PR merge metrics
- No merged PRs in 30d
Description
Platform
Windows11
Browser
Chrome 137
Current Behavior
I recorded some videos using the Windows screenshot tool and saved them as *.mp4 files. Some of these MP4 files were edited with ClipChamp. When uploading these MP4 files, the front-end interface showed no response, and the chrome console output the following content
Video processing failed Error: Video codec not supported for decoding
at generateThumbnail (mediabunny-utils.ts:37:11)
at async processMediaFiles (media-processing.ts:50:26)
at async processFiles (media.tsx:98:30)
processMediaFiles @ media-processing.ts:55
intercept-console-error.ts:44 Failed to save media item: TypeError: Cannot read properties of undefined (reading 'getDirectory')
at OPFSAdapter.getDirectory (opfs-adapter.ts:11:46)
at OPFSAdapter.set (opfs-adapter.ts:31:34)
at StorageService.saveMediaFile (storage-service.ts:173:29)
at addMediaFile (media-store.ts:155:28)
at processFiles (media.tsx:102:15)
There is no output in the backend server.
Expected Behavior
Should work with mp4
Recurrence Probability
Always
Steps To Reproduce
Upload a mp4 file produced by ClipChamp
Anything else?
The background server run in Ubuntu 20.04. The whole log when the issue occures
next dev --turbopack
⚠ Warning: Found multiple lockfiles. Selecting /home/niumag/package-lock.json.
Consider removing the lockfiles at:
* /home/niumag/opencut/OpenCut/bun.lock
⚠ Port 3000 is in use by an unknown process, using available port 3001 instead.
▲ Next.js 15.4.5 (Turbopack)
- Local: http://localhost:3001
- Network: http://172.16.1.198:3001
- Environments: .env.local
✓ Starting...
✓ Compiled middleware in 192ms
✓ Ready in 3.8s
○ Compiling /editor/[project_id] ...
✓ Compiled /editor/[project_id] in 6.7s
GET /editor/449822e4-bbaf-48ae-903f-46565e0eb8ac 200 in 8429ms
○ Compiling / ...
✓ Compiled / in 1952ms
GET / 200 in 2275ms
⚠ Cross origin request detected from 172.16.1.198 to /_next/* resource. In a future major version of Next.js, you will need to explicitly configure "allowedDevOrigins" in next.config to allow this.
Read more: https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins
○ Compiling /projects ...
✓ Compiled /projects in 614ms
GET /projects 200 in 671ms
GET /editor/449822e4-bbaf-48ae-903f-46565e0eb8ac 200 in 149ms
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the upload flow in media.tsx and media-processing.ts, then inspect generateThumbnail in mediabunny-utils.ts using a ClipChamp-produced MP4. Reproduce the upload in Chrome and compare the codec failure with the subsequent OPFSAdapter error. Done means the MP4 uploads successfully without the frontend errors and is saved as a media item.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100