Avatar of Dinesh Bali
Dinesh Bali asked on

Invalid file index 14 in filtergraph description - FFMPEG

Hi,

I am trying to give transition effect to video using ffmpeg.

I am getting error in my command saying: Invalid file index 14 in filtergraph description

But I am seeing teh correct count and inputs. What indx I am doing wrong. Please can you advise me.

Below is my comamnd. I have formated it so that it can be understandable.

Please advise.

Command below:

ffmpeg
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeSameMediaAudioVideo_1_5157.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_2_8955.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtSameVideo_3_7749.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeSameMediaAudioVideo_3_1137.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_4_7035.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtExternalVideo_5_1560.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeExternalMediaAudioVideo_5_3387.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_6_5929.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtSameVideo_7_3635.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeSameMediaAudioVideo_7_2726.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_8_6239.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtExternalVideo_9_9862.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeExternalMediaAudioVideo_9_9464.mp4
-i D:/ffmpeg_output/Library/2020/11/21//SSLK006998_1535.mp4
-filter_complex " [0][1]xfade=transition=fade:duration=0.5:offset=386.1[V01]; [V01][2]xfade=transition=fade:duration=0.5:offset=522.05[V02]; [V02][3]xfade=transition=fade:duration=0.5:offset=961.22[V03]; [V03][4]xfade=transition=fade:duration=0.5:offset=1347.32[V04]; [V04][5]xfade=transition=fade:duration=0.5:offset=1559.07[V05]; [V05][6]xfade=transition=fade:duration=0.5:offset=2180.17[V06]; [V06][7]xfade=transition=fade:duration=0.5:offset=2248.67[V07]; [V07][8]xfade=transition=fade:duration=0.5:offset=2724.96[V08]; [V08][9]xfade=transition=fade:duration=0.5:offset=3376.38[V09]; [V09][10]xfade=transition=fade:duration=0.5:offset=3762.48[V010]; [V010][11]xfade=transition=fade:duration=0.5:offset=3936.33[V011]; [V011][12]xfade=transition=fade:duration=0.5:offset=4580.17[V012]; [V012][13]xfade=transition=fade:duration=0.5:offset=4648.67[V013]; [V013][14]xfade=transition=fade:duration=0.5:offset=5056.74,format=yuv420p[video];
[0:a][1:a]acrossfade=d=0.5:c1=tri:c2=tri[A01]; [A01][2:a]acrossfade=d=0.5:c1=tri:c2=tri[A02]; [A02][3:a]acrossfade=d=0.5:c1=tri:c2=tri[A03]; [A03][4:a]acrossfade=d=0.5:c1=tri:c2=tri[A04]; [A04][5:a]acrossfade=d=0.5:c1=tri:c2=tri[A05]; [A05][6:a]acrossfade=d=0.5:c1=tri:c2=tri[A06]; [A06][7:a]acrossfade=d=0.5:c1=tri:c2=tri[A07]; [A07][8:a]acrossfade=d=0.5:c1=tri:c2=tri[A08]; [A08][9:a]acrossfade=d=0.5:c1=tri:c2=tri[A09]; [A09][10:a]acrossfade=d=0.5:c1=tri:c2=tri[A010]; [A010][11:a]acrossfade=d=0.5:c1=tri:c2=tri[A011]; [A011][12:a]acrossfade=d=0.5:c1=tri:c2=tri[A012]; [A012][13:a]acrossfade=d=0.5:c1=tri:c2=tri[A013]; [A013][14:a]acrossfade=d=0.5:c1=tri:c2=tri:c2=tri[audio]"

-map "[video]" -map "[audio]" -movflags +faststart D:/ffmpeg_output/Library/2020/11/21/SSLK006998_FinalMergedFile_NotFromAction_9415.mp4

Open in new window

Error details below:

