inject a static image in videomixer

Cédric BRINER briner at infomaniak.ch
Thu Oct 2 16:02:59 PDT 2014


Hello,

I'm having a hard time trying to inject a static image (png or jpq) 
picture in this pipe. As you can see, I've declared sink_2 that I suppress.

Since this suppression, the video generated is fluid. the videomixer is 
forking a lot, and in the "top" command the process the much consuming 
is at 5%.

the pipe...
---------------------------------------------------
GRABBER_DEVICE=/dev/video1
WEBCAM_DEVICE=/dev/video0
LOGO_PATH=/home/briner/test.png
DST=/home/briner/test.mp4

DEFAULT_CAPS="format=(string)YUY2, framerate=(fraction)30/1"



gst-launch-1.0 -e videomixer name=mix \
                   sink_0::xpos=0   sink_0::ypos=0   sink_0::zorder=2 \
                   sink_1::xpos=320 sink_1::ypos=0   sink_1::zorder=1 \
                   sink_2::xpos=0  sink_2::ypos=240 sink_2::zorder=0 \
     ! videoconvert \
     ! "video/x-raw, framerate=(fraction)30/1" \
     ! x264enc speed-preset=fast \
     ! mux. \
     v4l2src device=${WEBCAM_DEVICE} \
         ! videoconvert \
         ! "video/x-raw, width=(int)320, height=(int)240, ${DEFAULT_CAPS}" \
         ! mix.sink_0 \
     v4l2src device=${GRABBER_DEVICE} \
         ! videoconvert \
         ! "video/x-raw, width=(int)1024, height=(int)768, 
${DEFAULT_CAPS}" \
         ! mix.sink_1 \
     pulsesrc \
         ! audioconvert \
         ! audio/x-raw, rate=44100, channels=2 \
         ! voaacenc \
         ! queue \
         ! mp4mux name=mux \
     mux. ! filesink location="${DST}"
---------------------------------------------------

Now, I tried many different options (jpeg/png, 
multisource/uridecode/uri) to integrate an image on sink_2 of 
videomixer... without success.

The video get choppy. In that case, I got on of the videomixer getting 
very high, 97% of cpu.

Can someone tell me the way of doing this ?


Regards.

Cédric BRINER


More information about the gstreamer-devel mailing list