H264 compatibility issue with RTP

F32 feng32 at 163.com
Tue Aug 4 10:36:48 UTC 2020


Hi,

I'm working on Ubuntu 20.04, with GStreamer 1.16.2 and FFmpeg 4.2.2

Here's detailed steps to reproduce the issue.

Download test video from https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
Convert to VP9 / PCM with FFmpeg command ffmpeg -i sintel.webm -c:v vp9 -ar 8000 -ac 1 -c:a pcm_s16le sintel-vp9-pcm.mkv
Convert to H264 / PCM with FFmpeg command ffmpeg -i sintel.webm -c:v libx264 -ar 8000 -ac 1 -c:a pcm_s16le sintel-h264-pcm.mkv

Now we have two video files, sintel-vp9-pcm.mkv and sintel-h264-pcm.mkv, and we are going to send the video / audio streams by RTP.

Commands for VP9 are:

# sendergst-launch-1.0 rtpbin name=rtpbin \	filesrc location=/tmp/sintel-vp9-pcm.mkv ! matroskademux name=demux \	demux.audio_0 !"audio/x-raw, format=S16LE, width=16, rate=8000, channels=1, layout=interleaved"! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_0 \	demux.video_0 ! rtpvp9pay ! rtpbin.send_rtp_sink_1 \	rtpbin.send_rtp_src_0 ! udpsink host=127.0.0.1 port=5000 sync=true async=false\	rtpbin.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=5001 sync=false async=false\	rtpbin.send_rtp_src_1 ! udpsink host=127.0.0.1 port=5002 sync=true async=false\	rtpbin.send_rtcp_src_1 ! udpsink host=127.0.0.1 port=5003 sync=false async=false# clientgst-launch-1.0 rtpbin name=rtpbin \	udpsrc address=127.0.0.1 port=5000 caps="application/x-rtp, media=audio, encoding-name=PCMA, clock-rate=8000"! rtpbin.recv_rtp_sink_0 \	udpsrc address=127.0.0.1 port=5001 caps="application/x-rtcp"! rtpbin.recv_rtcp_sink_0 \	udpsrc address=127.0.0.1 port=5002 caps="application/x-rtp, media=video, encoding-name=VP9, clock-rate=90000"! rtpbin.recv_rtp_sink_1 \	udpsrc address=127.0.0.1 port=5003 caps="application/x-rtcp"! rtpbin.recv_rtcp_sink_1 \	rtpbin. ! rtppcmadepay ! queue ! autoaudiosink sync=true\	rtpbin. ! rtpvp9depay ! queue ! avdec_vp9 ! autovideosink sync=true
It works and a window will pop up showing the video with audio.

Commands for H264 are:

# sendergst-launch-1.0 rtpbin name=rtpbin \      filesrc location=/tmp/sintel-h264-pcm.mkv ! matroskademux name=demux \      demux.audio_0 !"audio/x-raw, format=S16LE, width=16, rate=8000, channels=1, layout=interleaved"! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_0 \      demux.video_0 ! rtph264pay ! rtpbin.send_rtp_sink_1 \      rtpbin.send_rtp_src_0 ! udpsink host=127.0.0.1 port=5000 sync=true async=false\      rtpbin.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=5001 sync=false async=false\      rtpbin.send_rtp_src_1 ! udpsink host=127.0.0.1 port=5002 sync=true async=false\      rtpbin.send_rtcp_src_1 ! udpsink host=127.0.0.1 port=5003 sync=false async=false# clientgst-launch-1.0 rtpbin name=rtpbin \      udpsrc address=127.0.0.1 port=5000 caps="application/x-rtp, media=audio, encoding-name=PCMA, clock-rate=8000"! rtpbin.recv_rtp_sink_0 \      udpsrc address=127.0.0.1 port=5001 caps="application/x-rtcp"! rtpbin.recv_rtcp_sink_0 \      udpsrc address=127.0.0.1 port=5002 caps="application/x-rtp, media=video, encoding-name=H264, clock-rate=90000"! rtpbin.recv_rtp_sink_1 \      udpsrc address=127.0.0.1 port=5003 caps="application/x-rtcp"! rtpbin.recv_rtcp_sink_1 \      rtpbin. ! rtppcmadepay ! queue ! autoaudiosink sync=true\      rtpbin. ! rtph264depay ! queue ! avdec_h264 ! autovideosink sync=true

It does not work and no window pops up. There is no warning / error logs either.

It seems that something's wrong with the elements' internal implementations, or an appropriate warning / error message is absent.

I have also created an issue on https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/774


Any help that can move me in the right direction to solve this would be appreciated :)


Regards,
Windy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200804/64569c17/attachment-0001.htm>


More information about the gstreamer-devel mailing list