[x264-devel] Configuring by PPS / Inter Keyframe Re-Encodeing

Evgeny Yakimov john.yakimov at gmail.com
Fri May 25 11:14:56 CEST 2012


Hello

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.

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.

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.

So:

1) Is it possible to configure x264 to match the settings in the PPS
container, mainly profile and level?
2) Would I be able to simply switch to the old encode without sending a new
PPS?

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,

Regards,
Evgeny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20120525/6ca15908/attachment.html>


More information about the x264-devel mailing list