RSATom / janus-gstreamer-plugin

[POC] GStreamer plugin for Janus Gateway
GNU General Public License v3.0
29 stars 4 forks source link

Compile error on Raspbian OS Buster light #2

Closed neilyoung closed 4 years ago

neilyoung commented 4 years ago

Do you have an idea, what's missing here? Is it the missing m4?

pi@janus:~/janus-gstreamer-plugin $ ./autogen.sh 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:11: installing './compile'
configure.ac:11: installing './config.guess'
configure.ac:11: installing './config.sub'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
plugins/gstreamer/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'
pi@janus:~/janus-gstreamer-plugin $ ./configure --prefix=/home/pi/janus-gateway/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GSTREAMER... yes
checking for GSTREAMER_SDP... yes
checking for GSTREAMER_APP... yes
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating plugins/gstreamer/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
pi@janus:~/janus-gstreamer-plugin $ make
Making all in plugins/gstreamer
make[1]: Entering directory '/home/pi/janus-gstreamer-plugin/plugins/gstreamer'
  CXX      libjanus_gstreamer_la-QueueSource.lo
  CXX      libjanus_gstreamer_la-Session.lo
In file included from Session.cpp:1:
Session.h:3:10: fatal error: CxxPtr/GlibPtr.h: No such file or directory
 #include "CxxPtr/GlibPtr.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:512: libjanus_gstreamer_la-Session.lo] Error 1
make[1]: Leaving directory '/home/pi/janus-gstreamer-plugin/plugins/gstreamer'
make: *** [Makefile:390: all-recursive] Error 1
RSATom commented 4 years ago

It's missing CxxPtr submodule. Use git submodule update --init --recursive to fix.

But you don't need build it yourself. You can use https://snapcraft.io/janus-plus-gstreamer-plugin

You will need sudo snap install janus-plus-gstreamer-plugin --edge. Config files will be available at /var/snap/janus-plus-gstreamer-plugin/common/etc

neilyoung commented 4 years ago

Thanks. I would like to be able to build from scratch.

Your hint fixed the problem. Maybe it should also be documented so.

But I ran into the next:

pi@janus:~/janus-gstreamer-plugin $ make
Making all in plugins/gstreamer
make[1]: Entering directory '/home/pi/janus-gstreamer-plugin/plugins/gstreamer'
  CXX      libjanus_gstreamer_la-Session.lo
In file included from Session.h:5,
                 from Session.cpp:1:
MountPoint.h:7:10: fatal error: janus/plugins/plugin.h: No such file or directory
 #include "janus/plugins/plugin.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:512: libjanus_gstreamer_la-Session.lo] Error 1

Even though my configuration looks so

./configure --prefix=/home/pi/janus-gateway/

it seems, the wrong path is included (?)

RSATom commented 4 years ago

Do you have Janus built and installed to /home/pi/janus-gateway/?

neilyoung commented 4 years ago

Yepp... BTW: It should also be ./autgen.sh instead of just autogen.sh. Just a minor thing.

Yes. I compiled Janus from scratch and it is up and running in ~/janus-gateway.

RSATom commented 4 years ago

Hm... let me check...

RSATom commented 4 years ago

Can you please check, if you have /home/pi/janus-gateway/include/janus/plugins/plugin.h file

neilyoung commented 4 years ago

No, that does not exist

RSATom commented 4 years ago

Then I'm afraid your Janus was not properly installed. But it doesn't matter. It looks like plugin build is anyway broken since Janus API was changed. Investigating.

neilyoung commented 4 years ago

I cannot find this directory in the janus-gateway repo either.

The repo was cloned as they describe it:

git clone https://github.com/meetecho/janus-gateway.git cd janus-gateway

https://github.com/meetecho/janus-gateway

RSATom commented 4 years ago

prefix should point to directory where Janus was installed, not sources directory.

neilyoung commented 4 years ago

Ah, sorry, my bad. You documented it like so.

Yes there is such a file in /opt/janus/ and it compiles for a while, but then I guess the changed API you mentioned kicked in:

pi@janus:~/janus-gstreamer-plugin $ make
Making all in plugins/gstreamer
make[1]: Entering directory '/home/pi/janus-gstreamer-plugin/plugins/gstreamer'
  CXX      libjanus_gstreamer_la-Session.lo
  CXX      libjanus_gstreamer_la-Media.lo
  CXX      libjanus_gstreamer_la-RtspMedia.lo
  CXX      libjanus_gstreamer_la-LaunchMedia.lo
  CXX      libjanus_gstreamer_la-MountPoint.lo
