udp transmission

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

udp transmission

张若
Hi all,

I have a c program to read and send the raw image/video by udp.
The packet size (buffer) is restrained by datagrams protocol as smaller than 2^16
So one frame will be packed separately and transmitted.

The receiver side, I am using gstreamer (udpsrc). 
GST_DEBUG=3 gst-launch-1.0 udpsrc port=8888 buffer-size=XXXXXXXXX ! "video/x-raw,format=I420,width=XXXX,height=XXXX,framerate=1/1" ! videoconvert ! ximagesink sync=false

But it shows:

invalid video buffer received

invalid buffer size: xxxxx<xxxxxxx (received buffer size < the picture size I specified in caps)

How to notify the udpsrc to wait and buffer all packets for one frame and then display?

Thanks in advanced! 

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: udp transmission

Arjen Veenhuizen
You need to set the blocksize on the udpsrc element or (preferred) add a videoparse element before the videoconvert element:

GST_DEBUG=3 gst-launch-1.0 udpsrc port=8888 buffer-size=XXXXXXXXX ! videoparse format=X width=Y height=Z framerate=F ! queue ! videoconvert ! ximagesink sync=false
Reply | Threaded
Open this post in threaded view
|

Re: udp transmission

张若
Thanks anyway, 
But when I am using blocksize, it makes no difference.
And after adding videoparse, the display looks strange and it becomes to not depend on the resolution I set.

2017-03-10 13:22 GMT+01:00 Arjen Veenhuizen <[hidden email]>:
You need to set the blocksize on the udpsrc element or (preferred) add a
videoparse element before the videoconvert element:





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/udp-transmission-tp4682155p4682157.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: udp transmission

Baby Octopus
Administrator
You cannot send raw video over UDP without any packetization. See if you can add rtpvrawpay & rtpvrawdepay, or gdppay & gdpdepay
Reply | Threaded
Open this post in threaded view
|

Re: udp transmission

Nicolas Dufresne-5
In reply to this post by 张若
Le vendredi 10 mars 2017 à 13:53 +0100, 张若 a écrit :
> Thanks anyway, 
> But when I am using blocksize, it makes no difference.
> And after adding videoparse, the display looks strange and it becomes
> to not depend on the resolution I set.

It's better to use a payload format in general with UDP. You have some
RTP option, which gives you access to rtpjitterbuffer on the reception
(see rtpvrawpay/depay and/or rtpgstpay/depay), or you can try
gdppay/depay.

>
> 2017-03-10 13:22 GMT+01:00 Arjen Veenhuizen <[hidden email]>
> :
> > You need to set the blocksize on the udpsrc element or (preferred)
> > add a
> > videoparse element before the videoconvert element:
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://gstreamer-devel.966125.n4.nabb
> > le.com/udp-transmission-tp4682155p4682157.html
> > Sent from the GStreamer-devel mailing list archive at Nabble.com.
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment