File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 33
33
av .preloadCodecsAndFormats ()
34
34
35
35
streamTypeToConcat = Set ()
36
+ codecToConcat = Set ()
36
37
# get all input files
37
38
inputFiles = []
38
39
for input in args .inputs :
39
40
inputFile = av .InputFile (input )
40
41
streamTypeToConcat .add ( inputFile .getStream (0 ).getProperties ().getStreamType () )
42
+ codecToConcat .add ( inputFile .getStream (0 ).getProperties ().getCodecName () )
41
43
inputFiles .append (inputFile )
42
44
43
45
# Check type of streams to rewrap
44
46
if len (streamTypeToConcat ) > 1 :
45
47
raise RuntimeError ("Cannot concatenate streams of different type." )
48
+ if len (codecToConcat ) > 1 :
49
+ raise RuntimeError ("Cannot concatenate streams of different codec: " , [codec for codec in codecToConcat ])
46
50
47
51
# Create the output
48
52
outputFile = av .OutputFile ( args .outputFileName );
You can’t perform that action at this time.
0 commit comments