This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

h264 encoder getting struck

Other Parts Discussed in Thread: TVP5146, TVP7002

Hi all,

we are running custommade LeopardBoard DM368 running with DVSDK4_02_00_06.

tvp5146 and tvp7002 decoder drivers are registered successfully.

If we run any Gstreamer pipeline Application getting struck at encoding stage.

Can any one tell me what might be the problem?

Some additional information is , If I used to run pipeline

gst-launch -v v4l2src always-copy=FALSE input-src=composite ! "video/x-raw-yuv,format(fourcc)NV12,width=640,height=480" ! TIVidenc1 engineName=codecServer codecName=h264enc contiguousInputFrame=TRUE bitRate=2000000 rateControlPreset=2 encodingPreset=2 ! dmaiperf print-arm-load=true ! rtph264pay pt=96 ! udpsink host=192.168.1.15 port=3000 sync=false


Console window showing as follows

Setting pipeline to PAUSED ...
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
bytesperline 1440 width 720 height 480
vpfe-capture vpfe-capture: IPIPE Chained
vpfe-capture vpfe-capture: Resizer present
bytesperline 1440 width 720 height 480
bytesperline 1440 width 720 height 480
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0: queue-size = 3
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)640, height=(int)480
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstDmaiperf:dmaiperf1: There is no codec present that can handle the stream's type.
Additional debug info:
gsttidmaiperf.c(285): gst_dmaiperf_start (): /GstPipeline:pipeline0/GstDmaiperf:dmaiperf1:
Engine name not specified, not printing DSP information
WARNING: from element /GstPipeline:pipeline0/GstDmaiperf:inputenc: There is no codec present that can handle the stream's type.
Additional debug info:
gsttidmaiperf.c(285): gst_dmaiperf_start (): /GstPipeline:pipeline0/GstDmaiperf:inputenc:
Engine name not specified, not printing DSP information
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.
Additional debug info:
v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Invalid argument
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)640, height=(int)480
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)640, height=(int)480
/GstPipeline:pipeline0/GstDmaiperf:inputenc.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)640, height=(int)480
/GstPipeline:pipeline0/GstDmaiperf:inputenc.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)640, height=(int)480


Application getting struck here.

 

Regards.

Dasari

 

  • Hi,

    From above log, I am not sure it struct in encoder. Can you please send more logs with CE_DEBUG=2 or logs with codec debug library?

    Hope you verified standalone  H264 encoder  on your custom board.

    Thanks,

    Veeranna

  • Hellow,

    Yes you are correct. Problem with some configurations not with encoder . We didnt enable corresponding GPIO pin.

    Now, application  is running fine with SD. we are able to get video with 25fps.

    But if we run application with 1080p its giving error like

    vpfe-capture vpfe-capture: Error: requesting VINT0 interrupt
    vpfe-capture vpfe-capture: Error in attaching interrupt handle

    Any Help?

    Regards,

    Dasari.

  • Hi,

    Above said error is related to capture device, print is coming from kernel. I am codec engineer I don't have expertise in this domain. 

    Please raise one more query for this, so that concerned people will reply.

    Thanks,

    Veeranna

  • Hi Veeranna,

    We were able to solve above issue. Now dm368-evm_4_02_00_06 has encoder version 02.20.00.01.

    so, I replaced codecs-dm365_4_02_00_00/packages/ti/sdo/codecs/h264enc with version 02.30.00.06.

    1. Is it fine just by changing as above?

    2. we want to set extended parameters. where is the structure for extended parameters? Not for demos.

    Regards,

    Dasari

  • Dasari said:
    1. Is it fine just by changing as above?

    Yes its fine

    Dasari said:
    2. we want to set extended parameters. where is the structure for extended parameters? Not for demos.

    Please search for base class structure in your setup and follow below e2e post

    http://e2e.ti.com/support/embedded/multimedia_software_codecs/f/356/t/115354.aspx

  • Hi,

    Thank you for your replay.

    I have update extended parameters but I am getting error like failed to open codec engine.

    I added ih264venc.h file in both venc1.c and gstvidenc1.c

    In gsttividenc1.c  file,Calling function modified as follows

    videnc1->hve1 = Venc1_create(viodenc1->hEngine,(char *)videnc1->codecName,(VIDENC1_params*)&h264params,(VIDENC1_DynamicParams*)&h264DynParams);

    By giving printf in venc1.c file  I got to know,

     hEncode = VIDENC1_create(hEngine, codecName, params); function is getting fail. Its returning NULL.
      if (hEncode == NULL) {
        printf("hEncode is null \n");
            Dmai_err2("Failed to open video encode algorithm: %s (0x%x)\n",
                     codecName, Engine_getLastError(hEngine));
            free(hVe);
            return NULL;
        }

    Any Help?

    Regards,

    Dasari