MountPoint.cpp: In member function ‘void MountPoint::onBuffer(int, const void*, gsize)’:
MountPoint.cpp:259:67: error: invalid conversion from ‘int’ to ‘janus_plugin_rtp*’ [-fpermissive]
             janusSession.get(), RestreamAs::Video == s.restreamAs ? TRUE : FALSE,
MountPoint.cpp:260:30: error: too many arguments to function
             (char*)data, size);
                              ^
make[1]: *** [Makefile:540: libjanus_gstreamer_la-MountPoint.lo] Error 1
make[1]: Leaving directory '/home/pi/janus-gstreamer-plugin/plugins/gstreamer'
make: *** [Makefile:390: all-recursive] Error 1
RSATom commented 4 years ago

please pull latest version. I've fixed build, but don't sure if it works yet.

neilyoung commented 4 years ago

Great. Pulled, made and installed. Let's see how far I come. Thanks for your quick help on a Sunday :)

RSATom commented 4 years ago

FYI, you should use https://github.com/RSATom/janus-gstreamer-plugin/tree/master/html/demo with something like python -m SimpleHTTPServer 8000 to test it.

neilyoung commented 4 years ago

Yepp. Having seen this already. Thanks anyway.

neilyoung commented 4 years ago

Even though a bit off topic now, but Janus refuses to load. Shall I open a new issue?

[Sun Aug 30 11:47:02 2020] [janus_gstreamer.cpp:create:66] >>>> Gstreamer plugin: create
[Sun Aug 30 11:47:02 2020] [janus_gstreamer.cpp:Init:136] >>>> Gstreamer plugin: Init
[Sun Aug 30 11:47:02 2020]  Version: 1 (0.0.1)
[Sun Aug 30 11:47:02 2020]     [janus.plugin.gstreamer] Gstreamer plugin
[Sun Aug 30 11:47:02 2020]     Gstreamer plugin
[Sun Aug 30 11:47:02 2020]     Plugin API version: 15
[Sun Aug 30 11:47:02 2020] [WARN] The 'janus.plugin.gstreamer' plugin doesn't implement any callback for RTP/RTCP/data... is this on purpose?
RSATom commented 4 years ago

I think you need copy https://github.com/RSATom/janus-gstreamer-plugin/blob/master/conf/janus.plugin.gstreamer.jcfg to janus configs folder

neilyoung commented 4 years ago

It is there

neilyoung commented 4 years ago

pi@janus:~/janus-gateway $ ls /opt/janus/etc/janus/janus.plugin.gstreamer.jcfg /opt/janus/etc/janus/janus.plugin.gstreamer.jcfg

RSATom commented 4 years ago

Then it should load. Did you try html demo?

neilyoung commented 4 years ago

No not yet. I was just observing the janus log. There is no hint that it has been loaded except this error message. Will try the demo now

neilyoung commented 4 years ago

OK, despite the error message the plugin is loaded. I could not reach the big buck bunny link, so I replaced it with one which worked for me:

rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov

