First - nice piece of software, thanks for that. Second - as I am C# programmer, I don't understand well c/c++. Can I please ask You to tell me where in the source is the write to file function? What I need - for input I enter udp://%sourceip%:%port% and QS outputs well to file. When I output to rts or rtsm from time to time I get "PES packet size mismatch", while when I output to file this error doesn't occurs. Anyway I need the output as UDP, so I decided to get the source and catch the buffer which will be written to file, and send it over UDP instead. Your code is too complicated for me, as I didn't saw anywhere how to do it. My closest guess for now is:
// Open the output container file
if (avio_open(&m_pOutFormatCtx->pb, m_pOutFormatCtx->filename, AVIO_FLAG_WRITE) < 0)
av_log(NULL, AV_LOG_ERROR, "FFMPEG: Could not open '%s'\n", m_pOutFormatCtx->filename);
Here file is created or nulified if already exists, and in the same file:
I guess it gets the encoded packet and sends it ... somewhere for write. My tries are fruitless for now to get the buffer before it's written to file, capture it and send it over UDP. Please assist me if You have time.
Thanks in advance, have a nice day/eve!