Skip to content

[BUG] Cannot import plain *.mp4 file produced by windows clipchamp #637

@shenzhouxiaohao-cpu

Description

@shenzhouxiaohao-cpu

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)

whole_log_in_chrome.log

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


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions