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

[python] Properly merge audio when compositing animated images #33

Closed
Montspy opened this issue Mar 23, 2022 · 1 comment · Fixed by #30
Closed

[python] Properly merge audio when compositing animated images #33

Montspy opened this issue Mar 23, 2022 · 1 comment · Fixed by #30
Assignees
Labels
enhancement New feature or request

Comments

@Montspy
Copy link
Owner

Montspy commented Mar 23, 2022

Users should be able to generate NFTs with an audio track if they provide webm or mp4 files that contain a stereo audio track.

ffmpeg can do the mixing using this filter complex:

[0:a][1:a]amerge=inputs=2,pan=stereo|c0<c0+c2|c1<c1+c3[a]
[0:a][1:a]amerge=inputs=2 merge the two stereo audio sources 0:a and 1:a (from video source 0 and 1) into a 4 channel audio source
pan=stereo|c0<c0+c2|c1<c1+c3 combine the 4 channels c0, c1, c2, c3 into 2 channels (stereo)

Related to MP4 support in #30

@Montspy Montspy added the enhancement New feature or request label Mar 23, 2022
@Montspy
Copy link
Owner Author

Montspy commented Mar 25, 2022

I had to rewrite more than I thought to support files with audio and files without audio.
We now support files with no audio and files with stereo audio (no mono)
Implemented in #30

@Montspy Montspy self-assigned this Mar 27, 2022
@Montspy Montspy linked a pull request Mar 27, 2022 that will close this issue
7 tasks
@sk33z3r sk33z3r changed the title Properly merge audio when compositing animated images [python] Properly merge audio when compositing animated images Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant