Network Video streaming for dummies?

#1

Hi everyone,

how can I easily receive an UDP or RTSP video stream, so I can process the images and then send it as another UDP or RTSP stream in (as close as possible to) realtime?

So far I looked at:
ofxGStreamer - don’t need it since I’m on linux
ofxStreamer - does not compile due to https://github.com/HalfdanJ/ofxStreamer/issues/4 and seems abandoned
ofxGstRTP - seems only capable of sending and also outdated, but I haven’t tested it
ofGstUtils - this post Gstreamer advanced utils or how to stream an OF app seems to suggest that it could be helpful, but I can’t find anything about ofGstUtils let alone what commands I would have to use to open a udp port or to extract a frame.

Now I have no idea if it even possible with a reasonable amount of work or if I should just forget about it. Is there an easy solution?

#2

ofGstRTP can send and receive video, autdio, and other additional data like depth channel and even osc over rtp

I haven’t updated it in a while but should work with minimal fixes since the gstreamer api in OF hasn’t changed much

Installing it might not be trivial though since it depends on other addons for certain things

#3

Thank you!
Just to make sure, I absolutely need external addons to do this, it won’t work with the oF basics, right?

Trying to get ofGstRTP working:
Compiling failed at several “no such file or directory” errors, that I tried to fix by adding these addons (all links to be found on https://github.com/arturoc/ofxGstRTP):
snappy.h
ofxNice.h
ofxXMPP.h
ofxDepthStreamCompression

With these addons added, QtCreator does not recognize the src folder (it is no longer displayed in the project navigator. Trying to compile results in this error:

*openFrameworks/libs/openFrameworksCompiled/project/qtcreator/modules/of/of.qbs:308: warning: error: Package nice was not found in the pkg-config search path.*
*Perhaps you should add the directory containing `nice.pc'*
*to the PKG_CONFIG_PATH environment variable*
*No package 'nice' found*

This is solved by sudo apt install libnice-dev

But now, the real problems are just beginning with tons of errors:

In file included from ~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp:8:
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.h:69:5: error: ‘list’ does not name a type; did you mean ‘uint’?
     list<PooledOscPacket *> pool;
     ^~~~
     uint
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp: In member function ‘PooledOscPacket* ofxOscPacketPool::newBuffer()’:
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp:22:5: error: ‘pool’ was not declared in this scope
  if(pool.empty()){
     ^~~~
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp:22:5: note: suggested alternative: ‘bool’
  if(pool.empty()){
     ^~~~
     bool
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp: In member function ‘void ofxOscPacketPool::returnBufferToPool(PooledOscPacket*)’:
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp:43:2: error: ‘pool’ was not declared in this scope
  pool.push_back(buffer);
  ^~~~
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp:43:2: note: suggested alternative: ‘bool’
  pool.push_back(buffer);
  ^~~~
  bool
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp: In member function ‘PooledOscPacket* ofxOscPacketPool::newBuffer()’:
~/openFrameworks/addons/ofxGstRTP-master/src/ofxOscPacketPool.cpp:34:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1plus: some warnings being treated as errors
Process failed with exit code 1.

How can I fix these?