title: How can I intercept encoded video data using ffmpeg with C?
body: <p>First of all, I hope you'll understand my poor english skill. I'll do my best to write question about it.</p>
  
  <p>I'm currently developing some application. That application will captures desktop and encodes to MP4 video and send mp4 video data/chunks to another clients (all this process should run in memory not file). so another client should can play mp4 video/data/chunks that received from server. </p>
  
  <p>so I used <code>avio = avio_open(...)</code> and reassigned write function as like <code>avio-&gt;write_packet = some_function</code>. but this way seems not "generate" mp4 file/chunk correctly. and It seems the original <code>write_packet</code> callback having actual logic that write packet to a file. but I don't want to write to a file. so I was thinking about it for a week but I did't getting any of idea about it.</p>
  
  <p>so my question is: How can I <strong>intercept</strong> "encoded" video data that should processed by <code>avio-&gt;write_packet</code>?</p>