Linux video performance with YUV stream

hello everyone.

Hope some of you could help me a the problem i am facing.

i’m using openframeworks in lpmt and noticed i have some perfomance issue with live video.

the installation consists of a raspberry pi streaming two webcams via mjpeg_streamer to my laptop, and i am using a gstreamer pipeline to redirect the stream to lpmt via v4l2loopback.

the stream part is quite fine and i can get the v4l2loopback output to my laptop almost without latency in guvcview.
But when in lpmt, there is much more latency.

i have noticed that the v4l2loopback output is yuv, and in of v08_3, the ofvideograbber seems to force the gstreamer pipeline to rgb. i tried modifing the source of core to get yuv caps, but it’s a bit hard for me.

i also noticed this thread, where arturoc gives a link to a 0.9 of where yuv caps are beeing added in ofgstutils :video perfomance linux

i managed to clone the github repository, compile OF and then recompile lpmt, but i get an error when including ofxTimeline addons src/testApp.h|25|fatal error: ofxTimeline.h: No such file or directory|

(but the file is in the addons dir…)

the same code compiles fine in OF 0.8.3, i don’t understand why this error appears. is this a OF 0.9 bug to link addons ? i didn’t change the codeblocks project or the code…

by the way with the code from git, i can’t compile the PG since there is no files in openframeworks/apps/projectGenerator/projectGeneratorSimple

i also tried to download OF 0.8.4 to see if the caps commit was in there but it isn’t.

is there a solution to get that commit or to get the updated OF github source to work?

thanks in advance for your answer, and thanks everyone for the work put in OF.

i managed to compile ProjectGenerator, and to make a new project while including ofxTimeline addons.

Strangely, ofxTimeline addon is in the addons.make file, but when compiling it seems that it is not linked and the build log in codeblocks isn’t calling this addon but calls the other well, i really don’t get why…

-------------- Build: Debug in lpmtX (compiler: GNU GCC Compiler)---------------

