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.

DEI on DM8168 using gstreamer

We are working on PAL/NTSC capture using omx_camera and gstreamer. The ezsdk version is 05 05 02 00.
ADV7181C Video decoder is used to get 8 bit BT.656 fromat.

We are able to capture PAL/NTSC video and want to use deinterlace module to get progressive YUY2 format video as output.
But we are not able to get proper deinteraced video.

pipeline used:

gst-launch omx_camera input-mode=8_BIT scan-type=interlaced input-interface=VIP1_PORTB ! "video/x-raw-yuv, format=(fourcc)NV12, width=720, height=576, framerate=60/1, buffer-count-requested=10, interlaced=(boolean)true" ! omx_mdeiscaler name=d d.src_00 ! "video/x-raw-yuv, format=(fourcc)YUY2, width=720, height=576" ! gstperf ! filesink location=test1.yuv sync=false

capture[PAL/NTSC]--->dei---->file

let me know i m using proper pipeline for above usecase

  • Moving this post to the DM816x forum.
  • Hello,

    Could you attach a screenshot(or the yuv file) of what you are observing?

    Keep in mind the dei component has two outputs which should be connect, if someone of them are not used, it shall be connect to the fakesink element.
    The src_00 provides on its output YUYV on src_01 is NV12.

    BR
    Margarita
  • PFA

    Pipeline used for capture_after_dei.yuv:

    gst-launch omx_camera input-mode=8_BIT input-interface=VIP1_PORTB scan-type=interlaced ! "video/x-raw-yuv, format=(fourcc)NV12, width=720, height=576, framerate=60/1, buffer-count-requested=10, interlaced=(boolean)true" ! omx_mdeiscaler name=d d.src_00 !"video/x-raw-yuv, format=(fourcc)YUY2, width=720, height=576" ! filesink location=capture_after_dei.yuv sync=false d.src_01 ! fakesink silent=true

    8203.capture_after_dei.txt

    Pipeline used for capture_after_dei.yuv:

    gst-launch omx_camera input-mode=8_BIT input-interface=VIP1_PORTB scan-type=interlaced ! "video/x-raw-yuv, format=(fourcc)NV12, width=720, height=576, framerate=60/1, buffer-count-requested=10, interlaced=(boolean)true" ! filesink location=capture_before_dei.yuv sync=false

    capture_before_dei.txt

    .yuv file was not uploading so i have change the file extension  to .txt. Please revert it back. 

    may this help you to debug further in it.

  • Hello,

    I will check and I will let you know.

    BR
    Margarita

  • Hello,

    My observations:

    I see that you are using the omx_camera element. In the default EZSDK we do not have such element. I checked your first video file after the gst DEI element on the PC.

    Here is the command:

    mplayer -demuxer rawvideo -rawvideo w=720:h=576:format=yuy2 8203.capture_after_dei.yuv. The first frames looks correct:

    Since in the default there is no omx_camera I tried to replace these element with video file with interlaced content.

    In my case I have  used the decoder element. The decoder outputs YUV420 NV12 as you can see in the log file. After the omx_mdeiscaler element I saved the in  file.

    gst-launch -v filesrc location=1080i25mpe.mp4 ! qtdemux ! mpe
    g4videoparse ! omx_mpeg4dec ! omx_mdeiscaler framerate-divisor=2 name=d d.src_00
     !  filesink location=yuy2_out.yuv  sync=true   d.src_01   ! fakesink silent=tru
    e sync=true
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstMpeg4VParse:mpeg4vparse0.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)advanced-simple, level=(string)5, codec_data=(buffer)000001b0f5000001b509000001000000012008ca0d0800ce19e02438e2707f000001b25876694430303530, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true, profile-level-id=(string)245
    /GstPipeline:pipeline0/GstMpeg4VParse:mpeg4vparse0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)advanced-simple, level=(string)5, codec_data=(buffer)000001b0f5000001b509000001000000012008ca0d0800ce19e02438e2707f000001b25876694430303530, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
    Width :1920, Height: 1080
    /GstPipeline:pipeline0/GstOmxMpeg4Dec:omxmpeg4dec0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)advanced-simple, level=(string)5, codec_data=(buffer)000001b0f5000001b509000001000000012008ca0d0800ce19e02438e2707f000001b25876694430303530, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true, profile-level-id=(string)245
    /GstPipeline:pipeline0/GstOmxMpeg4Dec:omxmpeg4dec0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)advanced-simple, level=(string)5, codec_data=(buffer)000001b0f5000001b509000001000000012008ca0d0800ce19e02438e2707f000001b25876694430303530, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true, profile-level-id=(string)245
    /GstPipeline:pipeline0/GstOmxMpeg4Dec:omxmpeg4dec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstOmxMpeg4Dec:omxmpeg4dec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)true //Decoder output
    /GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)true //MDEI input
    /GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)true
    /GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:src_00: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false //MDEI YUY2output to filesink
    /GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:src_01: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)NV12, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false //MDEI NV12 output to fakesink
    this input  params: 1920x540,2048 3317760 1
    incoming buffer: nFilledLen: 3497968, nOffset: 16400 nFlags: 10200
    Second field offset does not look right... correcting it from 1171456 to 1146880
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)NV12, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock

    In the last case I haven't observed a problem.

    Your pipeline seems correct. Could you check if you replace the filesink with ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink sync=true are you will see it correctly on the display? The omx_videosink accept YUY2 (YUYV) as input. 

    BR

    Margarita