Skip to content

Amerge filter #13

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

Open
IvanovYevgeniy opened this issue Dec 2, 2019 · 0 comments
Open

Amerge filter #13

IvanovYevgeniy opened this issue Dec 2, 2019 · 0 comments

Comments

@IvanovYevgeniy
Copy link

Hi,
Thank you very much for ffmpeg-cpp. Very useable.
Can you help me with amerge filter for merge two audio files?
My code:

Muxer* muxer = new Muxer("output.wav");
AudioCodec* codec = new AudioCodec(AV_CODEC_ID_ADPCM_IMA_WAV);
AudioEncoder* encoder = new AudioEncoder(codec, muxer);
Filter* filter = new Filter("amerge", encoder);

Demuxer* source1 = new Demuxer("audio1.wav");
source1->DecodeBestAudioStream(filter);

Demuxer* source2 = new Demuxer("audio2.wav");
source2->DecodeBestAudioStream(filter);

source1->PreparePipeline();
source2->PreparePipeline();

while (!source1->IsDone()) {
source1->Step();
source2->Step();
}
muxer->Close();

Output file consist only header.

Kind regards, Yevgeniy.

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