paths, metadata parsing, data streaming thru system command"""
def __init__(self):
- self.command = 'sox "%s" -q -b 16 -r 44100 -t wav -c2 - '
+ self.command = 'ffmpeg -i "%s" -f wav - '
def process(self, source, options=None):
"""Encode and stream audio data through a generator"""
#temp_file.flush()
pass
- self.write_tags(temp_file.name)
+ #self.write_tags(temp_file.name)
while True:
__chunk = temp_file.read(buffer_size)
def run(self, source, metadata):
print '\n=== Encoder testing ===\n'
for encoder_class in self.encoders:
+ print '=================================='
encoder = encoder_class()
mime = mimetype(source)
format = encoder.format()
file.write(chunk)
print 'Sound exported to :' + file_path
file.close()
+ print '==================================\n'
class TestGraphers: