First I really wanna thank @Centricular and specially @MathieuDuponchelle who did all the heavy lifting and made this tiny experiments even possible
This Code is part of my Gstreamer 101 with python where I got familiar with gstreamer inside a docker-container and the possiblities of gstreamer in case of WebRTC as well as CEF.
THX to:
-
@matthew1000 & @moschopsuk ->
Bravewhere I copied more ot less the whole webserver/websocket-logic to interact with
gstreamer -
@notedit -> gstreamer-rtc-streamer
which code helped me a lot to get
webRTCworking and structured, because I had not muchpythonknowledge
Years I wanted to have a 'headless' version of OBS where I could overlay a Browser over a video-stream. As I dug more into webRTC I really wanted to bring this into the mix.
I am no python-ninja - not even a well enough python-dev, I would say - but I did not want to struggle with C/C++ (or more and less their build systems) so I choose python to interact with gstreamer on a more deep level.
Thanks to a lot of examples all over github, as well as the work of the BBC with Brave (shout out in this case to @moschopsuk & @matthew1000 )!
- run gstreamer in
Docker - build CEF-plugin in the
Containerto bundle it - experiment with
gstreamerandGLibinpython - develop a couple of small demos with `gstreamer``
- try to build something like a news studio with graphik overlay where participants can publish via
webrtcto be broadcasted
something like
please ignore the content, it is all about graphics and video mixing, of course!
docker build --tag=riha/gst-video-graphik-server .
-
installs
gstreamerand all the dependencies onubuntu19.10(TODO: update to LTS 20.x.x, asap) -
builds the
gstcefsrclook into the
install_scripts/install-cefPlugin.sh.The version is pinned to a certain working commit of this plugin, just to be sure it works!
-
installs
python dependencies
TODO:
- I did not include (
COPY) thesrc-Folder in the container, yet because I wanna code during runtime of the container! - I do not provide an
ENTRYPOINTbecause it is still a work in progress and not a product
docker run -it -p 7001:7001 -p 8001:8001 -v $PWD/src:/opt riha/gst-video-graphik-server:latest
-
opens port
8001for the http/websocket-server for- webRTC signaling
- http-server for the webRtc ingest
- as well as HTML-graphics for the background
-
opens port
7001to watch the stream withffmpeg(orgstreamerof course!)ffplay tcp://127.0.0.1:7001 -
maps the
src/-folder to/optinside the container to run the code and develop/debug
inside the container
cd /optpython3 server.py- "DONE"
4. open `TCP`-stream on the host with
`ffplay tcp://127.0.0.1:7001`
