andy vt's tools & blog

automating lazy

QSTranscode named pipe and/or udp OUTput

Last post Thu, Oct 23 2014 12:45 AM by cheatera. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • Thu, Oct 23 2014 12:45 AM

    QSTranscode named pipe and/or udp OUTput

     Hello there,
    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:
    in ffmpegrw.cpp:
        // 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);
          return MFX_ERR_UNKNOWN;
    Here file is created or nulified if already exists, and in the same file:
       av_new_packet(&pkt, pMfxBitstream->DataLength);
    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!

Page 1 of 1 (1 items)
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems