Problem with videorate

Frédéric Sallé salle.frederic at gmail.com
Tue Dec 3 00:26:23 PST 2013


Hello all,

I have a source that produces png images every 500ms and that send them 
over UDP:
The command below works as expected (ie the images are properly displayed):
gst-launch-1.0 udpsrc port=2000 ! pngdec ! videoconvert ! autovideosink

If I try to convert that stream to mpeg4,  with the following command:
gst-launch-1.0 udpsrc port=2000 ! pngdec ! videoconvert ! avenc_mpeg4 ! 
udpsink port=5000

I see (with tcpdump), the input well synchronized with the output. I 
believe that is quite normal.
08:51:20.449920 IP 127.0.0.1.35067 > 127.0.1.1.2000: UDP, length 2300
08:51:20.461437 IP 127.0.0.1.58626 > 127.0.0.1.5000: UDP, length 2469
08:51:20.951041 IP 127.0.0.1.35067 > 127.0.1.1.2000: UDP, length 2301
08:51:20.972970 IP 127.0.0.1.58626 > 127.0.0.1.5000: UDP, length 1257
08:51:21.446550 IP 127.0.0.1.35067 > 127.0.1.1.2000: UDP, length 2276
08:51:21.456678 IP 127.0.0.1.58626 > 127.0.0.1.5000: UDP, length 2367
08:51:21.949871 IP 127.0.0.1.35067 > 127.0.1.1.2000: UDP, length 2287

*But I would like to get a 'regular' mpeg4 stream with a 'normal' 
framerate...*

So I did:
gst-launch-1.0 udpsrc port=2000 ! pngdec ! videorate ! 
"video/x-raw,framerate=20/1" ! videoconvert ! avenc_mpeg4 ! udpsink 
port=5000
or udpsrc port=2000 caps="image/png" ! "image/png,framerate=20/1" ! 
pngdec ! videoconvert ! avenc_mpeg4 ! udpsink port=5000

I get the following output:
08:54:*23.952456* IP 127.0.0.1.35067 > 127.0.1.1.2000: UDP, length 2325
08:54:23.965143 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 2510
08:54:23.970426 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 163
08:54:23.975527 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:23.981002 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:23.986213 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:23.991431 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:23.996653 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.001854 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.006957 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 158
08:54:*24.012349* IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:*24.445583* IP 127.0.0.1.35067 > 127.0.1.1.2000: UDP, length 2291
08:54:24.457157 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 1256
08:54:24.462379 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 166
08:54:24.467513 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.474115 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 8153
08:54:24.479420 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 163
08:54:24.484658 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.489814 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.494858 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.500003 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.505536 IP 127.0.0.1.44380 > 127.0.0.1.5000: UDP, length 157
08:54:24.957844 IP 127.0.0.1.35067 > 127.0.1.1.2000: UDP, length 2311

On average it's ok, I have 20 images per seconds ...
*HOWEVER, you can see  there is a burst of 10 images in ~50ms after each 
input then nothing for**~450ms**
*
It was clearly not the expected behavior for videorate...
Is there a way to make it smooth or it is a bug ??

(I do not mention that the command above freeze my computer (it happens 
3 times already) after a while as I didn't try to reproduce that issue 
for now).

Thank you,
Frédéric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131203/1b47fa0e/attachment.html>


More information about the gstreamer-devel mailing list