[x265] no SPS/PPS yet, * will be dropped

Dolevo Jay cmst at live.com
Fri Aug 12 11:36:05 CEST 2016


Hi,


Previous issue is gone now but now I see another message:

I have adapted my code as below:


    if (frame_size > 0) {

        for (i = 0; i < iNal; i++) {

            memcpy(aFramebuffer + offset, pNals[i].payload, pNals[i].sizeBytes);

            offset += pNals[i].sizeBytes;

          }

        *aFrameBufferSize = offset;

    }



Now I see the following at the gstreamer side:

GST_DEBUG=h265*:4 gst-launch-1.0 filesrc location=/store/dumpedEncodedStream.265 ! h265parse ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.133435240 10458      0x1424ca0 INFO               h265parse gsth265parse.c:1450:gst_h265_parse_update_src_caps:<h265parse0> resolution changed 1728x1088
0:00:00.133481722 10458      0x1424ca0 INFO               h265parse gsth265parse.c:1462:gst_h265_parse_update_src_caps:<h265parse0> framerate changed 25/1
0:00:00.133549647 10458      0x1424ca0 INFO               h265parse gsth265parse.c:1509:gst_h265_parse_update_src_caps:<h265parse0> setting framerate in caps
0:00:00.133628726 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.134707710 10458      0x1424ca0 INFO               h265parse gsth265parse.c:1509:gst_h265_parse_update_src_caps:<h265parse0> setting framerate in caps
0:00:00.134769508 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.135041699 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.135199848 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.135293074 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.138458683 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.138573135 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.138670004 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.139797938 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
0:00:00.139880238 10458      0x1424ca0 FIXME              h265parse gsth265parse.c:1612:gst_h265_parse_parse_frame:<h265parse0> Implement timestamp/duration interpolation based on SEI message
Got EOS from element "pipeline0".
Execution ended after 0:00:00.005692448
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...


Is there still something missing?

Regards,


________________________________
From: x265-devel <x265-devel-bounces at videolan.org> on behalf of Pradeep Ramachandran <pradeep at multicorewareinc.com>
Sent: Friday, August 12, 2016 3:02 AM
To: Development for x265
Subject: Re: [x265] no SPS/PPS yet, * will be dropped


On Fri, Aug 12, 2016 at 7:14 AM, Deepthi Nandakumar <deepthipnandakumar at gmail.com<mailto:deepthipnandakumar at gmail.com>> wrote:

You're handling pNals wrongly. framesize may be 1, but number of NALs in the stream may be greater than 1 (=iNal). So you need to copy all of those, not just pNals[0].

On 12-Aug-2016 2:53 am, "Dolevo Jay" <cmst at live.com<mailto:cmst at live.com>> wrote:

Hi all,


In my encoder application, I initialize the encoder as follows:


    param = x265_param_alloc();

    x265_param_default(param);

    x265_param_default_preset(param, "ultrafast", "zerolatency");

    param->fpsNum = 25;

    param->fpsDenom = 1;

    param->bRepeatHeaders = true;

    param->internalCsp = X265_CSP_I420;

    param->sourceWidth = aWidth;

    param->sourceHeight = aHeight;


    y_size = param->sourceWidth * param->sourceHeight;


    param->logLevel = X265_LOG_FULL;


    encoder = x265_encoder_open(param);

    if (NULL == encoder) {

        printLog("[X265] x265_encoder_open err");

        return;

    }

    param->internalCsp = X265_CSP_I420;


    pic_in = x265_picture_alloc();

    x265_picture_init(param, pic_in);

    pic_in->planes[0] = new char[32000000];

    pic_in->planes[1] = new char[32000000];

    pic_in->planes[2] = new char[32000000];

    pic_in->stride[0] = aWidth;

    pic_in->stride[1] = aWidth;

    pic_in->stride[2] = aWidth;


    pic_out = x265_picture_alloc();

    x265_picture_init(param, pic_out);



Then, I apply the following function for each incoming frame:


    int frame_size = 0;


    x265_picture pic_out1;

    frame_size = x265_encoder_encode(encoder, &pNals, &iNal, pic_in, NULL);

    if (frame_size < 0) {

        printLog("[ERROR] H265: x265_encoder_encode failed.");

        return;

    }

    if (frame_size > 0) {

        memcpy(aFramebuffer, pNals[0].payload, pNals[0].sizeBytes);

You need to iterate over iNal and copy the payload for all the pNals from 0 to iNal.


        *aFrameBufferSize = pNals[0].sizeBytes;

    }


    dumpfileEncodedData.write((const char *)aFramebuffer, *aFrameBufferSize);



Just to debug the encoded bitstream, I dump the data into a file


_______________________________________________
x265-devel mailing list
x265-devel at videolan.org<mailto:x265-devel at videolan.org>
https://mailman.videolan.org/listinfo/x265-devel


_______________________________________________
x265-devel mailing list
x265-devel at videolan.org<mailto:x265-devel at videolan.org>
https://mailman.videolan.org/listinfo/x265-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160812/a2c20892/attachment-0001.html>


More information about the x265-devel mailing list