0

I cannot find any working solutions, already searched a lot. How to execute this command in ffmpeg fluent (nodejs)

ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

Inputing a List of Files for Concatenation with Node.js Module fluent-ffmpeg

ffmpeg('C:/path/to/list.txt').inputFormat('concat').mergeToFile('C:/path/to/out.mp4', 'C:/path/to/temp');

when following this solution, it showing this error. don't know how can I give the -safe command to this solution. So with that exact solution, I am getting this error.

[concat @ 0000020ee8c82400] Unsafe file name './test/114/1.mp3'
./concat.txt: Operation not permitted
MBK
  • 2,589
  • 21
  • 25

1 Answers1

0

I cannot find a way to give -safe to the command. anyway I found an alternative solution.

Instead of save the file names to a .txt file. i Just created a list [] of file names and looped it and added the input like this.

let list = [
    "1.mp3",
    "2.mp3",
  ];
  let ff = ffmpeg();
  for(i of list) {
    ff.addInput("./ayahs/114/" + i);
    console.log(i);
  }

  ff.mergeToFile('jaba.mp3');
MBK
  • 2,589
  • 21
  • 25