Running command: make -f Makefile Debug
HOST_OS=Linux
HOST_ARCH=x86_64
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk±3.0 libmpg123
Compiling OF library for Debug
make -C …/…/…/libs/openFrameworksCompiled/project/ Debug PLATFORM_OS=Linux ABIS_TO_COMPILE_DEBUG=""
HOST_OS=Linux
HOST_ARCH=x86_64
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk±3.0 libmpg123
make1: Entering directory /home/acryl/mapping/dev/openFrameworks/openframeworks/libs/openFrameworksCompiled/project' HOST_OS=Linux HOST_ARCH=x86_64 checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 make[2]:DebugABI’ is up to date.
HOST_OS=Linux
HOST_ARCH=x86_64
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk±3.0 libmpg123
Done!
make1: Leaving directory /home/acryl/mapping/dev/openFrameworks/openframeworks/libs/openFrameworksCompiled/project' Compiling lpmt for Debug HOST_OS=Linux HOST_ARCH=x86_64 checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 make[1]: Entering directory/home/acryl/mapping/dev/openFrameworks/openframeworks/apps/devApps/lpmt’
Compiling src/appUtils.cpp
g++ -c -g3 -Wall -std=c++0x -march=native -mtune=native -DOF_USING_GTK -DOF_USING_GTK -DOF_USING_MPG123 -I./src -I…/…/…/addons/ofxSimpleGuiToo/src -I…/…/…/addons/ofxSimpleGuiToo/src/Controls -I…/…/…/addons/ofxOsc/src -I…/…/…/addons/ofxOsc/libs -I…/…/…/addons/ofxOsc/libs/oscpack -I…/…/…/addons/ofxOsc/libs/oscpack/src -I…/…/…/addons/ofxOsc/libs/oscpack/src/osc -I…/…/…/addons/ofxOsc/libs/oscpack/src/ip -I…/…/…/addons/ofxOsc/libs/oscpack/src/ip/posix -I…/…/…/addons/ofxOsc/libs/oscpack/src/ip/win32 -I…/…/…/addons/ofxKinect/src -I…/…/…/addons/ofxKinect/src/extra -I…/…/…/addons/ofxKinect/libs -I…/…/…/addons/ofxKinect/libs/libfreenect -I…/…/…/addons/ofxKinect/libs/libfreenect/src -I…/…/…/addons/ofxKinect/libs/libfreenect/include -I…/…/…/addons/ofxKinect/libs/libfreenect/platform -I…/…/…/addons/ofxKinect/libs/libusb-1.0 -I…/…/…/addons/ofxKinect/libs/libusb-win32 -I…/…/…/addons/ofxKinect/libs/libfreenect/include -I…/…/…/addons/ofxOpenCv/src -I…/…/…/addons/ofxOpenCv/libs -I…/…/…/addons/ofxTween/src -I…/…/…/addons/ofxTween/src/Easings -I…/…/…/addons/ofxRange/src -I…/…/…/addons/ofxMSATimer/src -I…/…/…/addons/ofxTimecode/src -I…/…/…/addons/ofxTextInputField/src -I…/…/…/addons/ofxMidi/src -I…/…/…/addons/ofxMidi/src/desktop -I…/…/…/addons/ofxMidi/src/ios -I…/…/…/addons/ofxMidi/libs -I…/…/…/addons/ofxMidi/libs/rtmidi -I…/…/…/addons/ofxMidi/libs/pgmidi -I…/…/…/addons/ofxAssimpModelLoader/src -I…/…/…/addons/ofxAssimpModelLoader/libs -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/include -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/include/Compiler -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/vs -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/osx -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/ios -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/win_cb -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/linux64 -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/linux -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/emscripten -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/android -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/lib/android/armeabi-v7a -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/include -I…/…/…/addons/ofxAssimpModelLoader/libs/assimp/include/Compiler -I…/…/…/addons/ofx3DModelLoader/src -I…/…/…/addons/ofx3DModelLoader/src/3DS -I…/…/…/addons/ofxMostPixelsEver/src -I…/…/…/addons/ofxXmlSettings/src -I…/…/…/addons/ofxXmlSettings/libs -I…/…/…/addons/ofxFenster/src -I…/…/…/addons/ofxNetwork/src -I…/…/…/addons/ofxMSAInteractiveObject/src -pthread -D_REENTRANT -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gstreamer-1.0 -I/usr/include/alsa -I/usr/include/libdrm -I/usr/include/GL -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/libusb-1.0 -I/usr/include/opencv -I…/…/…/libs/cairo/include -I…/…/…/libs/cairo/include/cairo -I…/…/…/libs/cairo/include/libpng15 -I…/…/…/libs/cairo/include/pixman-1 -I…/…/…/libs/fmodex/include -I…/…/…/libs/glfw/include -I…/…/…/libs/glfw/include/GLFW -I…/…/…/libs/kiss/include -I…/…/…/libs/openssl/include -I…/…/…/libs/openssl/include/openssl -I…/…/…/libs/poco/include -I…/…/…/libs/rtAudio/include -I…/…/…/libs/tess2/include -I…/…/…/libs/openFrameworks -I…/…/…/libs/openFrameworks/graphics -I…/…/…/libs/openFrameworks/events -I…/…/…/libs/openFrameworks/types -I…/…/…/libs/openFrameworks/3d -I…/…/…/libs/openFrameworks/video -I…/…/…/libs/openFrameworks/communication -I…/…/…/libs/openFrameworks/app -I…/…/…/libs/openFrameworks/sound -I…/…/…/libs/openFrameworks/gl -I…/…/…/libs/openFrameworks/math -I…/…/…/libs/openFrameworks/utils -pthread -D_REENTRANT -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gstreamer-1.0 -I/usr/include/alsa -I/usr/include/libdrm -I/usr/include/GL -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/libusb-1.0 -I/usr/include/opencv -MMD -MP -MF obj/linux64/Debug/src/appUtils.d -MT obj/linux64/Debug/src/appUtils.o -o obj/linux64/Debug/src/appUtils.o -c src/appUtils.cpp
In file included from src/appUtils.cpp:1:0:
src/testApp.h:25:25: fatal error: ofxTimeline.h: No such file or directory
#include “ofxTimeline.h”
^
compilation terminated.
make1: *** [obj/linux64/Debug/src/appUtils.o] Error 1
make: *** [Debug] Error 2
make1: Leaving directory `/home/acryl/mapping/dev/openFrameworks/openframeworks/apps/devApps/lpmt’
Process terminated with status 2 (0 minute(s), 12 second(s))
1 error(s), 0 warning(s) (0 minute(s), 12 second(s))

my addons.make file
ofxSimpleGuiToo
ofxOsc
ofxKinect
ofxOpenCv
ofxTween
ofxTimeline
ofxRange
ofxMSATimer
ofxTimecode
ofxTextInputField
ofxMidi
ofxAssimpModelLoader
ofx3DModelLoader

anyone have an idea why ofxTimeline is not linked?

edit i found the answer, theres a fix of the addon_config.mk file in ofxTimeline repo here: ofxTimeline the commit as not been merged to YCAM repo yet.

what i don’t really understand, is that the same cloned addon compile in OF0.8.3…
anyway things compile, going to test if no colorspace conversion gives less latency when drawing the stream

unfortunately things compile, but i m still facing issues

i am not sure if it’s because going through v4l2loopback, but pixel format seem to negociate wrong format.

my gsttreamer loop back pipeline is like
gst-launch-1.0 souphttpsrc location=http://pi:8080/?action=stream ! jpegdec ! videoconvert ! video/x-raw,format=YUY2 ! v4l2sink device=/dev/video1 &

i turned the log to verbose and set desired pixelformat to yuy2 in the OFvidgrabbers but ofvideograbber seem to always take the last detected format in the list as the source sink
[verbose] Device: Dummy video device (0x0000) (/dev/video1)

[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YUY21024x768 videoformat: 4 framerates:
[verbose] 30/1

[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw I4201024x768 videoformat: 2 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): higher framerate replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YV121024x768 videoformat: 3 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw BGR1024x768 videoformat: 16 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw RGB1024x768 videoformat: 15 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Dummy video device (0x0000)
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 1024x768 video/x-raw I420 framerate: 100/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video1 ! video/x-raw,format=I420,width=1024,height=768,framerate=100/1 ! videoscale method=2 ! appsink name=ofappsink caps=“video/x-raw, format=YUY2, width=1024, height=748”
[ error ] ofGstUtils: setPipelineWithSink(): couldn’t create pipeline: could not link videoscale0 to ofappsink

is this beacuse of the framerate which is higher in other formats, or it is the default behavior of OFvideoGrabber to take the last format ?

could this be fixed while fixing the framerate in the loopback pipeline?
or is this a bug and should i open an issue on github?

i made a little tweek in ofVideoGrabber.cpp to inhibate the selection of the format with higher framerate

`if (desired_framerate == -1){
// choose faster
if(new_framerate > curr_framerate) {
ofLogVerbose(“ofGstVideoGrabber”) << “add_video_format(): higher framerate not replacing existing format”;
**//**webcam_device.video_formats[i] = video_format;

with this mod the selected format don’t change anymore, and it works (but i have to force videoGrabber to OF_PIXEL_I420, OF_PIXEL_NATIVE does not work and produce a wrong pipeline)

here are the logs from lpmt starting with 2 v4l2loopbacks streaming

~/mapping/dev/lpmt$ bin/lpmt_debug
using config file config.xml
[verbose] ofxKinect: context inited
[warning] ofxKinect: no available devices found
[verbose] ofGstUtils: gstreamer inited
[notice ] ofGstVideoGrabber: Probing devices with udev…
[notice ] ofGstVideoGrabber: Found device 13d3:5711, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: USB 2.0 UVC VGA WebCam
[notice ] ofGstVideoGrabber: driver: uvcvideo, version: 199947
[notice ] ofGstVideoGrabber: Capabilities: 0x84000001
[notice ] ofGstVideoGrabber: Found device :, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: Dummy video device (0x0000)
[notice ] ofGstVideoGrabber: driver: v4l2 loopback, version: 2048
[notice ] ofGstVideoGrabber: Capabilities: 0x05000001
[notice ] ofGstVideoGrabber: Found device :, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: Dummy video device (0x0001)
[notice ] ofGstVideoGrabber: driver: v4l2 loopback, version: 2048
[notice ] ofGstVideoGrabber: Capabilities: 0x05000001
[notice ] ofGstVideoGrabber: Found device :, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: Dummy video device (0x0002)
[notice ] ofGstVideoGrabber: driver: v4l2 loopback, version: 2048
[notice ] ofGstVideoGrabber: Capabilities: 0x05000002
[notice ] device /dev/video3 seems to not have the capture capability, (radio tuner?)
[notice ] removing it from device list
[verbose] Device: Dummy video device (0x0000) (/dev/video1)

[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw I4201024x768 videoformat: 2 framerates:
[verbose] 30/1
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YV121024x768 videoformat: 3 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): higher framerate not replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw BGR1024x768 videoformat: 16 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): higher framerate not replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw RGB1024x768 videoformat: 15 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): higher framerate not replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Dummy video device (0x0000)
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 1024x768 video/x-raw I420 framerate: 30/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video1 ! video/x-raw,format=I420,width=1024,height=768,framerate=30/1 ! videoscale method=2 ! appsink name=ofappsink caps=“video/x-raw, format=I420, width=1024, height=748”
[verbose] ofGstUtils: startPipeline(): attaching callbacks
camera with id 1 asked for 1024 by 748 - actual size is 1024 by 748
[notice ] ofGstVideoGrabber: Probing devices with udev…
[notice ] ofGstVideoGrabber: Found device 13d3:5711, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: USB 2.0 UVC VGA WebCam
[notice ] ofGstVideoGrabber: driver: uvcvideo, version: 199947
[notice ] ofGstVideoGrabber: Capabilities: 0x84000001
[notice ] ofGstVideoGrabber: Found device :, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: Dummy video device (0x0000)
[notice ] ofGstVideoGrabber: driver: v4l2 loopback, version: 2048
[notice ] ofGstVideoGrabber: Capabilities: 0x05000001
[notice ] ofGstVideoGrabber: Found device :, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: Dummy video device (0x0001)
[notice ] ofGstVideoGrabber: driver: v4l2 loopback, version: 2048
[notice ] ofGstVideoGrabber: Capabilities: 0x05000001
[notice ] ofGstVideoGrabber: Found device :, getting capabilities…
[notice ] ofGstVideoGrabber: detected v4l2 device: Dummy video device (0x0002)
[notice ] ofGstVideoGrabber: driver: v4l2 loopback, version: 2048
[notice ] ofGstVideoGrabber: Capabilities: 0x05000002
[notice ] device /dev/video3 seems to not have the capture capability, (radio tuner?)
[notice ] removing it from device list
[verbose] Device: Dummy video device (0x0001) (/dev/video2)

