Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple input streams via pipes #43

Open
JohnnyRacer opened this issue Dec 20, 2023 · 1 comment
Open

Support for multiple input streams via pipes #43

JohnnyRacer opened this issue Dec 20, 2023 · 1 comment

Comments

@JohnnyRacer
Copy link

Hello, I would like to execute some code to overlay images on a video, this works fine using filepaths, but I would really prefer loading everything via bytes and streaming in the data. I tried the following snippet and got an error : FFmpeg.execute() takes from 1 to 2 positional arguments but 3 were given

overlay = (
    FFmpeg()
    .option("y")
    .input("pipe:0")
    .input("pipe:1")
    .option("filter_complex", "[1:v]format=argb,geq=r='r(X,Y)':a='alpha(X,Y)'[zork];[0:v][zork]overlay")
    .output("test.mp4", vcodec="libx264")
)

overlay = overlay.execute(vid_bytes,image_bytes)

Is there a way to achieve this already or can it be implemented in the future. I would be happy to open a PR and implement if needed.

@JohnnyRacer
Copy link
Author

Seems like this could be possible with some shell magic from StackOverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant