Esempio n. 1
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or FFMpegAacEncoder.DEFAULT_BIT_RATE

        self._writes_header = False
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command('adts', bit_rate=self.bit_rate)
Esempio n. 2
0
    def __init__(self, sample_rate=None, channels=None):
        BaseEncoder.__init__(self)
        self.sample_rate = sample_rate or 44100
        self.channels = channels or 2

        self._writes_header = True
        self._binary = 'sox'
        self._command = [
            '-t',
            'raw',
            '-b',
            '16',
            '-e',
            'signed',
            '-c',
            '2',
            '-r',
            '44100',
            '-',
            '-t',
            'wav',
            '-b',
            '16',
            '-e',
            'signed',
            '-c',
            str(self.channels),
            '-r',
            '44100',
            '-B',
            '-',
            'rate',
            str(self.sample_rate),
        ]
Esempio n. 3
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or FaacAacEncoder.DEFAULT_BIT_RATE

        self._writes_header = None
        self._binary = 'faac'
        self._command = ['-b', str(self.bit_rate), '-X', '-P', '-o', '-', '-']
Esempio n. 4
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or LameMp3Encoder.DEFAULT_BIT_RATE

        self._writes_header = False
        self._binary = 'lame'
        self._command = ['-b', str(self.bit_rate), '-r', '-']
Esempio n. 5
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or LameMp3Encoder.DEFAULT_BIT_RATE

        self._writes_header = False
        self._binary = 'lame'
        self._command = ['-b', str(self.bit_rate), '-r', '-']
Esempio n. 6
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or FFMpegMp3Encoder.DEFAULT_BIT_RATE

        self._writes_header = True
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command('mp3', bit_rate=self.bit_rate)
Esempio n. 7
0
    def __init__(self):
        BaseEncoder.__init__(self)

        self._writes_header = True
        self._binary = 'sox'
        self._command = [
            '-t',
            'raw',
            '-b',
            '16',
            '-e',
            'signed',
            '-c',
            '2',
            '-r',
            '44100',
            '-',
            '-t',
            'wav',
            '-b',
            '16',
            '-e',
            'signed',
            '-c',
            '2',
            '-r',
            '44100',
            '-L',
            '-',
        ]
Esempio n. 8
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or FFMpegMp3Encoder.DEFAULT_BIT_RATE

        self._writes_header = True
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command('mp3', bit_rate=self.bit_rate)
Esempio n. 9
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or FFMpegAacEncoder.DEFAULT_BIT_RATE

        self._writes_header = False
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command('adts', bit_rate=self.bit_rate)
Esempio n. 10
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)

        self._writes_header = True
        self._binary = 'flac'
        self._command = ['-', '-c', '--channels', '2', '--bps', '16',
                         '--sample-rate', '44100',
                         '--endian', 'little', '--sign', 'signed', '-s']
Esempio n. 11
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or OggencOggEncoder.DEFAULT_BIT_RATE

        self._writes_header = True
        self._binary = 'oggenc'
        self._command = ['-b', str(self.bit_rate),
                         '-Q', '-r', '--ignorelength', '-']
Esempio n. 12
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or FaacAacEncoder.DEFAULT_BIT_RATE

        self._writes_header = None
        self._binary = 'faac'
        self._command = ['-b', str(self.bit_rate),
                         '-X', '-P', '-o', '-', '-']
Esempio n. 13
0
    def __init__(self, sample_rate=None, channels=None):
        BaseEncoder.__init__(self)
        self.sample_rate = sample_rate or 44100
        self.channels = channels or 2

        self._writes_header = None
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command(
            's16be', sample_rate=self.sample_rate, channels=self.channels)
Esempio n. 14
0
    def __init__(self, sample_rate=None, channels=None):
        BaseEncoder.__init__(self)
        self.sample_rate = sample_rate or 44100
        self.channels = channels or 2

        self._writes_header = None
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command(
            's16be', sample_rate=self.sample_rate, channels=self.channels)
Esempio n. 15
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)

        self._writes_header = True
        self._binary = 'flac'
        self._command = [
            '-', '-c', '--channels', '2', '--bps', '16', '--sample-rate',
            '44100', '--endian', 'little', '--sign', 'signed', '-s'
        ]
Esempio n. 16
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or OggencOggEncoder.DEFAULT_BIT_RATE

        self._writes_header = True
        self._binary = 'oggenc'
        self._command = [
            '-b', str(self.bit_rate), '-Q', '-r', '--ignorelength', '-'
        ]
Esempio n. 17
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or OpusencOpusEncoder.DEFAULT_BIT_RATE

        self._writes_header = True
        self._binary = 'opusenc'
        self._command = ['--bitrate', str(self.bit_rate),
                         '--padding', '0', '--max-delay', '0',
                         '--expect-loss', '1', '--framesize', '2.5',
                         '--raw-rate', '44100',
                         '--raw', '-', '-']
Esempio n. 18
0
    def __init__(self):
        BaseEncoder.__init__(self)

        self._writes_header = True
        self._binary = 'sox'
        self._command = ['-t', 'raw', '-b', '16', '-e', 'signed', '-c', '2',
                         '-r', '44100', '-',
                         '-t', 'wav', '-b', '16', '-e', 'signed', '-c', '2',
                         '-r', '44100',
                         '-L', '-',
                         ]
Esempio n. 19
0
    def __init__(self, bit_rate=None):
        BaseEncoder.__init__(self)
        self.bit_rate = bit_rate or OpusencOpusEncoder.DEFAULT_BIT_RATE

        self._writes_header = True
        self._binary = 'opusenc'
        self._command = [
            '--bitrate',
            str(self.bit_rate), '--padding', '0', '--max-delay', '0',
            '--expect-loss', '1', '--framesize', '2.5', '--raw-rate', '44100',
            '--raw', '-', '-'
        ]
Esempio n. 20
0
    def __init__(self, sample_rate=None, channels=None):
        BaseEncoder.__init__(self)
        self.sample_rate = sample_rate or 44100
        self.channels = channels or 2

        self._writes_header = True
        self._binary = 'sox'
        self._command = ['-t', 'raw', '-b', '16', '-e', 'signed', '-c', '2',
                         '-r', '44100', '-',
                         '-t', 'wav', '-b', '16', '-e', 'signed',
                         '-c', str(self.channels),
                         '-r', '44100',
                         '-B', '-',
                         'rate', str(self.sample_rate),
                         ]
Esempio n. 21
0
    def __init__(self):
        BaseEncoder.__init__(self)

        self._writes_header = True
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command('wav')
Esempio n. 22
0
    def __init__(self):
        BaseEncoder.__init__(self)

        self._writes_header = True
        self._binary = 'ffmpeg'
        self._command = self._ffmpeg_command('wav')