def encodeAudioStream(input_stream, destination, metadata=dict()): encode_command = ["lame", "-V0", "--quiet", "--vbr-new", '-', destination] pid = forkexec(encode_command, file_stdin=input_stream) input_stream.close() return pid
def encodeAudioStream(input_stream, destination, metadata=dict()): encode_command = ["ffmpeg", "-v", "1", "-i", "-", "-acodec", "alac", destination] pid = forkexec(encode_command, file_stdin=input_stream) input_stream.close() return pid
def encodeAudioStream(input_stream, destination, metadata=dict()): # metadata is ignored because monkey's audio sucks encode_command = ["mac", "-", destination, "-c2000"] pid = forkexec(encode_command, file_stdin=input_stream) input_stream.close() return pid
def encodeAudioStream(input_stream, destination, metadata=dict()): encode_command = ["flac", "-f", "-s", "-8", "-", "-o", destination] for x in metadata.items(): encode_command.extend(["-T", string.join(x, "=")]) pid = util.forkexec(encode_command, file_stdin=input_stream) input_stream.close() return pid
def encodeAudioStream(inputStream, destination, metadata=None): outputStream = open(destination, "w") # XXX: We do this only because the job management system expects every # module to return a process ID for encoding. In a perfect world, we should # be forking *nothing* here, and returning a file object instead. pid = forkexec(["cat"], file_stdin=inputStream, file_stdout=outputStream) inputStream.close() return pid
def encodeAudioStream(input_stream, destination, metadata=dict()): encode_command = ["oggenc", "-q4.5", "-Q", "-", "-o", destination] for keyval in metadata.items(): tag = string.join(keyval, "=") encode_command.extend(["-c"]) encode_command.extend([tag]) pid = util.forkexec(encode_command, file_stdin=input_stream) input_stream.close() return pid