I changed to WebSockets, somehow HTTP REST did not work for me (maybe I have disabled it, don't remember).

However, just a spinning wheel in the "stream" window and a crash of janus after a while.

[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] WebSocket connection opened from 192.168.188.24
[Sun Aug 30 12:26:39 2020] Checking if 192.168.188.24 is allowed to contact janus interface
[Sun Aug 30 12:26:39 2020] Yep
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] WebSocket connection accepted
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58]   -- Ready to be used!
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Got 47 bytes:
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] First fragment: 47 bytes, 0 remaining
[Sun Aug 30 12:26:39 2020] {"janus":"create","transaction":"TjCgo7L92oTs"}
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Done, parsing message: 47 bytes
[Sun Aug 30 12:26:39 2020] Got a Janus API request from janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:39 2020] Creating new session: 5865244931402929; 0x718021d0
[Sun Aug 30 12:26:39 2020] Sending Janus API response to janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Re-allocating to 123 bytes (was 0, response is 107 bytes)
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Sending WebSocket message (107 bytes)...
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58]   -- Sent 107/107 bytes
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Got 152 bytes:
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] First fragment: 152 bytes, 0 remaining
[Sun Aug 30 12:26:39 2020] {"janus":"attach","plugin":"janus.plugin.gstreamer","opaque_id":"streamingtest-X64EZjtkxqZq","transaction":"iLw8LmLys2ar","session_id":5865244931402929}
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Done, parsing message: 152 bytes
[Sun Aug 30 12:26:39 2020] Got a Janus API request from janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:39 2020] Creating new handle in session 5865244931402929: 3182593777311106; 0x718021d0 0x71802630
[Sun Aug 30 12:26:39 2020] [janus_gstreamer.cpp:CreateSession:164] >>>> Gstreamer plugin: CreateSession
[Sun Aug 30 12:26:39 2020] Sending Janus API response to janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:39 2020] [3182593777311106] Handle thread started; 0x71802630
[Sun Aug 30 12:26:39 2020] [ice.c:janus_ice_handle_thread:1164] [3182593777311106] Looping...
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Re-allocating to 158 bytes (was 123, response is 142 bytes)
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Sending WebSocket message (142 bytes)...
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58]   -- Sent 142/142 bytes
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Got 133 bytes:
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] First fragment: 133 bytes, 0 remaining
[Sun Aug 30 12:26:39 2020] {"janus":"message","body":{"request":"list"},"transaction":"t77xHok3GtTW","session_id":5865244931402929,"handle_id":3182593777311106}
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Done, parsing message: 133 bytes
[Sun Aug 30 12:26:39 2020] Got a Janus API request from janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:39 2020] Transport task pool, serving request
[Sun Aug 30 12:26:39 2020] [3182593777311106] There's a message for Gstreamer plugin
[Sun Aug 30 12:26:39 2020] [janus_gstreamer.cpp:HandleMessage:228] >>>> Gstreamer plugin: HandleMessage
[Sun Aug 30 12:26:39 2020] [janus_gstreamer.cpp:HandleMessage:232] message:
{
    "request": "list"
}
[Sun Aug 30 12:26:39 2020] [janus_gstreamer.cpp:HandleMessage:251] Gstreamer plugin: Request::List
[Sun Aug 30 12:26:39 2020] Creating plugin result...
[Sun Aug 30 12:26:39 2020] Sending Janus API response to janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Re-allocating to 594 bytes (was 158, response is 578 bytes)
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58] Sending WebSocket message (578 bytes)...
[Sun Aug 30 12:26:39 2020] [WSS-0x72c49c58]   -- Sent 578/578 bytes
[Sun Aug 30 12:26:39 2020] Destroying plugin result...
[Sun Aug 30 12:26:50 2020] [WSS-0x72c49c58] Got 141 bytes:
[Sun Aug 30 12:26:50 2020] [WSS-0x72c49c58] First fragment: 141 bytes, 0 remaining
[Sun Aug 30 12:26:50 2020] {"janus":"message","body":{"request":"watch","id":1},"transaction":"nL5s3S4qBzst","session_id":5865244931402929,"handle_id":3182593777311106}
[Sun Aug 30 12:26:50 2020] [WSS-0x72c49c58] Done, parsing message: 141 bytes
[Sun Aug 30 12:26:50 2020] Got a Janus API request from janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:50 2020] Transport task pool, serving request
[Sun Aug 30 12:26:50 2020] [3182593777311106] There's a message for Gstreamer plugin
[Sun Aug 30 12:26:50 2020] [janus_gstreamer.cpp:HandleMessage:228] >>>> Gstreamer plugin: HandleMessage
[Sun Aug 30 12:26:50 2020] [janus_gstreamer.cpp:HandleMessage:232] message:
{
    "request": "watch",
    "id": 1
}
[Sun Aug 30 12:26:50 2020] [janus_gstreamer.cpp:HandleMessage:254] Gstreamer plugin: Request::Watch
[Sun Aug 30 12:26:50 2020] Creating plugin result...
[Sun Aug 30 12:26:50 2020] [PluginMain.cpp:HandleClientMessage:247] Gstreamer plugin: HandlePluginMessage. Request::Watch
[Sun Aug 30 12:26:50 2020] Sending Janus API response to janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:26:50 2020] Destroying plugin result...
[Sun Aug 30 12:26:50 2020] [WSS-0x72c49c58] Sending WebSocket message (90 bytes)...
[Sun Aug 30 12:26:50 2020] [WSS-0x72c49c58]   -- Sent 90/90 bytes
[Sun Aug 30 12:26:50 2020] RtspMedia::Private::OnSdp. 
v=0
o=- 1849947133 1849947133 IN IP4 3.84.6.190
s=BigBuckBunny_115k.mov
c=IN IP4 3.84.6.190
t=0 0
a=sdplang:en
a=range:npt=0- 596.48
a=control:*
m=audio 0 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/12000/2
a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1490
a=control:trackID=1
m=video 0 RTP/AVP 97
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=42C01E;sprop-parameter-sets=Z0LAHtkDxWhAAAADAEAAAAwDxYuS,aMuMsg==
a=cliprect:0,0,160,240
a=framesize:97 240-160
a=framerate:24.0
a=control:trackID=2

