Skip to content

Support multiple identical inputs #880

@coppit

Description

@coppit

I can't construct this command line:

ffmpeg -i input.mov -i input.mov -filter_complex '[0:v]trim=end_frame=2:start_frame=1[s0];[s0]transpose=dir=clock[s1];[s1]crop=h=0.5in_h:w=0.5in_w:x=(in_w-out_w)/2:y=(in_h-out_h)/2[s2];[1:v]trim=end_frame=2:start_frame=1[s3];[s3]transpose=dir=clock[s4]' -map '[s2]' -f null - -map '[s4]' -f null -

because topo_sort() and the node's repr together cause input nodes created with the same filename to be merged. The error message says:

ValueError: Encountered transpose(dir='clock') <19764baa829a> with multiple outgoing edges with same upstream label None; a split filter is probably required

but I don't want to write special code for when my two clips happen to be from the same file.

By the way, this sort of thing also comes up when you're trying to run vidstabdetect on two clips which happen to be from the same file.

The only workaround I can think of is to create temporary symlinks with unique names, and use them as inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions