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.

TDA4VH-Q1: gstreamer rtp stream cannot play on TDA4VH

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH, TDA4VM

Hello, 

I am working on a tda4vh evm with sdk 0805, and I found a problem when using gstreamer v4l2h264enc plugin on it, here is my test:

1. start gstreamer pipeline using command line:

gst-launch-1.0 videotestsrc is-live=true do-timestamp=true num-buffers=300000 ! video/x-raw, width=1920, height=1080, framerate=30/1, format=I420  ! v4l2h264enc gop-size=30 bitrate=8000000 i-period=8 ! rtph264pay ! udpsink host=192.168.1.101 port=6868

where 192.168.1.101 is the IP address of a upper Ubuntu machine.

2. play this stream using ffplay on Ununtu, using command line:

ffplay -protocol_whitelist "file,rtp,udp" -i 6868.sdp

the file 6868.sdp says:

m=video 6868 RTP.AVP 96
a=rtpmap:96 H264/90000
c=IN IP4 127.0.0.1
a=framerate:30

However, ffplay cannot play the video and report a lot of errors, here is the console output of ffplay:

hirain@hirain-HP-ProBook-440-G7:~/haijun.yang$ ffplay -protocol_whitelist "file,rtp,udp" -i 6868.sdp
ffplay version 3.4.11-0ubuntu0.1 Copyright (c) 2003-2022 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!
[h264 @ 0x7f6ba8007980] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f6ba8007980] decode_slice_header error
[h264 @ 0x7f6ba8007980] no frame!

Then I tried to reverse above two steps, that is, start ffplay first and then start gstreamer pipeline. This time ffplay played the video successfully!

I did the same test on TDA4VM with sdk0805, the video stream could be well played by ffplay no matter which side started first.

Then, I recorded all network packets of gstreamer on TDA4VH and TDA4VM using tcpdump separately ( please refer to 8510.pcap.zip), and found the difference in the first byte of rtp payload, namely the NAL header:

on TDA4VM, the NAL header in value 0x67, which indicating the SPS frame, appears periodically, while on TDA4VH, it only appears in the first UDP frame. I guess this is the cause of this problem.

So my question is, why SPS frame do not appear periodically on TDA4VH? Is there any difference in v4l2 codec between TDA4VH and TDA4VM with sdk0805?