I installed the webcamstreamer plugin and ran threw the complete setup howto.
But I can't get it to stream to YT.
Octoprnt throws: NoneType' object has no attribute 'containers'
The plugin uses docker and when I try to run the image from adilinden locally, it throws: standard_init_linux.go:207: exec user process caused "exec format error"
By searching google I found out that this implies I run the image on the wrong architecture. Which could be right. Adi created it for the Pi and I'm running it on X86-64.
So how can I circumvent it to get ffmpeg running whithout docker or could someone point me out how to create a dockerimage with ffmpeg and in the same format as Adi did?
I'm fairly new to docker, 8print, and 3d printing but I would like to get this going rather the easy way then to get really dirty.
In theory, you could build your own docker container that references a working ffmpeg container for your architecture (or build your own). The items to look at specifically are the container that the plugin talks to https://github.com/adilinden-oss/docker-rpi-stream and the docker image that has ffmpeg built in https://github.com/adilinden-oss/docker-ffmpeg/ that the rpi-stream container references.
So I've done a little experiment and have yet to be able to test, but this in theory should work. If you clone the below repository and then build the docker image then in the webcamstreamer plugin, set the docker image name to the one you use when you build (jneilliii/ubuntu-stream if you use the commands below) then it might work...
git clone https://github.com/jneilliii/docker-ubuntu-stream.git
cd docker-ubuntu-stream
docker build -t jneilliii/ubuntu-stream .
So I can confirm that this did work for me. I was able to build that docker image in windows environment and use the above container to stream with. I did have to manually pip install pypiwin32 for npipe support for the webcamstreamer plugin to work properly.
Appologies for reviving an old thread. After spending several weeks trying all the streaming plugins and modifying the entry.sh for 1280x768 at 30fps at varius encode rates I came to the conclusion my neither my RP 2 or 3b+ are powerful enough to accomplish a 30fps stream. I grabbed my laptop and installed Ubuntu 20.04 and manually setup Octoprint. Moved over to the OctoPrint-WebcamStreamer plugin since it supports defining which docker image is used and followed the previously listed instructions above for docker-ubuntu-stream.
When I attempt to stream I get:
500 Server Error: Internal Server Error ("error gathering device information while adding custom device "/dev/vchiq": no such file or directory")
Some googling leans towards a sound issue. I did find a reference to editing one of the files but the user did not document what needed to be changed.
We actually have been working on an update to RTMPStreamer that utilizes native ffmpeg or docker as an option, including dynamic overlays and watermarks. If you want to try it out, it's fairly functional, but I do not know if it will work any better for you relative to frame rate and such, but the docker implementation does allow you to pick the name of the image it uses. You can check it out by installing the plugin by copying the URL below into plugin manager and clicking install. My best guess is that the /dev/vchiq doesn't exist in ubuntu maybe, but I have no idea. In either case, the full ffmpeg command is configurable in this updated version. Once the changes are merged and officially released you should get an update notice.
Thank you so much for the fast reply. I had tried the previous version. This version is making this much easier to diagnose. I have found that mjpg-streamer is producing lows fps as well on both my Pi2, Pi3, and laptop running ubuntu with either a logitech c510, a raspicam, or a 4k dobly usb3 webcam set at 1920 on the laptop. So at this point I'm feeling mjpg-streamer is the root of the issue and not the ffmpeg docker image but I am sticking with this current version of RTMPStreamer cause it rocks.
That's great to hear it's working. If you run into any issues with it please comment over here so that we are aware, as it's still being tweaked here and there.
Another option for you would be to potentially replace mjpgstreamer with ustreamer, but I'm not sure it would really help in the situation as it still involves transcoding the mjpg source into h264 format for sending to Twitch/YouTube.