Scrypted FFmpeg Input Stream Arguments

I'm trying to get my OctoPrint FFmpeg stream into Scrypted for viewing through HomeKit.

Here is a screenshot of the Scrypted dialog with the settings I've tried so far based on the template provided when clicking into the field:

Ideally, I would be able to tap into the Webcam stream, but I understand OctoPrint is not a Webcam server. The next best thing would be accessing the OctoPrint Timelapse snapshots. Where can I find the right parameters and input format for the stream and/or snapshots?

Have you setup some non-standard way of streaming the webcam for OctoPrint? It normally would not use ffmpeg, so either you're looking in the wrong place or have setup something custom?

No, I have not done anything to configure a custom FFmpeg stream. Any pointers on that?

Is there a way to configure a service like Scrypted with the existing OctoPrint snapshots?

So assuming you are using the built-in streaming platform of OctoPrint with a usb/pi camera it seems that Scrypted is much like restreamer where it's handling the transcoding of streams? For example, to use an IP security camera's rtsp stream and converts it to another format available in HomeKit. My rtmpstreamer plugin can push OctoPrint's live stream to other platforms using rtmp protocol but I've only tested sending that to Twitch and YouTube Live.

Interesting. Thank you for sharing.

Yes, I gather Scrypted is just a transcoding restreamer. It looks like it does support RTSP.

Is rtsp synonymous with rtmp?

I've installed your plugin and the Scrypted rtsp plugin. After a few failed attempts to configure both, maybe you can help me figure out the right configuration.

I have your plugin's Stream Server URL set to the same IP address of my OctoPi: rtsp://192.168.0.40

Here's how I've attempted to configure the Scrypted rtsp plugin:

Note that your plugin seems to expect an rtmp URL while the Scrypted plugin wants rtsp. Also, does a specific port need to be specified?

Here's a screenshot of the Scrypted plugin's sample Stream URL for reference:
image

I think you're missing the fact that scrypted is expecting an rtsp stream URL from an IP camera? OctoPrint doesn't supply that kind of stream.

I'm sure I'm missing a few things! :wink:

Doesn't your plugin do that or is that not what you were suggesting in your previous reply?

my plugin does not provide a stream, it takes in a stream and sends out a stream to rtmp server.

Ah, I thought your plugin transcoded from mpeg to rtsp/rtmp. It sounds like it just redirects the mpeg stream without transcoding anything?

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.

https://www.reddit.com/r/Scrypted/comments/xtxlx8/ffmpeg_additional_configuration_items/iqt34k9/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

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.