<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body
      p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;"
    bidimailui-detected-decoding-type="latin-charset" bgcolor="#ffffff"
    text="#000000">
    <p>In a security app, I have input from 4 (or more) IP cameras, each
      giving h264 2 h264 streams: One at 1280x960, the other at 640x480<br>
    </p>
    <p>I need to do two things independently to these streams:</p>
    <p>1) "burn" a visual timestamp into the 1280x960 images (subtitles
      not good enough; unfortunately, this is a requirement made by the
      client, and is non-negotiable)</p>
    <p>2) multiplex sets of 4 640x480 stream into one 1280x960 stream
      that shows all 4 at the same time (visual timestamp not required
      in this mode, but if can be added it is a bonus)</p>
    <p>My only solution right now is to decode all streams, manipulate
      the pictures according to the requirements, and re-encode. This
      requires tremendous amounts of CPU (decode 4 1280x960 streams,
      decode 4 640x480 streams, encode 5 1280x960 streams; blitting the
      timestamp doesn't take much, and memory copies can be avoided, but
      don't cost much anyway. encoding is the culprit)</p>
    <p>Is there anything better that can be done? </p>
    <p>e.g., for (2) there might be a way to multiplex macroblocks from
      different pictures, without actually decoding them to image and
      re-encoding (thus avoiding the motion compensation estimation,
      which is super expensive, and the effects of requantization)</p>
    <p>for (1), there might be a way to increase the picture size to e.g
      1280x1000, and somehow encode the timestamp into the new 40 pixels
      (again, without decoding and re-encoding everything?)</p>
    <p>And assuming that I have to re-encode, is there a some
      hw-assisted encoder supported by ffmpeg that would be able to do
      this encoding in real time and without eating too many watts?<br>
    </p>
    <p>I have asked some of these questions before in this thread
      <a class="moz-txt-link-rfc2396E" href="http://www.mail-archive.com/libav-user@ffmpeg.org/msg00578.html"><http://www.mail-archive.com/libav-user@ffmpeg.org/msg00578.html></a>,
      but there wasn't a reasonable solution.</p>
    <p><br>
      Thanks in advance,</p>
    <p>Camera Man<br>
    </p>
  </body>
</html>