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.

dm365evm - Gstreamer on dvsdk 4.02

Hello,

today I have started playing with dm365evdm. I have the base board only and also no monitor with composite input, yet so I wanted to try video encoding using some artificial signal and saving to a file. Unfortunately with following gstreamer commad I had a bad luck.

gst-launch -v \
videotestsrc \
! "video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)30/1, width=(int)${WIDTH}, height=(int)${HEIGHT}" \
! queue \
! TIVidenc1 codecName=h264enc engineName=codecServer contiguousInputFrame=TRUE bitRate=1000000 \
! queue \
! avimux \
! filesink location=sample.avi

Gstreamer create an avi file, but the content does not correspond to a standard videotestsrc pattern. It is more or less some noise even if the correct pattern can be seen on the background. I have tried also mpe4 encoder with no muxing, but the result was the same.

Could please anyone give me some advice how to make this working properly?

with best regards

Jan

  • Hello,

    Have you tried adding "num-buffers=<number>" property in videotestsrc. The reason why i recommend this is: muxer typically need to prepare certain information based on EOS event from uptsream and if you are not using videotestsrc then gstreamer will not generate proper EOS event. Please read the gstreamer documentation for more information.

    Thanks

    Brijesh

  • Hi Brijesh,

    thank you for answer. The problem was in the contiguousInputFrame=TRUE parameter for TIVidenc1, without this it is working fine. Unfortunately now I'm fighting with another problem. I'm able to encode for example to following resolutions: 320x240, 640x480, 1600x1200, but for example 800x600 gives following error

    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, f
    ormat=(fourcc)NV12, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)800,
    height=(int)600, framerate=(fraction)30/1
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, forma
    t=(fourcc)NV12, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)800, heig
    ht=(int)600, framerate=(fraction)30/1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, form
    at=(fourcc)NV12, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)800, hei
    ght=(int)600, framerate=(fraction)30/1
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = video/x-raw-yuv, format
    =(fourcc)NV12, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)800, heigh
    t=(int)600, framerate=(fraction)30/1
    ERROR: from element /GstPipeline:pipeline0/GstTIVidenc1:tividenc10: failed to encode video
    buffer

    Additional debug info:
    gsttividenc1.c(1456): gst_tividenc1_encode (): /GstPipeline:pipeline0/GstTIVidenc1:tividen
    c10
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to NULL ...
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL
    Freeing pipeline ...

    Am I missing something?

    regards

    Jan