[FFmpeg-devel] [PATCH] Added rap flag to libx265 to insert VPS/SPS/PPS before each key frame.

Marcus Gustafsson mankan.gustafsson at gmail.com
Tue Mar 25 21:29:10 CET 2014


HI again,

the x.265 project have fixed a repeat headers flag so the wrapper patch is
minimal.

Best regards
Marcus

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 291692a..0afc335 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -149,6 +149,9 @@ static av_cold int libx265_encode_init(AVCodecContext
*avctx)
         ctx->params->rc.rateControlMode = X265_RC_ABR;
     }

+    if (!(avctx->flags & CODEC_FLAG_GLOBAL_HEADER))
+        ctx->params->bRepeatHeaders = 1;
+
     if (ctx->x265_opts) {
         AVDictionary *dict    = NULL;
         AVDictionaryEntry *en = NULL;



On Sat, Mar 15, 2014 at 1:32 PM, Derek Buitenhuis <
derek.buitenhuis at gmail.com> wrote:

> On 3/14/2014 10:06 PM, Hendrik Leppkes wrote:
> > Random Access Point
> >
> > Regarding the patch, I think its a better idea to ask the x265
> > developers to offer this functionality, similar to how libx264 does.
> > They are pretty open to such suggestions, and iirc. Derek (the
> > author/maintainer of the libx265 wrapper) already had plans for this
> > in some form and shape.
>
> I'll add support for the global header flag and setting the extradata
> properly
> in such places, as discussed on #x265.
>
> But yeah, I have no intention of adding VPS/SPS/PPS at RAPs as a feature of
> the wrapper.
>
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list