Hello<div><br></div><div>I have an encoded h264 live stream coming to my media server in the form of RTMP, The stream is encoded by a dedicated encoder with a fixed profile (but in theory could come from any h264 encoder). The encode will contain a preset keyframe interval (or scene-cut based keyframes), but in any case we can consider that the keyframes will be as much as 10 seconds apart in the incoming encode.</div>
<div><br></div><div>I wish to allow a user to set a "Start" point by sending a signal to the media server which will actually contain a timestamp corresponding to the precise frame of where to start (the user will be watching the stream a few seconds earlier). This start signal will signal a Capture or Republish Start point, To simplify things, lets say that this signal means beginning a capture to a file.</div>
<div><br></div><div>The problem is that this start point can come at any time between the 10 second interval and I do not wish to make the user jump to the last or next key frame. I was instead hoping to decode the frames from the Start point until the next Key frames, and re-encode them using an x264 instance that matches the h264 profile (and as many settings as possible) on the incoming stream. As well as the PPS I will have the framerate and bitrate from the container header. After this region is re-encoded I wish for the engine to switch back to the original encode.</div>
<div><br></div><div>So:</div><div><br></div><div>1) Is it possible to configure x264 to match the settings in the PPS container, mainly profile and level?</div><div>2) Would I be able to simply switch to the old encode without sending a new PPS?</div>
<div><br></div><div>Note: I do not wish to re-encode the entire stream, and also I understand that this small re-encode will result in a reduction in quality for the re-encoded region,</div><div><br></div><div>Regards,</div>
<div>Evgeny</div>