0

Is there anyone who knows how to use Tee pseudo muxer of ffmpeg by c++ code. Kindly guide in doing 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.

1 Answers1

0

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.