Ejemplo 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)
Ejemplo 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),
        ]
Ejemplo 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', '-', '-']
Ejemplo 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', '-']
Ejemplo 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', '-']
Ejemplo 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)
Ejemplo 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',
            '-',
        ]
Ejemplo 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)
Ejemplo 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)
Ejemplo 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']
Ejemplo 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', '-']
Ejemplo 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', '-', '-']
Ejemplo 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)
Ejemplo 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)
Ejemplo 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'
        ]
Ejemplo 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', '-'
        ]
Ejemplo 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', '-', '-']
Ejemplo 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', '-',
                         ]
Ejemplo 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', '-', '-'
        ]
Ejemplo 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),
                         ]
Ejemplo n.º 21
0
    def __init__(self):
        BaseEncoder.__init__(self)

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

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