How to open a GStreamer pipeline from OpenCV with VideoWriter

Before using OpenCV’s Gstreamer API, we need a working pipeline using the Gstreamer command line tool. Sender: The OP is using JPEG encoding, so this pipeline will be using the same encoding. gst-launch-1.0 -v v4l2src \ ! video/x-raw,format=YUY2,width=640,height=480 \ ! jpegenc \ ! rtpjpegpay \ ! udpsink host=127.0.0.1 port=5000 Receiver: The sink caps for rtpjpegdepay … Read more

Loading shared libs that depend on other shared libs

According to https://groups.google.com/forum/?fromgroups#!msg/android-ndk/J3lzK4X–bM/4YaijymZy_AJ Yes, and this is the documented behaviour: you must load libraries in reverse dependency order explicitely. […] It is a limitation of the system. In a nutshell, the dynamic linker doesn’t know anything about your application (e.g. where its libraries live), it only knows about the LD_LIBRARY_PATH value that was set when … Read more

MediaCodec and Camera: colorspaces don’t match

I solved it by swapping the byteplanes myself on Android level, using a simple function: public byte[] swapYV12toI420(byte[] yv12bytes, int width, int height) { byte[] i420bytes = new byte[yv12bytes.length]; for (int i = 0; i < width*height; i++) i420bytes[i] = yv12bytes[i]; for (int i = width*height; i < width*height + (width/2*height/2); i++) i420bytes[i] = yv12bytes[i … Read more