[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw I4201024x768 videoformat: 2 framerates:
[verbose] 30/1
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw YV121024x768 videoformat: 3 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): higher framerate not replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw BGR1024x768 videoformat: 16 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): higher framerate not replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[verbose] ofGstVideoGrabber: add_video_format(): video/x-raw RGB1024x768 videoformat: 15 framerates:
[verbose] ofGstVideoGrabber: get_supported_framerates(): from 0/1 to 100/1
[verbose] ofGstVideoGrabber: add_video_format(): higher framerate not replacing existing format
[verbose] ofGstVideoGrabber: add_video_format(): already added, skipping
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Dummy video device (0x0001)
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 1024x768 video/x-raw I420 framerate: 30/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video2 ! video/x-raw,format=I420,width=1024,height=768,framerate=30/1 ! videoscale method=2 ! appsink name=ofappsink caps=“video/x-raw, format=I420, width=1024, height=748”
[verbose] ofGstUtils: startPipeline(): attaching callbacks
camera with id 2 asked for 1024 by 748 - actual size is 1024 by 748
listening for OSC messages on port: 12345

i can see a great differnces in cpu usage from using yuv format without rgb compression (hard to say but i think cpu usage is almost dived by two).

But there is still a little problem, the stream i’m getting in OF is black and white. It seems OF doesn’t care about the U and V planes.

