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.

The problem when decodeing H264 video(the video picture is not fluent and dithering )

Hello all :

    There is maybe some problem on decoding Streaming H.264 video media content from on-board Ethernet port of DM8148 EVM . The details of the problem are the followings. Now,I doubt may be h264parse and omx_h264dec  will have some problem, Is there anyone can tell me what could be the cause of the problem and how to fix them?Thanks so much!

 Platform: Spectrum DM8148 EVM reversion: G

EZSDK version:5_05_01_04_dm814x

Gstreamer revision: the latest (1041)from https://gstreamer.ti.com/svn/gstreamer_ti/trunk/gstreamer_ti_dm81xx

Streaming program : Windows version VLC(Use VLC  to sent Ts video)

Streaming Protocol: RTP

media:TS Stream(Video:H264,25fps or 30fps ,progressive or interlaced ,test result all is same)

             

Gsteamer pipeline:

gst-launch-0.10  udpsrc   multicast-iface=eth0 multicast-group=230.0.0.1  port=5004   caps="application/x-rtp,clock-rate=(int)90000,payload=(int)33, \
encoding-name=(string)MP2T-ES" \
! .recv_rtp_sink_0 gstrtpbin ! queue ! rtpmp2tdepay   \
!  mpegtsdemux \
!  'video/x-h264' ! h264parse access-unit=true  ! omx_h264dec  ! omx_mdeiscaler  name=d d.src_00 \
! 'video/x-raw-yuv,width=800,height=480' ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 display-device=LCD ! \
gstperf ! omx_videosink  top=50 left=50 display-mode=OMX_DC_MODE_1080P_60 display-device=LCD  sync=false  d.src_01 ! fakesink silent=true  -v

 

Case 1:

If DM8148 gstreamer pipeline start before VLC streaming out, the result of playing is the video picture is  fluent.(OK) 

the message on console is :

