H264 compatibility issue with RTP

classic Classic list List threaded Threaded
1 message Options
F32
Reply | Threaded
Open this post in threaded view
|

H264 compatibility issue with RTP

F32
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.

  1. Download test video from https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
  2. 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
  3. 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:

# sender
gst-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
# client
gst-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:

# sender
gst-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
# client
gst-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.


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

Regards,
Windy


 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel