Side-by-side video in gst-launcher
This little snippit takes video from two V4L2 sources (like webcams), and displays them side by side. The script in question is setup for 320x240 MJPEG, tweak the numbers and you get different resolution from your video sources.
One important parameter if you’re adding more sources is border-alpha. This needs to be set to 0, so that the black border that is added around a video source is transparent so you can push it on top of another video frame.
This is handy if you have two webcams, you can use this to setup side-by-side stereo display to 3D glasses. Just make sure to point your cameras at the right angle, otherwise your convergence will be all messed up.
You need the gstreamer-tools package in order to use the script.
#!/bin/sh
gst-launch \
v4l2src device=/dev/video1 ! "image/jpeg,width=320,height=240" ! jpegdec ! "video/x-raw-yuv" ! videobox right=-320 border-alpha=0 ! videomixer name=mix ! \
ffmpegcolorspace ! xvimagesink \
v4l2src device=/dev/video2 ! "image/jpeg,width=320,height=240" ! jpegdec ! "video/x-raw-yuv" ! videobox left=-320 ! mix.
QCQREncoder, QCGPS, Openbravo hacks
So, I’ve been busy a bit lately.
I’ve written a QR Encoder patch for Quartz Composer based on libqrencode. You give it a string, and then it’ll encode it into an image.
![[qr encoder patch]](static/resc/qrpatch.png)
[qr encoder patch]
There’s another patch in my github which provides a client to GPSdX. It’s a bit buggy still, and only works with GPSd running on localhost with the older encoding method. Unfortunately libgps is ridiculously annoying to work with, so I took the easy (incompatible) way out.
I’ve also patches for Openbravo POS. They make the “customer” price for an item be the buy price, allowing you to implement a simple discount for registered customers that isn’t based on a percentage. It also includes Australian currency images and some minor UI modification to waste less screen space.
I’m currently working on cleaning portal2 up for release. Which is fun. Most of the legacy authentication hooks have been removed, and it’s getting closer to running standalone in a nice way. As part of this I’m getting rid of lots of ugly and legacy code that was for Django 0.96.