AIX
AIX

Reputation: 71

Flutter - How get use data in FFMPEG commands (input & output)

In Flutter, How to use data in FFMPEG commands (input & output). Like:

ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -i 4.mp3 -filter_complex "[0:a][1:a][2:a][3:a]amerge=inputs=4[aout]" -map "[aout]" output.mp3

2 Question regarding this command:

  1. What is the path to bring the '1.mp3', '2.mp3'... to the FFMPEG.
  2. Where is the 'output.mp3' goes to? eventually?

Didn't find any solution, let's speak locally and after that remotely (API/SERVER).

Upvotes: 1

Views: 747

Answers (1)

llogan
llogan

Reputation: 134063

What is the path to bring the '1.mp3', '2.mp3'... to the FFMPEG.

Your ffmpeg command in your question assumes 1.mp3 and 2.mp3 are in the current working directory that ffmpeg is being executed in.

For example, in Linux if the files are in /home/aix/music, then you would have to navigate to /home/aix/music in your terminal (such as by running cd /home/aix/music) before running the ffmpeg command shown in your question.

Or, provide the full path to the files and the current directory will not matter:

ffmpeg -i /home/aix/videos/1.mp4 -i /home/aix/videos/2.mp4 ...

Where is the 'output.mp3' goes to? eventually?

output.mp3 goes wherever you tell it to. Because no path was provided the ffmpeg command in your question it will output output.mp3 into the current directory.

Or, provide the full path to output output.mp3 in the desired directory:

ffmpeg -i input.mp3 /home/aix/music/encoded/output.mp3

Upvotes: 1

Related Questions