Invalid file index 14 in filtergraph description [0][1]xfade=transition=fade:duration=0.5:offset=386.1[V01];[V01][2]xfade=transition=fade:duration=0.5:offset=522.05[V02];[V02][3]xfade=transition=fade:duration=0.5:offset=961.22[V03];[V03][4]xfade=transition=fade:duration=0.5:offset=1347.32[V04];[V04][5]xfade=transition=fade:duration=0.5:offset=1559.07[V05];[V05][6]xfade=transition=fade:duration=0.5:offset=2180.17[V06];[V06][7]xfade=transition=fade:duration=0.5:offset=2248.67[V07];[V07][8]xfade=transition=fade:duration=0.5:offset=2724.96[V08];[V08][9]xfade=transition=fade:duration=0.5:offset=3376.38[V09];[V09][10]xfade=transition=fade:duration=0.5:offset=3762.48[V010];[V010][11]xfade=transition=fade:duration=0.5:offset=3936.33[V011];[V011][12]xfade=transition=fade:duration=0.5:offset=4580.17[V012];[V012][13]xfade=transition=fade:duration=0.5:offset=4648.67[V013];[V013][14]xfade=transition=fade:duration=0.5:offset=5056.74,format=yuv420p[video]; [0:a][1:a]acrossfade=d=0.5:c1=tri:c2=tri[A01];[A01][2:a]acrossfade=d=0.5:c1=tri:c2=tri[A02];[A02][3:a]acrossfade=d=0.5:c1=tri:c2=tri[A03];[A03][4:a]acrossfade=d=0.5:c1=tri:c2=tri[A04];[A04][5:a]acrossfade=d=0.5:c1=tri:c2=tri[A05];[A05][6:a]acrossfade=d=0.5:c1=tri:c2=tri[A06];[A06][7:a]acrossfade=d=0.5:c1=tri:c2=tri[A07];[A07][8:a]acrossfade=d=0.5:c1=tri:c2=tri[A08];[A08][9:a]acrossfade=d=0.5:c1=tri:c2=tri[A09];[A09][10:a]acrossfade=d=0.5:c1=tri:c2=tri[A010];[A010][11:a]acrossfade=d=0.5:c1=tri:c2=tri[A011];[A011][12:a]acrossfade=d=0.5:c1=tri:c2=tri[A012];[A012][13:a]acrossfade=d=0.5:c1=tri:c2=tri[A013];[A013][14:a]acrossfade=d=0.5:c1=tri:c2=tri:c2=tri[audio].

Open in new window


Please advise

Kind Regards,
Linux* FFmpegMultiMedia Applications* Video EditingProgramming Languages-Other

Avatar of undefined
Last Comment
noci

8/22/2022 - Mon
SOLUTION
David Favor

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
noci

The 14th entry on the commandline has // in it, On a Linux system this doesn't matter, widows is a different beast.  
Here    -i D:/ffmpeg_output/Library/2020/11/21//SSLK006998_1535.mp4
Can it be it only sees 13 files and the #14 [14]  is seen as invalid?


ASKER
Dinesh Bali

Thanks for your replies

@noci, I am not able to find // on line no 14.
Did you mean on below line:
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeExternalMediaAudioVideo_9_9464.mp4
I am using Windows.

Sorry, I didn't followed your last comment.File 14 is invalid or I have only 13 files in the input.
I wanted to use all input 14 files as given below:

-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeSameMediaAudioVideo_1_5157.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_2_8955.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtSameVideo_3_7749.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeSameMediaAudioVideo_3_1137.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_4_7035.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtExternalVideo_5_1560.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeExternalMediaAudioVideo_5_3387.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_6_5929.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtSameVideo_7_3635.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeSameMediaAudioVideo_7_2726.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_RmvAdVi_UntilLastSplit_8_6239.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_VideoAudioUntilMarked_InsrtExternalVideo_9_9862.mp4
-i D:/ffmpeg_output/Library/2020/11/21/SSLK006998_mergeExternalMediaAudioVideo_9_9464.mp4
-i D:/ffmpeg_output/Library/2020/11/21//SSLK006998_1535.mp4

Open in new window


@David,
Thanks for your input on -preset:v medium 
So, I need to update the same in the script I will do this.

Thanks again

Kind Regards,


ASKER
Dinesh Bali

FInally, got it working. I started the index from 0 rather then 1. so, my index reaches to 13 rather than 14. It is working now.

Thanks all for your help

Kind Regards
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
noci

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question