bytedeco/javacv

avfilter_graph_parse_ptr() error -22 while merging two music with different sample rate

Open

#1,736 建立於 2022年1月7日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)Java (1,583 fork)batch import
help wantedquestion

倉庫指標

Star
 (6,985 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi, I want to merge two music with different sample rate(44100 and 48000), and I push their samples to two FFmpegFrameFilter(A, B) with different sample rate. And I want merge these two filters into the one, how can I do this?

I create third filter(C, 44100) uses [0:a][1:a]amix=inputs=2:duration=longest[a]. And I push Samples that pulled by A and B to C. But I get the error message (avfilter_graph_parse_ptr() error -22) while pushing B's samples.

So, what is the correct way of merging two music with different sample rate?

Thanks.

貢獻者指南