[Sun Aug 30 12:27:04 2020] [WSS-0x72c49c58] Got 80 bytes:
[Sun Aug 30 12:27:04 2020] [WSS-0x72c49c58] First fragment: 80 bytes, 0 remaining
[Sun Aug 30 12:27:04 2020] {"janus":"keepalive","session_id":5865244931402929,"transaction":"EEKMQn6jSn1C"}
[Sun Aug 30 12:27:04 2020] [WSS-0x72c49c58] Done, parsing message: 80 bytes
[Sun Aug 30 12:27:04 2020] Got a Janus API request from janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:27:04 2020] Got a keep-alive on session 5865244931402929
[Sun Aug 30 12:27:04 2020] Sending Janus API response to janus.transport.websockets (0x72c4c318)
[Sun Aug 30 12:27:04 2020] [WSS-0x72c49c58] Sending WebSocket message (90 bytes)...
[Sun Aug 30 12:27:04 2020] [WSS-0x72c49c58]   -- Sent 90/90 bytes

(janus:1019): GLib-ERROR **: 12:27:23.490: Creating pipes for GWakeup: Too many open files
Trace/breakpoint trap (core dumped)
pi@janus:~/janus-gateway $ 
neilyoung commented 4 years ago

Also, the clock pipeline did not work for me, that might be due to a missing GST plugin on my side.

pi@janus:~/janus-gateway $ gst-launch-1.0 -v videotestsrc pattern=blue ! clockoverlay halignment=center valignment=center shaded-background=true font-desc=\"Sans, 36\" ! x264enc ! video/x-h264, profile=baseline ! rtph264pay pt=99 config-interval=1 name=videopay
WARNING: erroneous pipeline: no element "clockoverlay"

I could make it run with this pipeline, but it takes > 30 secs before something happens in the output window and the bandwidth is somehow reduced to 25 kBit/s, so the ball is moving in slomo.

Edit: Here the pipeline

"videotestsrc pattern=ball ! video/x-raw,width=1280,height=720 ! x264enc ! video/x-h264, profile=baseline ! rtph264pay pt=99 config-interval=1 name=videopay"

Can you confirm, that the stream setup takes that long? If so, I can stop here. This contradicts all my KMS experiences and would render this solution obsolete.

RSATom commented 4 years ago

No, it should work faster (at least it was working faster). It's possible there are some compatibility issue with latest Janus versions.

RSATom commented 4 years ago

I didn't touch this plugin long time since there are no interest to it, and I don't use it myself anymore.

neilyoung commented 4 years ago

I fully understand. Thanks so far.

Greetings

RSATom commented 4 years ago

I'll try to investigate it anyway...

neilyoung commented 4 years ago

This is a pipeline which does it pretty perfectly. Usual connection setup time, normal bandwidth and movement of the ball

"videotestsrc is-live=true pattern=ball ! video/x-raw,width=1280,height=720 ! videoconvert ! queue ! vp8enc deadline=1 ! queue ! rtpvp8pay ! queue ! capsfilter caps=application/x-rtp,media=video,encoding-name=VP8,payload=97 name=videopay"

Is there some README about what this plugin does? I see that you seemingly have copied parts of the streaming plugin and re-used it, but I'm not quite sure, what it does.

What I would need is a plugin, which makes raw frames from RTP input, analyzes and annotates it and just reflects it to the sender. Kind of higher media reflector. This is not currently, what the plugin, does, right?

neilyoung commented 4 years ago

...and also this one:

"videotestsrc is-live=true pattern=smpte ! video/x-raw,width=1280,height=720 ! videoconvert ! queue ! x264enc ! rtph264pay ! capsfilter caps=application/x-rtp,media=video,encoding-name=H264,payload=96 name=videopay"

neilyoung commented 4 years ago

I think a potential boost could be brought by the use of the unconventional "candidates complete" message. I'm using trickle ICE and it seems, that the ICE negotiation is running unnecessarily long.

RSATom commented 4 years ago