Anyway, there is still quite a few problems to get yuv stream to OF through a v4l2loopback
-the detection of the format and framerate through a v4l2loopback is quite strange, the algorithm who choose which format is better by looking which one get the better framerate is causing issue if the framerate value is not correctly captures.
-i have to set pixel format to make the video grabber work, so if it’s supposed to detect the format, it seems it doesn’t work through a v4l2loopback
- the stream gets black and white, no color.

OF will only do the colorspace conversion in the graphics card if you use the programmable renderer. currently by doing:

ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);

in main, before calling ofSetupOpenGL

thanks @arturo, i will try that and report how it works here.

edit: i try to set the currentRenderer like @arturo said, but all iget is an empty window, and lots of opengl errors.

[ error ] ofShader: setupShaderFromSource(): GL_VERTEX_SHADER shader failed to compile
 [ error ] ofShader: GL_VERTEX_SHADER shader reports:
 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

  [ error ] ofShader: GL_VERTEX_SHADER, offending line 10 :




 [ error ] ofShader: setupShaderFromSource(): GL_FRAGMENT_SHADER shader failed to compile
[ error ] ofShader: GL_FRAGMENT_SHADER shader reports:
 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

[ error ] ofShader: GL_FRAGMENT_SHADER, offending line 10 :
    8    uniform sampler2D src_tex_unit0; uniform vec4 globalColor; IN vec2 texCoordVarying; void main() { vec4 tex = TEXTURE(src_tex_unit0, texCoordVarying); if (tex.a < 0.5) discard; FRAG_COLOR = globalColor * tex; }
    9    

[ error ] ofShader: bindDefaults(): trying to link GLSL program, but no shaders created yet

[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet

then the app starts without shader

[ error ] ofShader: begin(): couldn't begin, shader not loaded

I am using an eeepc1011 Atom n570 ubuntu 14.04
glxinfo

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) IGD 
OpenGL version string: 1.4 Mesa 10.3.0

I don’t really understand the way shaders works, is my laptop too old to get shaders working?