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

How do I put one video below another? #1297

Open
ManucherKM opened this issue Aug 21, 2024 · 0 comments
Open

How do I put one video below another? #1297

ManucherKM opened this issue Aug 21, 2024 · 0 comments

Comments

@ManucherKM
Copy link

ManucherKM commented Aug 21, 2024

Version information

  • fluent-ffmpeg version: ^2.1.3
  • ffmpeg version: 2024-08-18-git-7e5410eadb-full_build-www.gyan.dev
  • OS: Windows 10

Code to reproduce

ffmpeg()
        .input(inputFrame)
        .size("?x1920")
        .aspect("9:16")
        .duration(65)
        .input(inputOverlayVideo)
        .input(inputMainVideo)
        .complexFilter([
            {
                filter: 'overlay',
                options: {
                    x: overlayXPosition,
                    y: overlayYPosition
                },
                inputs: ['0:v', '1:v'],
                outputs: 'result'
            }
        ], 'result')
        .output(outputVideo)
        .run();

(note: if the problem only happens with some inputs, include a link to such an input file)

Expected results

I'm sorry, but the problem is related to the fact that due to the fact that I'm using FFmpeg and your package for the first time, I don't know how to realize my task, not to the fact that there is something wrong with your package.

So, I want to combine 2 videos. 1 at the top of the video, the other at the bottom. The first video should be without sound and the second with sound. The first video is 9:16 by default and the second video is 16:9. For better understanding, I made a mini template of how it should look like:
image
Here's a link to figma (https://www.figma.com/design/alIPXUn8eL28XajlpJ1lHR/Untitled?node-id=0-1&t=VZXDbzRF12otp2e6-1), you can read the template in detail there.
I was also thinking about adding some filters for the video. How can I do all this?
I make similar videos through CapCut, but considering it's very time consuming I decided to automate it.

Observed results

On output, one of the videos just stretches and covers the previous one, also missing sound and more.

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