I've created this plugin to extend supported input formats. Janus Streaming plugin is limited in supported input sources. So I've decided use GStreamer just to add flexibility.

neilyoung commented 4 years ago

OK, thanks. Let me try to understand: The browser is establishing a connection with the plugin, which then chooses to either feed the browser from big buck bunny RTSP or from a GStreamer pipe, right?

So this is what I'm doing basically, but on client side. I'm having a python script, which utilizes GStreamer's webrtcbin plugin. The raw input for this plugin is either the RPI CSI camera or a test stream, like the bouncing balls. Then I'm using a browser solution, which subscribes to the feed sent by the python script. Both meet in a video room. More subscribers can join.

I would need a way to convert the RTSP stream (in a plugin) to YUV or RGB frames in order to be able to analyze and alter these frames and re-convert it to RTSP. So basically a filter on the way from the client to the room.

I was thinking your plugin would help me, but it turns out, it does not. Unfortunately...

RSATom commented 4 years ago

This plugin is just convertor from formats supported by GStreamer to WebRTC. Nothing more. You can add some frames processing if you will create some new GStreamer element with desired behavior and use it inside pipeline attached to plugin. Also there are some GStreamer plugins intended to interact with OpenCV. I think you can use it too, but I've never used it myself.

RSATom commented 4 years ago

btw, if you already know how to work with webrtcbin - you can do all you need with GStreamer and use webrtcbin to stream result to Janus videoroom. Don't think you need RTSP there.

neilyoung commented 4 years ago

No. Thanks. I need fully server side processing.

Sergey Radionov notifications@github.com schrieb am So. 30. Aug. 2020 um 16:29:

btw, if you already know how to work with webrtcbin - you can do all you need with GStreamer and use webrtcbin to stream result to Janus videoroom. Don't think you need RTSP there.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/RSATom/janus-gstreamer-plugin/issues/2#issuecomment-683427377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSPDHLXOWZXI7CZVNTXETSDJO23ANCNFSM4QPRHJ3A .

-- Sent from my iPhone

RSATom commented 4 years ago

Then I don't sure understand what exactly you want to achieve...

neilyoung commented 4 years ago

I want to port a solution I‘m already having (Kurento based) to Janus. Turns out it is not that simple.

Sergey Radionov notifications@github.com schrieb am So. 30. Aug. 2020 um 16:31:

Then I don't sure understand what exactly you want to achieve...

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/RSATom/janus-gstreamer-plugin/issues/2#issuecomment-683427677, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSPDBHS7F2LEUWILW43QLSDJPFFANCNFSM4QPRHJ3A .

-- Sent from my iPhone

RSATom commented 4 years ago

Just curious, why do you want switch from Kurento?

neilyoung commented 4 years ago

But to give you an idea: We have a Visual SLAM engine running in the cloud. External cams and monitors are connected via WebRTC. The server terminates the cam connections and does the SLAM in a customized Kurento OpenCV filter. Runs like a charm. I just wanted to see, if something like this could be pictured with Janus. For that a kind of an Echo plugin would be required with means to intercept and alter the incoming video. And send it back of course.

I think this should be the way to investigate for me: See how echo works and go into the RTP callbacks, convert, process and re-encode the video.

Neil Young foreverneilyoung@googlemail.com schrieb am So. 30. Aug. 2020 um 16:33:

I want to port a solution I‘m already having (Kurento based) to Janus. Turns out it is not that simple.

Sergey Radionov notifications@github.com schrieb am So. 30. Aug. 2020 um 16:31:

Then I don't sure understand what exactly you want to achieve...

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/RSATom/janus-gstreamer-plugin/issues/2#issuecomment-683427677, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSPDBHS7F2LEUWILW43QLSDJPFFANCNFSM4QPRHJ3A .

-- Sent from my iPhone

-- Sent from my iPhone

neilyoung commented 4 years ago

I think I would not leave Kurento. It works great. I was simply just curious how Janus performs. It is pretty lightweight and easy to install on smaller platforms. There’s really no need to leave Kurento for this particular use case.

Sergey Radionov notifications@github.com schrieb am So. 30. Aug. 2020 um 16:38:

Just curious, why do you want switch from Kurento?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/RSATom/janus-gstreamer-plugin/issues/2#issuecomment-683428413, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSPDDZ5JZJU3RS6AUXFALSDJP6RANCNFSM4QPRHJ3A .

-- Sent from my iPhone

RSATom commented 4 years ago

Yes, don't think Janus is the right choice for your use case. At least without some hacking involved...