ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
13.49k stars 775 forks source link

The concat protocol doesn't seem to work. #604

Closed szilardszaloki closed 8 months ago

szilardszaloki commented 8 months ago

The concat protocol ([1] [2]) doesn't seem to work.

ffmpeg -i concat:0.ts|1.ts|2.ts -c copy output.ts
ffmpeg -i "concat:0.ts|1.ts|2.ts" -c copy output.ts
ffmpeg -i concat:0.ts\|1.ts\|2.ts -c copy output.ts
ffmpeg -i "concat:0.ts\|1.ts\|2.ts" -c copy output.ts yield concat:0.ts|1.ts|2.ts: No such file or directory "concat:0.ts|1.ts|2.ts": No such file or directory concat:0.ts\|1.ts\|2.ts: No such file or directory "concat:0.ts\|1.ts\|2.ts": No such file or directory respectively.

To Reproduce E.g.:

const command = [
  '-i',
  'concat:' + Array.from({ length: 3 }, (value, index) => index.toString() + '.ts').join('|'),
  '-c',
  'copy',
  'output.ts'
];
console.log(['ffmpeg', ...command].join(' '));
await ffmpeg.exec(command);

Expected behavior The concat protocol works.

Screenshots N/A

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context N/A

szilardszaloki commented 8 months ago

Error message is somewhat misleading, as it suggests that FFmpeg misinterpreted the input (file protocol vs. concat protocol), whereas it's complaing about one or more missing files that are in the concat list.