Page 1 of 1

Using Tee pseudo muxer of ffmpeg by c++ code.

Posted: Thu Aug 17, 2017 4:12 am
by Taha
Hello ,

Is there anyone who knows how to use Tee pseudo muxer of ffmpeg by c++ code. Kindly guide me to this.
I am working on getting multiple outputs of muxed transport stream (ts) data. I am able to mux aac and h264 in ts. But i have to get muxed ts data in multiple output.

So please guide me if anyone know how to do it with Tee pseudo muxer.

Re: Using Tee pseudo muxer of ffmpeg by c++ code.

Posted: Wed Aug 23, 2017 7:28 am
by Taha
I have done this by myself, and i am sharing it here for others:
First do initialise AVFormatContext with tee container and output tee url like : avformat_alloc_output_context2(&m_oc, NULL, "tee", filename);
Here m_oc is AVFormatContext, tee is container and filename is outputs(like in filename: "[f=mpegts]udp://127.0.0.1:2222|[f=mpegts]udp://127.0.0.1:3333|[f=mp4]output.mp4")

then set avformat context with this filename as:
sprintf_s(m_oc->filename, "%s",filename);

and go with normal muxing.c sample flow provided by ffmpeg.