This is a plugin for GStreamer 1.0 [1] which can be attached as a sink element to a pipeline in order to send the stream to a Pixelflut [2] server.
(CC) by Andreas Frisch [email protected]
This plugin isn't in any way optimized for high performance pixelfluting. It's meant for educational purpose in a GStreamer plugin programming workshop [3].
- You need to have
gstreamer-1.0
and plugins (and on some distros the corresponding-dev
packages) plusgio-2.0
installed. - after
git clone $repo
cd gst-pixelflut
autoreconf --force --install
./configure
make
in order to run gstreamer with the newly built plugin, you need to install it or run export GST_PLUGIN_PATH=$PWD
while in the $workdir
test with gst-inspect-1.0 pixelflutsink
gst-launch-1.0 videotestsrc ! videoconvert ! pixelflutsink host=10.42.23.69
This will flut the given pixelflut server with test a test video (320x240).
gst-launch-1.0 uridecodebin uri=file:///home/user/testimage.jpg ! imagefreeze ! videoscale ! videoconvert ! video/x-raw, width=120, height=80 ! pixelflutsink host=127.0.0.1 -v
uridecodebin
will read and decode a given uri or file (in this case an image file).imagefreeze
turns a singlevideo/x-raw
buffer (image) into a continuous video streamvideoscale
can change the dimensions of the framesvideoconvert
is needed to change the video format (colorspace), in this case from I420 to RGB as the pixelflutsink requires itvideo/x-raw...
is acapsfilter
element with specifiedcaps
for setting a specific size
Remarks: the host
property defaults to localhost, however this may not resolve correctly for IPv6, hence the explicit IPv4 localhost IP, usually you would have an external pixelflut server anyways.
Factory Details:
Rank none (0)
Long-name Pixelflut Sink
Klass Sink/Video/Network
Description Sends raw video frames to a Pixelflut server
Author Andreas Frisch <[email protected]>
Plugin Details:
Name pixelflut
Description Pixelflut plugins
Filename /home/fraxinas/projects/gst-pixelflut/src/.libs/libgstpixelflut.so
Version 0.1
License GPL
Source module gst-pixelflut
Binary package GST_PACKAGE_NAME
Origin URL http://github.com/fraxinas/pixelflut
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBaseSink
+----GstVideoSink
+----GstPixelflutSink
Pad Templates:
SINK template: 'sink'
Availability: Always
Capabilities:
video/x-raw
format: { (string)ARGB, (string)BGRA, (string)ABGR, (string)RGBA, (string)xRGB, (string)RGBx, (string)xBGR, (string)BGRx, (string)RGB, (string)BGR }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
Pads:
SINK: 'sink'
Pad Template: 'sink'
Element Properties:
...GstVideoSink base properties omitted...
host : The host/IP to send the packets to
flags: readable, writable
String. Default: "localhost"
port : The port to send the packets to
flags: readable, writable
Integer. Range: 0 - 65535 Default: 1337
offset-top : Offset in pixel from the top of canvas
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer. Range: -2147483648 - 2147483647 Default: 0
offset-left : Offset in pixel from left side of the canvas
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer. Range: -2147483648 - 2147483647 Default: 0
frames-sent : Number of frames sent
flags: readable
Integer. Range: -2147483648 - 2147483647 Default: 0
bytes-written : Number of bytes written
flags: readable
Integer. Range: -2147483648 - 2147483647 Default: 0
ppp : How many pixels to transmit at once
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Unsigned Integer. Range: 0 - 1000 Default: 10
canvas-width : Width of Pixelflut server's canvas in pixels
flags: readable
Unsigned Integer. Range: 0 - 9999 Default: 0
canvas-height : Height of Pixelflut server's canvas in pixels
flags: readable
Unsigned Integer. Range: 0 - 9999 Default: 0
There's a little test application that will output a moving 320x240 videotestsrc
to a pixelflut server on 127.0.0.1:1337 by default. It can also stream from images or videos.
./gstpixelflutsinktest --uri https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov -i 1000 -x 480
Usage:
gstpixelflutsinktest [OPTION?] - Gstreamer Pixelflutsink test application
Help Options:
-?, --help Show help options
--help-all Show all help options
--help-gst Show GStreamer Options
Application Options:
-u, --uri Source URI
-h, --host Pixelflut server host
-p, --port Pixelflut server port
-i, --interval Interval between offset moves in ms
-x, --width Painting width of input in px
-y, --height Paiting height of input in px
- [1] Gstreamer: https://gstreamer.freedesktop.org/
- [2] Pixelflut Server: https://github.com/defnull/pixelflut
- [3] Workshop: https://pads.schaffenburg.org/GstreamerWorkshop