Generic FFMPEG implementation / stream other video sources



  • So I wrote a simple script to tail the log and watch for the start/stop events and run my own rtsp server. But since the server isn’t running when I initiate the command, it fails 😞

    So, tailing logs won’t work. Is the monocle-proxy open sourced anywhere so I can alter it for my personal use?



  • @jed

    Hi ,

    Monocle Gateway is not currently open sourced. However, I’m willing to work with you to include some hooks or APIs that can allow you to “know” when a stream is requested and when it is disconnected. We will need to hash out some details on the best way to make this work. Currently the only way to know when a stream is no longer in use is by the TCP disconnect from the Alexa/FireTV devices. So this means someone may need to track how many connections are active/live before shutting down your RTSP server/stream.

    Thanks, Robert



  • @Monocle

    Hey Robert,

    Thanks so much for the reply. I don’t really need a stream end command as much as I would really need is a beforeStreamStarts command line option.

    If the software could call a CLI entry and pass the camera name to it, then wait for a return value before it connects to the rtsp stream, I can use that CLI entry to start my own rtsp server.

    I think doing so would open up a wealth of options for people to make their own video sources.

    Thanks again and I just sent a donation to the project, it’s really great



  • Hey Robert,

    Is this in the forecast at all? FWIW, I’m still very interested.

    Thanks



  • I run Blue Iris on my Windows PC, and would like to be able to specify the Blue Iris server as a pseudo-camera that aggregates all my individual camera streams with individual cameras identified as channels under the single BI URL. This is how the IP Camera Viewer app that runs on Android works. The difficulty in using this with Monocle is that BI only hosts http as an output, not rtsp. So it would be great if Monocle had a transcoder that allowed it to use http streams.



  • @jed

    Sorry for the delay, I have been out of the office for a few weeks.

    Let me look into the gateway code and see if there is a simple place to add support for a “beforeStream” type of interaction. Blocking (waiting for a response) may be tricky, because Alexa only allows for up to 6 seconds to respond (see https://developer.amazon.com/docs/device-apis/alexa-camerastreamcontroller.html)

    It’s something we can certainly experiment with. When would you be available to test something like this out?

    Thanks, Robert



  • Hey Robert

    I’m around this weekend. I dont think I need a blocking spawned process, i would just want to run by script right before yours is called.

    Thanks a bunch, this is going to be awesome.



  • @jed

    I would not be able to get anything working this weekend, but maybe over the coming week.

    What type of script would you be running? BASH, BATCH? etc?

    Thanks, Robert



  • Hey Robert,

    I’m running a windows server, so BATCH work. I may end up compiling an .exe so other people can use it too. I’m hoping that I don’t need a blocking process, but it’s hard for me to tell without testing. My fear is that the rtsp server won’t be running when monocle calls it and it would fail.

    Anyways, I’m ready to test whenever you would like, just give me a shout. Its going to be so awesome to be able to say “Alexa, show me cartoons” and have it stream video of my choosing, without paying another 3rd party provider.

    Thanks again!



  • @jed

    I have something to start testing with. I’ll PM you the details.

    Thanks, Robert


Log in to reply