Putting together a complex gstreamer command line...

Nicolas Dufresne nicolas.dufresne at gmail.com
Sun Apr 3 14:07:01 UTC 2016


As a first step, you should replace videomixer with compositor. The
compositor element have the same interface but works with live sources
correctly, and implement color conversion internally. Note that this is
all done in software and will quickly max out the CPU capacity.

As you want to apply GL shaders, best is to upload everything to GL in
the first place. This can be done using glupload and glcolorconvert
elements. The equivalent in GL to compositor is glvideomixer. You
should use fairly recent version of GStreamer (something Raspbian might
not offer). Not everything is supported in term of GL feature on this
platform.

Another point I'd like to bring, is that the v4l2 driver on RPI has
never been fantastic. I don't know if anyone have worked on it since,
but some people get better resulting using rpicamsrc, https://github.co
m/thaytan/gst-rpicamsrc

Nicolas

Le dimanche 03 avril 2016 à 05:30 -0700, nicko a écrit :
> For the sake of completeness, here is the question - I would really
> appreciate help on this as I'm completely stuck:
> 
> I have a Raspberry Pi Compute Module with 2 cameras. I'm trying to
> use
> gstreamer with v4l2src selecting /dev/video0 & /dev/video1 to
> continually
> run at about 20FPS and use videomixer to combine the images side-by-
> side
> then output H.264 over RTP to a UDP port (read by another host).
> Somewhere
> in the comand line, I'm going to need to include glshader to apply
> some
> distortion to each image before the merge...
> 
> The default (current) RPi v4l2src driver does not support two
> cameras, but
> as of today a beta is available that does, however it requires the
> beta
> 4.4.6 kernel.
> 
> The problem I'm having is in getting the mixer connected.
> 
> #!/bin/bash -x
> #
> # Script to start RPi Compute Module streaming over RTP (RFC3984)
> # from both cameras
> #
> FPS=20                          # Frames per second
> WIDTH=640                       # Image width
> HEIGHT=480                      # Image height
> UPLINK_HOST=192.168.1.73        # Receiving host
> PORT=5200                       # UDP port
> #
> # TESTING WITH ONE CAMERA ONLY FOR THE MOMENT
> #
> function start_streaming
> {
>   gst-launch-1.0 -ve videomixer name=mixer  \
>   ! x264enc \
>   ! h264parse \
>   ! rtph264pay config-interval=10 pt=96 \
>   ! udpsink host=$UPLINK_HOST port=$PORT \
>   v4l2src device=/dev/video0 \
>   ! video/x-
> raw,format=AYUV,width=$WIDTH,height=$HEIGHT,framerate=$FPS/1 \
>   ! mixer.
> }
> 
> # Start streaming on both cameras simultaneously
> echo Image size: $WIDTH x $HEIGHT
> echo Frame rate: $FPS
> echo Starting cameras 0 and 1 streaming to $UPLINK_HOST:$PORT
> start_streaming
> 
> # Wait until everything has finished
> wait
> 
> exit 0
> # end
> 
> What I'm getting is the rather useless (to me) message:
> 
> WARNING: erroneous pipeline: could not link v4l2src0 to mixer
> 
> I've fiddled about rather a lot and got nowhere - it's probably
> something
> trivial, but be blowed if I can see it !
> 
> Many thanks
> 
> Nick
> 
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble
> .com/Putting-together-a-complex-gstreamer-command-line-
> tp4676713p4676714.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160403/05e0ccbb/attachment.sig>


More information about the gstreamer-devel mailing list