Setting pipeline to PAUSED ...
IPTV:udpsrc revmodel is 0
IPTV:revmodel is 0,use udp sockded
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_r
tp_sink: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encod
ing-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_sink_0: caps = app
lication/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-name=(string)MP
2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_sink_0.GstProxyPad
:proxypad0: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, en
coding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_r
tp_src: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encodi
ng-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:si
nk: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-n
ame=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.Gst
Pad:src: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encod
ing-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.Gst
Pad:sink: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, enco
ding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:sink:
caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-name=
(string)MP2T-ES
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = application/x-rtp, cl
ock-rate=(int)90000, payload=(int)33, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_2764225876_3
3.GstProxyPad:proxypad1: caps = application/x-rtp, clock-rate=(int)90000, payloa
d=(int)33, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = application/x-rtp, clo
ck-rate=(int)90000, payload=(int)33, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:src: caps = video/mp
egts, packetsize=(int)188, systemstream=(boolean)true
/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:sink: caps = applica
tion/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-name=(string)MP2T-E
S
/GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0.GstPad:sink: caps = video/mpe
gts, packetsize=(int)188, systemstream=(boolean)true
/GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0: pat-info = ((GValueArray*) 0
x1d5c00)
/GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0: pmt-info = ((MpegTsPmtInfo*)
0x1d6da0)
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2: caps = video/x-h264
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3: caps = video/x-h264
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3.GstPad:src: caps = video/x-h264
, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264,
stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264,
stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, height=
(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, heig
ht=(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, heig
ht=(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-
yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(in
t)896, interlaced=(boolean)false, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-
yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(in
t)896, interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:sink: caps = video/x-raw-yuv-st
rided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896,
interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:sink: caps = video/x-raw-yuv-st
rided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896,
interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:src_00: caps = video/x-raw-yuv,
width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0/1,
interlaced=(boolean)false
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:src_01: caps = video/x-raw-yuv,
width=(int)720, height=(int)576, format=(fourcc)NV12, framerate=(fraction)0/1,
interlaced=(boolean)false
this input  params: 720x288,896 774144 1
incoming buffer: nFilledLen: 881632, nOffset: 21536 nFlags: 50000
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw-
yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0
/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw
-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)
0/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:src: caps = video/x-ra
w-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction
)0/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:sink: caps = video/x-r
aw-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fractio
n)0/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw-yuv
, width=(int)720, height=(int)576, format=(fourcc)NV12, framerate=(fraction)0/1,
interlaced=(boolean)false
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = video/x-raw-yuv, width=(
int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0/1, interlac
ed=(boolean)false
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = video/x-raw-yuv, width=
(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0/1, interla
ced=(boolean)false
IPTV:left:50 top:50 width:800 high:480
/GstPipeline:pipeline0/GstOmxVideoSink:omxvideosink0.GstPad:sink: caps = video/x
-raw-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fract
ion)0/1, interlaced=(boolean)false
perf0: frames: 43       current: 41.75   average: 41.75 arm-load: 9

Case 2:

If VLC streaming out first then DM8148 gstreamer pipeline start, the streaming video playback will always have wrong decoded frame order problems.and the  result of playing  is the video picture is  dithering.(Bad)

the message on console is :

Setting pipeline to PAUSED ...
IPTV:udpsrc revmodel is 0
IPTV:revmodel is 0,use udp sockded
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_r
tp_sink: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encod
ing-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_sink_0: caps = app
lication/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-name=(string)MP
2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_sink_0.GstProxyPad
:proxypad0: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, en
coding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:recv_r
tp_src: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encodi
ng-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:si
nk: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-n
ame=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.Gst
Pad:src: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encod
ing-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.Gst
Pad:sink: caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, enco
ding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:sink:
caps = application/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-name=
(string)MP2T-ES
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = application/x-rtp, cl
ock-rate=(int)90000, payload=(int)33, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_3210768595_3
3.GstProxyPad:proxypad1: caps = application/x-rtp, clock-rate=(int)90000, payloa
d=(int)33, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = application/x-rtp, clo
ck-rate=(int)90000, payload=(int)33, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:src: caps = video/mp
egts, packetsize=(int)188, systemstream=(boolean)true
/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:sink: caps = applica
tion/x-rtp, clock-rate=(int)90000, payload=(int)33, encoding-name=(string)MP2T-E
S
/GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0.GstPad:sink: caps = video/mpe
gts, packetsize=(int)188, systemstream=(boolean)true
/GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0: pat-info = ((GValueArray*) 0
x20a4d0)
/GstPipeline:pipeline0/GstMpegTSDemux:mpegtsdemux0: pmt-info = ((MpegTsPmtInfo*)
0x20b5a0)
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2: caps = video/x-h264
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-h264
, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264,
stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264,
stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, height=
(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, heig
ht=(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, heig
ht=(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-
yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(in
t)896, interlaced=(boolean)false, framerate=(fraction)0/1
Stream is corrupt error, ignorable ...
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-
yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(in
t)896, interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:sink: caps = video/x-raw-yuv-st
rided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896,
interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:sink: caps = video/x-raw-yuv-st
rided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896,
interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:src_00: caps = video/x-raw-yuv,
width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0/1,
interlaced=(boolean)false
/GstPipeline:pipeline0/GstOmxMDeiScaler:d.GstPad:src_01: caps = video/x-raw-yuv,
width=(int)720, height=(int)576, format=(fourcc)NV12, framerate=(fraction)0/1,
interlaced=(boolean)false
this input  params: 720x288,896 774144 1
incoming buffer: nFilledLen: 881632, nOffset: 21536 nFlags: 50200
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw-
yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0
/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw
-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)
0/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:src: caps = video/x-ra
w-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction
)0/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:sink: caps = video/x-r
aw-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fractio
n)0/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw-yuv
, width=(int)720, height=(int)576, format=(fourcc)NV12, framerate=(fraction)0/1,
interlaced=(boolean)false
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = video/x-raw-yuv, width=(
int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0/1, interlac
ed=(boolean)false
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = video/x-raw-yuv, width=
(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fraction)0/1, interla
ced=(boolean)false
IPTV:left:50 top:50 width:800 high:480
/GstPipeline:pipeline0/GstOmxVideoSink:omxvideosink0.GstPad:sink: caps = video/x
-raw-yuv, width=(int)800, height=(int)480, format=(fourcc)YUY2, framerate=(fract
ion)0/1, interlaced=(boolean)false
perf0: frames: 12       current: 11.27   average: 11.27 arm-load: 8
perf0: frames: 46       current: 33.12   average: 21.99 arm-load: 24

 

summarize :

Just as the above ,the only different infor betwwen the first case  and the second was :

1、The first difference

The first case :(play fluently and good)

/GstPipeline:pipeline0/GstCapsFilter:capsfilter2: caps = video/x-h264
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3: caps = video/x-h264
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3.GstPad:src: caps = video/x-h264
, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)nal

 and the second case  (play dithering and bad )

/GstPipeline:pipeline0/GstCapsFilter:capsfilter2: caps = video/x-h264
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-h264
, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-h26
4, stream-format=(string)byte-stream, alignment=(string)nal

 

2、Second difference

The first case :

incoming buffer: nFilledLen: 881632, nOffset: 21536 nFlags: 50000

and the second case:

incoming buffer: nFilledLen: 881632, nOffset: 21536 nFlags: 50200

3. the third difference

the second case  always turn out:

/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-
yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(in
t)896, interlaced=(boolean)false, framerate=(fraction)0/1
Stream is corrupt error, ignorable ...

And:

When I use the same gstreamer cmd (only decoder is different) to test on PC platform,all is OK,the result of playing is the video was played  very well and fluent.

On PC ,the cmd is :

gst-launch-0.10  udpsrc   multicast-iface=eth0 multicast-group=230.0.0.1  port=5004   caps="application/x-rtp,clock-rate=(int)90000,payload=(int)33, \
encoding-name=(string)MP2T-ES" \
! .recv_rtp_sink_0 gstrtpbin ! queue ! rtpmp2tdepay   \
!  mpegtsdemux \
!  'video/x-h264' ! ffdec_h264 ! ffmpegcolorspace ! videoscale ! queue ! xvimagesink

So,comparing to on DM814x,the difference is :

 'video/x-h264' ! ffdec_h264 ! ffmpegcolorspace ! videoscale ! queue ! xvimagesink-------------------PC

and

h264parse access-unit=true  ! omx_h264dec  ! omx_mdeiscaler ! 'video/x-raw-yuv,width=800,height=480' ! omx_ctrl ! omx_videosink---------On Dm814x

SO,Wheather the h264parse  or omx_h264dec  or omx_mdeiscaler  may be have some problem.

        Thanks very much .

                                                                                              zhichao.