Skip to content

Simple stream selection? #102

@whichken

Description

@whichken

I'm trying to do some simple stream selection. Using ffmpeg directly, I'd use the map option. However, when trying to do this using ffmpeg-python, I can't seem to get it correct. The map argument is getting put into a bracket, which doesn't work.

>>> import ffmpeg
>>> infile = ffmpeg.input('test.mkv')
>>> stream = infile['1']
>>> outfile = ffmpeg.output(stream, 'test-out.mkv')
>>> ffmpeg.compile(outfile)
['ffmpeg', '-i', 'test.mkv', '-map', '[0:1]', 'test-out.mkv']

This fails with the error Output with label '0:1' does not exist in any defined filter graph, or was already used elsewhere.

What is the proper way to do stream selection when you don't need complex video graphs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions