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)
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
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 sources0:a
and1:a
(from video source0
and1
) into a 4 channel audio sourcepan=stereo|c0<c0+c2|c1<c1+c3
combine the 4 channelsc0
,c1
,c2
,c3
into 2 channels (stereo)Related to MP4 support in #30