Exemple #1
0
def join(*streams, **kwargs):
    '''
    implementation of the ffmpeg join filter for merging multiple input streams, e.g.

    i1 = ffmpeg.input(file)
    s1 = i1['1:0'].join(i1['1:1'], inputs=2, channel_layout='stereo', map='0.0-FL|1.0-FR')
    s1.output('d:/junk/test_join.wav', acodec='pcm_s24le').run()

    :param streams: the streams to join.
    :param kwargs: args to pass to join.
    :return: the resulting stream.
    '''
    return FilterNode(streams, join.__name__, kwargs=kwargs,
                      max_inputs=None).stream()
Exemple #2
0
def amerge(*streams, **kwargs):
    '''
    implementation of the ffmpeg amerge filter for merging multiple input streams, e.g.

    i1 = ffmpeg.input(file)
    s1 = i1['1:0'].amerge(i1['1:1'], inputs=6)
    s1.output('d:/junk/test_join.wav', acodec='pcm_s24le').run()

    :param streams: the streams to join.
    :param kwargs: args to pass to join.
    :return: the resulting stream.
    '''
    return FilterNode(streams, amerge.__name__, kwargs=kwargs,
                      max_inputs=None).stream()
Exemple #3
0
def fps(stream, **kwargs):
    return FilterNode(stream, "fps", kwargs=kwargs).stream()
Exemple #4
0
def scale(stream, width='iw', height='ih'):
    return FilterNode(stream, "scale", args=[width, height]).stream()
Exemple #5
0
def crop(stream, width='iw', height='ih', x='0', y='0'):
    return FilterNode(stream, "crop", args=[width, height, x, y]).stream()
Exemple #6
0
def hstack(*streams, **kwargs):
    return FilterNode(streams, "hstack", kwargs=kwargs, max_inputs=None).stream()
Exemple #7
0
def blend(*streams, **kwargs):
    return FilterNode(streams, "blend", kwargs=kwargs, max_inputs=None).stream()