Wrong dts values for fdsrc before rtpbin

Francesc Pinyol Margalef francesc.pinyol.m at gmail.com
Tue May 12 14:42:58 UTC 2020


Hi,
On a CentOS 7 instance (3.10.0-1062.18.1.el7.x86_64), I'm using Snowmix
video mixer (https://snowmix.sourceforge.io/)
version 0.5.1 with its output attached to the following pipeline (GStreamer
1.16.2, compiled from source):


outsocket=/tmp/53cc8523-dd33-47ac-8cd6-c69f42315578prog
width=320
height=180
VIDEOFORMAT="video/x-raw,framerate=25/1,width=$width,height=$height,format=BGRA,pixel-aspect-ratio=1/1"
AUDIOFORMAT="audio/x-raw,format=S16LE,layout=interleaved,rate=48000,channels=2"

( echo "audio sink ctr isaudio 1" ; sleep 1000000) | nc 127.0.0.1
$SNOWMIX_PORT | \
( head -1
   /usr/local/bin/gst-launch-1.0 -v rtpbin name=bin \
        shmsrc socket-path=$outsocket do-timestamp=true is-live=true ! \
          $VIDEOFORMAT                           ! \
          queue                                  ! \
          videoscale                             ! \
          videoconvert                           ! \
          x264enc bitrate=488 key-int-max=25 aud=false ! \
          video/x-h264,profile=baseline          ! \
          rtph264pay config-interval=0 pt=96     ! \
          bin.send_rtp_sink_0 bin.send_rtp_src_0 ! \
            udpsink host=224.0.0.0 port=7000 sync=true    \
           fdsrc fd=0 do-timestamp=true            ! \
           $AUDIOFORMAT                           ! \
           queue max-size-buffers=200 max-size-time=1000000000
max-size-bytes=192000 ! \
  identity silent=false ! \
           audiorate tolerance=40000000 skip-to-first=false ! \
           audioresample                          ! \
           audioconvert                           ! \
           queue                                  ! \
           opusenc bitrate=120000                 ! \
           rtpopuspay pt=97                       ! \
           bin.send_rtp_sink_1 bin.send_rtp_src_1 ! \
              udpsink host=224.0.0.0 port=7002 sync=true
) &

I start snowmix and then the gst-launch pipeline. Sometimes (about half of
the times I start the pipeline)
snowmix gives the following error message:
Frame xxx - audio sink 1 would block"

This behaviour was reported to Snowmix (you can find more details and logs
there):
https://sourceforge.net/p/snowmix/discussion/Snowmix_Support_Forum/thread/ccee999022/

Checking the logs from gst-launch, I've seen the following.

If at the beginning I get a line with a high dts (not always exactly the
same high value),
after some seconds (usually less than a minute) I will get a would block
error on Snowmix:


/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (3496 bytes, dts: none, pts: none, duration: none,
offset: 387980, offset_end: -1, flags: 00000000 , meta: none) 0x7fd69c02bb40
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (4096 bytes, dts: none, pts: none, duration: none,
offset: 391476, offset_end: -1, flags: 00000000 , meta: none) 0x7fd69c02bc60
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (3616 bytes, dts: none, pts: none, duration: none,
offset: 395572, offset_end: -1, flags: 00000000 , meta: none) 0x7fd69c02bd80
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (4096 bytes, dts: 9:30:20.594089255, pts:
9:30:20.594089255, duration: none, offset: 399188, offset_end: -1, flags:
00000000 , meta: none) 0x7fd69c02bea0
0:00:03.744090862 [332m13087 [00m      0x16f71e0 [36mINFO   [00m [00;01;34m
          GST_EVENT gstevent.c:820:gst_event_new_caps: [00m creating caps
event video/x-h264,
codec_data=(buffer)0142c00dffe1001d6742c00dd901419f9f016a0c020b4a000003000200000300651e28549001000468cb8cb2,
stream-format=(string)avc, alignment=(string)au, level=(string)1.3,
profile=(string)baseline, width=(int)320, height=(int)180,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1,
interlace-mode=(string)progressive, colorimetry=(string)bt601,
chroma-site=(string)jpeg


However, if dts values start at zero, I will not get a would block error on
Snowmix:

/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (3552 bytes, dts: none, pts: none, duration: none,
offset: 372480, offset_end: -1, flags: 00000000 , meta: none) 0x7f990c01f6c0
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (4096 bytes, dts: none, pts: none, duration: none,
offset: 376032, offset_end: -1, flags: 00000000 , meta: none) 0x7f990c01f7e0
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (3764 bytes, dts: none, pts: none, duration: none,
offset: 380128, offset_end: -1, flags: 00000000 , meta: none) 0x7f990c01f900
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (4096 bytes, dts: 0:00:00.023109823, pts:
0:00:00.023109823, duration: none, offset: 383892, offset_end: -1, flags:
00000000 , meta: none) 0x7f990c01fa20
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (3416 bytes, dts: 0:00:00.023165513, pts:
0:00:00.023165513, duration: none, offset: 387988, offset_end: -1, flags:
00000000 , meta: none) 0x7f990c01fb40
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (4096 bytes, dts: 0:00:00.063396237, pts:
0:00:00.063396237, duration: none, offset: 391404, offset_end: -1, flags:
00000000 , meta: none) 0x7f990c01fc60
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (3596 bytes, dts: 0:00:00.063551013, pts:
0:00:00.063551013, duration: none, offset: 395500, offset_end: -1, flags:
00000000 , meta: none) 0x7f990c01fd80
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (4096 bytes, dts: 0:00:00.105300171, pts:
0:00:00.105300171, duration: none, offset: 399096, offset_end: -1, flags:
00000000 , meta: none) 0x7f990c03f480
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain
******* (identity0:sink) (3764 bytes, dts: 0:00:00.105402911, pts:
0:00:00.105402911, duration: none, offset: 403192, offset_end: -1, flags:
00000000 , meta: none) 0x7f990c03f360


What could be causing these wrong (9:30:20.594089255) dts values?

Francesc


-- 
Francesc Pinyol Margalef
http://www.francescpinyol.cat/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200512/26949c5c/attachment.htm>


More information about the gstreamer-devel mailing list