How can I merge 10 .mp4 files in n8n?

Describe the problem/error/question

Now I am developing automation system. Then I need to merge 10 video files. I get 10 videos’ urls. But I can’t merge one video file.

What is the error message (if any)?

I tried to solve this problem using various method but I can’t solve. Help me please.
This is my discord acc:alanturner17
Please DM to guide me.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Try with http node instead of code node.

1 Like

Guide me more.
Which server is useful for that?

What do you expect with this code? and what’s the response from the fetch video node?

I tried to use GPT answer. But it wasn’t useful.
I get video urls from the fetch video node.
That is fal.ai Http request.

[

{

"video": {

"url": "https://v3.fal.media/files/elephant/zmzucCD1W4GTy0xEOf-l-_output.mp4",

"content_type": "video/mp4",

"file_name": "output.mp4",

"file_size": 4619448

}

},

{

"video": {

"url": "https://v3.fal.media/files/tiger/eU7NbA9y0XVUqoSpELYx0_output.mp4",

"content_type": "video/mp4",

"file_name": "output.mp4",

"file_size": 5019809

}

},

{

"video": {

"url": "https://v3.fal.media/files/elephant/0bwVTTMQF5oFJ4y_zsYhg_output.mp4",

"content_type": "video/mp4",

"file_name": "output.mp4",

"file_size": 6581255

}

}

]`Preformatted text`

I think, you can use loop first to download all. And after done, you can merge it

Give me more clear guide.

How can I download video and where can I save them?

You can try with insert the url to HTTP request node, and set response fields (Available in Options fields) to File

There is another question.
Can I wait for finishing former nodes?
I use split node and pass them into generating videos but I get data in several items instead of one item. So I can’t use aggregate to convert them into one JSON file.
I am looking forward your meaningful answer.

As far I know, you must create sub-workflow to make it happens. Sub-workflow can wait all the execution to succeed run, and you can connect it with any other nodes.

By the way, if it helps, would you mind to marking my message as solution?

Are you trying to merge the 10 videos into 1 video? If so I would recommend using ffmpeg. I can give an example once you confirm

If self hosted, just use ffmpeg