File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public static async Task Run()
4545
4646 string inFiles = TrackList . GetInputFilesString ( ) ;
4747 string outPath = GetOutPath ( vCodec ) ;
48- string map = TrackList . GetMapArgs ( ) ;
48+ string map = TrackList . GetMapArgs ( vCodec . IsFixedFormat ) ;
4949 string a = anyAudioStreams ? CodecUtils . GetCodec ( aCodec ) . GetArgs ( GetAudioArgsFromUi ( ) , TrackList . current . File ) . Arguments : "" ;
5050 string s = CodecUtils . GetCodec ( sCodec ) . GetArgs ( ) . Arguments ;
5151 string meta = GetMetadataArgs ( ) ;
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ public static string GetInputFilesString()
233233 return string . Join ( " " , args ) ;
234234 }
235235
236- public static string GetMapArgs ( )
236+ public static string GetMapArgs ( bool videoOnly = false )
237237 {
238238 List < string > args = new List < string > ( ) ;
239239 List < int > fileIndexesToMap = new List < int > ( ) ;
@@ -250,7 +250,8 @@ public static string GetMapArgs()
250250 if ( ! fileIndexesToMap . Contains ( fileIdx ) )
251251 fileIndexesToMap . Add ( fileIdx ) ;
252252
253- args . Add ( $ "-map { fileIdx } :{ entry . Stream . Index } ") ;
253+ if ( ! ( videoOnly && entry . Stream . Type != Stream . StreamType . Video ) ) // Skip all non-video streams if videoOnly == true
254+ args . Add ( $ "-map { fileIdx } :{ entry . Stream . Index } ") ;
254255 }
255256 }
256257
You can’t perform that action at this time.
0 commit comments