It totally transcodes from mjpeg (provided by octopi image) and sends to rtmp server (ie YouTube Live, Twitch). It uses ffmpeg to do the conversion.
OK, I think that puts us back to my previous reply with the screenshot where I acknowledged a lack of understanding of the difference between RTSP and RTMP or whether they were compatible. I think your reply to that suggests it's not, so your RTMP transcoder doesn't help me convert to RTSP for Scrypted - "OctoPrint (with or without your plugin) doesn't supply that kind of stream."
Do I have it right now?
That seems about right, if RTSP stream is what scrypted is expecting I assume, then my plugin will do you no good. What does scrypted actually accomplish for you and I might be able to guide you in a better direction.
I use it to get non-HomeKit cameras into HomeKit. I currently use it for UniFi Protect and Ring cameras. It works flawlessly for those. I think it would be useful to also have the OctoPrint camera in HomeKit as well.
So homekit is an rtmp destination?
Not natively. Scrypted transcodes various camera feed protocols to others as needed using a plugin architecture. So, I have the HomeKit plugin (output) installed alongside the UniFi Protect and Ring plugins (input). There are other input plugins available, but not for RTMP or FFmpeg. There is an RTSP plugin, but it doesn't sound like your RTMP plugin would make a compatible stream for that.
Here's a simple diagram of a working data flow:
[UniFi Protect] > [Scrypted: UniFi Protect plugin] > MAGIC > [Scrypted: HomeKit plugin] > [HomeKit]
Here's the data flow I think I'm after:
[OctoPrint FFmpeg camera (does not natively stream)] > [OctoPrint: plugin that provides stream compatible with a Scrypted plugin (does not exist yet) > [Scrypted: plugin compatible with OctoPrint plugin (also does not exist yet) > SIMILAR MAGIC AS BEFORE > [Scrypted: HomeKit plugin] > [HomeKit]
did you happen to test the ONVIF plugin with the default mjpg stream from OctoPi? The new camera-stack gives a couple of more options like HLS and webrtc.
after a little more searching, I'm seeing lots of references to an ffmpeg camera plugin. If you have that option available you should be able to use it to stream the default stream url with http://192.168.0.2/webcam/?action=stream
as input and enable the transcoding options.
Right, that's what got this whole thread started. I couldn't figure out if/how to configure the FFmpeg plugin.
But, I also don't know what/where I should be "enabling the transcoding options." Is that in OctoPrint or Scrypted?
My understanding is that transcoding setting is in the scrypted ffmpeg plugin settings. Sorry, didn't realize that was what the screenshots were from. The options would need to be
-f mjpeg -i http://192.168.0.2/webcam/?action=stream
I think.
That (with the right IP address) did not work.
For those trying to make sense of this in the future, I enabled transcoding under the Extensions tab of the newly created FFmpeg OctoPrint camera in Scrypted.
When I enter this (192.168.0.40/webcam/?action=stream) in a browser, I do see the OctoPrint webcam stream.
Did you get this working?
I'm in the same place as you.
All other methods of getting the OctoPrint camera into HomeKit suck, poor quality and/or laggy.
No. I couldn't figure out the right things to put in for the stream URL.
I was able to get an OctoPrint stream into Scrypted ffmpeg using the OctoPrint plugin "Camera Streamer Control" (I was using this for a webrtc stream at one point):
ffmpeg input stream: -i http://OCTOPRINTIP/webcam/video.mp4 (I'm not using any additional settings for the stream, but I assume the Scrypted ffmpeg plugin will work with those).
snapshot url: http://OCTOPRINTIP/webcam/snapshot
To be transparent, this is part of the new camera-streamer webcam stack discussed in A new camera stack for OctoPi
Ah yes, thanks for the clarification/correction. I did switch to the new camera-streamer webcam stack a little after that blog post (and apparently forgot that this plugin was part of that, rather than something I downloaded after the fact).
The webrtc stream would also be available to scrypted I suspect without the plugin. The plugin just makes the webrtc implementation of camera-streamer work within OctoPrint.
I found this thread trying to get this to work and was successful! Here are my settings that I think are relevant.
OctoPrint: 1.9.3 with original camera stack
Cam: Microsoft Studio Cam with resolution set to 1080 via octopi config file on boot.
Scrypted config:
- Installed the ffmpeg-camera plugin and added a camera via that plugin.
- In the "Extensions" settings panel for the camera I set to the following:
- In the "FFmpeg Camera" setting panel, I added the following:
FFmpeg Input Stream Arguments:
-i http://your.octoprint.url/webcam/?action=stream
Check "No Audio" at the bottom
More screenshots to come, but I'm newly registered and that limits me to one inline image.
- In the "Snapshot" settings panel:
Everything else was default. I was able to add this to Homekit and stream live once this was in place. I'm using an nginx proxy in front of my octoprint server, but other than that it is pretty vanilla and I only changed what I posted above.
Apologies in advance if the formatting is a mess here with pictures inline and such.