I managed to make it works thanks to kirill but i'm having issues with the Height and width of the stream
I use these 2 commands:
Server: gst-launch-0.10 v4l2src device=/dev/video0 ! 'video/x-raw-yuv,framerate=(fraction)30/1' ! ffmpegcolorspace ! vpuenc codec=6 ! rtph264pay ! udpsink host=192.168.20.26 port=5000
Client: gst-launch udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, payload=(int)96, encoding-name=(string)H264" ! rtph264depay ! ffdec_h264 ! xvimagesink
The problem is, when i try to set the height and width of the stream, the pipeline won't create. I use this command for the server:
gst-launch-0.10 v4l2src device=/dev/video0 ! 'video/x-raw-yuv,height=720,width=1280,framerate=(fraction)30/1' ! ffmpegcolorspace ! vpuenc codec=6 ! rtph264pay ! udpsink host=192.168.20.26 port=5000$
(just added height=720,width=1280)
and the client console returns me:
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
Why can't i choose the height and width of the stream?