<div dir="ltr"><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px">Hi,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I am developing a software for managing an ATSC TV broadcast and would like to use FFmpeg as the encoding engine.  The structure of my program requires that it be fed 188 byte mpeg 2 TS packets.  Could someone point me toward the best way to utilize FFmpeg such that I can control the start/stop and acquire the TS packets in my program directly without writing to hard drive or broadcasting them over the network?  I need to be ready to encode at the close of a relay so I do not miss the first few seconds of the emergency alerts and also add black padding on either end.  The solution I think I am going to need is to continuously encode with FFmpeg and implement a circular buffer in my program to capture the moments just prior to a relay closure.  My program can then process and send the packets.  I haven't linked to FFmpeg before, so any pointers would be appreciated.  I am using Qt Creator and c++ and mingw32 for my development environment.  I need to be able to process the packets in my program to add splice flags, and other things, so outputting directly from FFmpeg isn't desirable.  Is FFmpeg stable enough to run in this manner 24/7 assuming my code is also?</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div> This project will be hosted at:</div><div><br></div><div><a href="https://github.com/dedicatedbroadcastsolutions/TvARP/" target="_blank">https://github.com/dedicatedbroadcastsolutions/TvARP/</a></div></div><span class="" style="font-family:arial,sans-serif;font-size:13px"><font color="#888888"><div><br></div><div>Zach</div></font></span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">PS: I may have some more questions or comments once I finish analyzing the FFmpeg stream for PCR compliance.  I currently have to re-stamp PCR using libvlc, but FFmpeg has DTS, so I can't test that until I update the re-stamping code or finish writing a PCR analyzer.  Course PCR causes stutter with decode on TV sets.</div></div></div>