Timestamp issues with video and RTP RE: [gst-devel] alsasink ! alsasrc fixed and timestamp issues

Rios, Ariel ariel at ti.com
Tue Oct 18 14:53:48 CEST 2005


I have noticed a  problem that might be related to the timestamp problem
using some xvimagesink, ximagesink and aasink.

 I was trying to use rtpbin to send/recv through the network mpeg4 and
h263 streams.

First of all I checked that the payloaders on the simplest case were
working correctly:
gst-launch videotestsrc ! video/x-raw-yuv,width=176,height=144 !
ffenc_mpeg4 ! rtpmp4venc ! rtpmp4vdec ! ffdec_mpeg4 ! xvimagesink
gst-launch videotestsrc !
video/x-raw-yuv,format=\(fourcc\)I420,width=176,height=144 ! ffenc_h263
! rtph263penc ! rtph263pdec ! xvimagesink

 Then i tryed rtpbin with mpeg4/h263 using an app (the pipeline is
something like videotestsrc !  ffenc_mpeg4 ! rtpmp4venc ! rtpbin 
and on the other end rtpbin ! rtpmp4vdec ! ffdec_mpeg4 ! xvimagesink)

On mpeg4 when the data is pushed unto ffenc I got.
gst-launch videotestsrc !
video/x-raw-yuv,format=\(fourcc\)I420,width=176,height=144 ! ffenc_h263
! rtph263penc ! rtph263pdec ! xvimagesink
LOG   (0x1061c8 - 0:00:14.652881000)          ffmpeg(  266)
gstffmpegdec.c(410):gst_ffmpegdec_open: Opened ffmpeg codec mpeg4
DEBUG (0x1061c8 - 0:00:14.659082000)          ffmpeg(  266)
gstffmpegdec.c(998):gst_ffmpegdec_chain:<decoder> Received new data of
size 1091, time 2:26:40.729300000
ERROR (0x1061c8 - 0:00:14.670593000)          ffmpeg(  266) (0):: hmm,
seems the headers are not complete, trying to guess time_increment_bits 
ERROR (0x1061c8 - 0:00:14.676181000)          ffmpeg(  266) (0):: my
guess is 2 bits ;)
Floating point exception
In this case the problem might be no on the timestamps but rather on the
payloader/depayloader although Im not sure.

When I tryed with h263 I was able to display some frames but after those
first frames the application is blocked: I get the following debug
message:
DEBUG (0x813f358 - 0:00:01.859139000)         rtprecv( 7624)
gstrtprecv.c(221):gst_rtprecv_rtpsink_chain: Got RTP packet from jrtplib
size 1016 seqnum 17944 tsdiff 3000
DEBUG (0x813f358 - 0:00:01.867517000)        basesink( 7624)
gstbasesink.c(453):gst_base_sink_handle_object:<xvimagesink> push
0x8209180 on preroll_queue
DEBUG (0x813f358 - 0:00:01.867613000)        basesink(
7624)gstbasesink.c(553):gst_base_sink_handle_object:<xvimagesink> got
times start: 7:42:41.467066667, end: 7:42:41.500433333
DEBUG (0x813f358 - 0:00:01.867673000)        basesink( 7624)
gstbasesink.c(585):gst_base_sink_handle_object:<xvimagesink> now 1
preroll, 1 buffers, 1 events on queue
DEBUG (0x813f358 - 0:00:01.867729000)        basesink( 7624)
gstbasesink.c(380):gst_base_sink_preroll_queue_empty:<xvimagesink>emptyi
ng queue
DEBUG (0x813f358 - 0:00:01.867783000)        basesink( 7624)
gstbasesink.c(407):gst_base_sink_preroll_queue_empty:<xvimagesink>
popped event 0x813ff58
DEBUG (0x813f358 - 0:00:01.867835000)        basesink( 7624)
gstbasesink.c(1066):gst_base_sink_handle_event:<xvimagesink> event unref
0x8134530 0x813ff58
DEBUG (0x813f358 - 0:00:01.867920000)        basesink( 7624)
gstbasesink.c(404):gst_base_sink_preroll_queue_empty:<xvimagesink>
popped buffer 0x8209180
DEBUG (0x813f358 - 0:00:01.867999000)        basesink( 7624)
gstbasesink.c(940):gst_base_sink_do_sync:<xvimagesink> got times start:
7:42:41.467066667, end: 7:42:41.500433333
LOG   (0x813f358 - 0:00:01.868059000)        basesink( 7624)
gstbasesink.c(988):gst_base_sink_do_sync:<xvimagesink> waiting for
clock, base time 313796:27:40.895615000

Then instead of using xvimagesink Y tryed with ximagesink and aasink and
I got similar problem. Finally I decied to use a fakesink followed by a
filesink. The file produced was a nice yuv file. 

So then I tryed to reduce check that the problem is not coming from the
rtpbin so I tried directly using udpsrc and udpsink.

Using only udp with mpeg4 we get the same floating point exception as
with using rtpbin:
 gst-launch videotestsrc ! video/x-raw-yuv,width=176,height=144 !
ffenc_mpeg4 ! rtpmp4venc ! udpsink host=127.0.0.1 port=5000 sync=false
 gst-launch udpsrc port=5000 ! rtpmp4vdec ! ffdec_mpeg4 ! xvimagesink

Using only udp src and sink with h263 we get the same behaviour than by
using rtpbin:
gst-launch videotestsrc !
video/x-raw-yuv,format=\(fourcc\)I420,width=176,height=144 ! ffenc_h263
! rtph263penc ! udpsink host=127.0.0.1 port=5000 sync=false
gst-launch udpsrc port=5000 ! rtph263pdec ! ffdec_h263 ! xvimagesink

Now, I am going to try to put Edgard's patch on basesink instead of
baseaudiosink. Any other thoughts? Is this the best way to solve this
issue?
Is reporting a bug a  good idea?

ariel




More information about the gstreamer-devel mailing list