I'm working on a script that open a text file with some ffmpeg commands. ( about 10 command generated from an other project ) Each command are working when i copy paste than into the terminal manually, but when the script run, simple commands work but I am stuck on a " No such filter : ..." error.
Here is my command : -i 1.mp4 -i 2.mp4 -i 3.mp4 -i 4.mp4 -i 5.mp4 -i 6.mp4 -filter_complex '[0:0][0:1][1:0][1:1][2:0][2:1][3:0][3:1][4:0][4:1][5:0][5:1]concat=n=6:v=1:a=1:unsafe=1 [v] [a]' -map '[v]' -map '[a]' -aspect 16:9 -s 1280x720 -c:v mpeg4 -c:a libmp3lame -y track_0.mp4
I think all the problem is in the " ' " i try to escape them with " \' " but ffmpeg is telling me No such filter: '''
Here is my script assuming that the variable ARGS is set dynamically ( for the example I have set it manually ) :
#!/bin/bash
ARGS="-i 1.mp4 -i 2.mp4 -i 3.mp4 -i 4.mp4 -i 5.mp4 -i 6.mp4 -filter_complex '[0:0][0:1][1:0][1:1][2:0][2:1][3:0][3:1][4:0][4:1][5:0][5:1]concat=n=6:v=1:a=1:unsafe=1 [v] [a]' -map '[v]' -map '[a]' -aspect 16:9 -s 1280x720 -c:v mpeg4 -c:a libmp3lame -y track_0.mp4"
ffmpeg ${ARGS}
EDIT 1:
Well I forgot to precise that my text file is like that :
-loop 1 -f image2 -c:v png -i FILE_0.data -i sample.wav -map 0:v -map 1:a -t 20 -s 1280x720 -c:v mpeg4 -c:a libmp3lame -pix_fmt yuv420p -y 4.mp4
-loop 1 -f image2 -c:v png -i black.png -i sample.wav -map 0:v -map 1:a -t 14 -s 1280x720 -c:v mpeg4 -c:a libmp3lame -pix_fmt yuv420p -y 5.mp4
-loop 1 -f image2 -c:v png -i FILE_1.data -i sample.wav -map 0:v -map 1:a -t 20 -s 1280x720 -c:v mpeg4 -c:a libmp3lame -pix_fmt yuv420p -y 6.mp4
-i 1.mp4 -i 2.mp4 -i 3.mp4 -i 4.mp4 -i 5.mp4 -i 6.mp4 -filter_complex '[0:0][0:1][1:0][1:1][2:0][2:1][3:0][3:1][4:0][4:1][5:0][5:1]concat=n=6:v=1:a=1:unsafe=1 [v] [a]' -map '[v]' -map '[a]' -aspect 16:9 -s 1280x720 -c:v mpeg4 -c:a libmp3lame -y track_0.mp4
And in this file I read each line and I pass the line to ffmpeg to process what i want
Can you help me ?