def testLogInFile(): """ Check the behavior of the logger file. """ logger = av.Logger() # log several messages in the standard output _logMessages(logger) # redirect the output of the logging messages logger.logInFile() # the logger message should exist and be empty assert_equals(os.stat(av.LOG_FILE).st_size, 0) # log several messages in the logger file _logMessages(logger) # the logger message should exist and be filled assert_greater(os.stat(av.LOG_FILE).st_size, 0)
parser.add_argument( "-o", "--outputFile", dest="outputFileName", type=str, default="output.mov", help="Set the output filename (output.mov by default).") # Parse command-line args = parser.parse_args() except ImportError: print("pyconcat currently expects python2.7+") exit(1) # setup avtranscoder logger = av.Logger().setLogLevel(av.AV_LOG_QUIET) av.preloadCodecsAndFormats() streamTypeToConcat = Set() codecToConcat = Set() # get all input files inputFiles = [] for input in args.inputs: inputFile = av.InputFile(input) streamTypeToConcat.add( inputFile.getStream(0).getProperties().getStreamType()) codecToConcat.add(inputFile.getStream(0).getProperties().getCodecName()) inputFiles.append(inputFile) # Check type of streams to rewrap if len(streamTypeToConcat) > 1: