goruck / alexa-ip-cam

Use Alexa's Smart Home Skill API with standalone IP cameras without needing cloud service.
MIT License
161 stars 26 forks source link

have you converted Zoneminder mjpeg to RTSP for this project? #6

Open carteriii opened 6 years ago

carteriii commented 6 years ago

I too am a Zoneminder user but with numerous analog cameras hooked through a capture card and other older cameras which do not support direct RTSP. Might you have done any investigation of converting the Zoneminder mjpeg stream into RTSP with ffmpeg/ffserver/avconv or anything else? I've found a few general posts on mjpeg to rtsp conversion, but nothing specific to Zoneminder. Thanks in advance.

pliablepixels commented 6 years ago

I came here from the ZM forum where you posted about this question. Given that amazon supports the MJPEG codec, I think using something like VLC to stream the MJPEG stream inside an RTSP envelope might be what this needs. I'm pretty sure ffmpeg/family would offer something similar. This has the benefit that the cameras are not directly connected to (many don't allow multiple streams) but has the downside that its another transcoding. Given I just bought an Echo Show, I'm interested.

Another (unrelated) effort could be to see if one can write a skill to render a web page or display an image using its display template? In which case the problem becomes almost trivial. They have a limitation of 3MB per image, but if we sneak in a multi-part MIME <img src=> with each part < 3MB I wonder if it would work? I've only spent 10 minutes looking at this, so its entirely possible this line of investigation may not work.

carteriii commented 6 years ago

We shouldn't pollute this repo's comments with things unrelated to this project or the author (any more than I already did with my question) so let's continue/move the general discussion back to the ZM forum after this. I've been trying (mostly failing) to get ffserver & ffmpeg working to create the RTSP stream. I'll post my status in the ZM forum once I've tried some more.

goruck commented 6 years ago

Thanks. Btw, as far as I know the Amazon Smart Home Camera API does not support MJPEG. If I think if a way to solve this I will chime in on the ZM forum as well as add the capability to this project so it can directly interface with ZM's monitors. Therefore I will treat this as a feature request.

On Thu, Jul 19, 2018, 4:26 PM carteriii notifications@github.com wrote:

We shouldn't pollute this repo's comments with things unrelated to this project or the author (any more than I already did already with my question) so let's continue/move the general discussion back to the ZM forum after this. I've been trying (mostly failing) to get ffserver & ffmpeg working to create the RTSP stream. I'll post my status in the ZM forum once I've tried some more.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/goruck/alexa-ip-cam/issues/6#issuecomment-406403603, or mute the thread https://github.com/notifications/unsubscribe-auth/ALkFIMr7DeCVpGIbwSqQiyrCK3o1CvMQks5uIOuRgaJpZM4VTqcY .

carteriii commented 6 years ago

This is the thread I started on the forum: https://forums.zoneminder.com/viewtopic.php?f=11&t=27395&sid=d9f6d2cd60b68af45b97acf4ae69d978

pliablepixels commented 6 years ago

@goruck Sounds good. Yes amazon lists MJPEG codec as supported but inside an RTSP stream @carteriii My comments are not unrelated to the project at all. If MJpeg streams can be shown using a display template or via a transcoder it’s a legitimate solution for any MJPEG source including ZM.

goruck commented 6 years ago

@pliablepixels yeah, I see the MJPEG codec support now. Thanks for pointing it out!

I played around with the suggestions shown in the Streaming MJPG from webcam to RTSP using VLC article but could not get it to work yet. I'll keep trying but assuming it works it would be very simple to add the output of the VLC converter to another input of the Live555 proxy. This would help people like @carteriii who have analog cameras or cannot directly access a rtsp stream.

Also with regards to your other suggestion using Display Template - Its very interesting. I've used those templates to display ZoneMinder alarm frames on the Echo devices. And by the way, I've used the VideoApp Interface to display video clips of ZoneMinder alarms. I could not figure out a way to stream the ZoneMinder images directly but your suggestion may solve that. I'll take a look at that as well and please keep me posted on your progress.

If you are interested in learning more about how I used the Display Templates and the VideoApp interface to access ZoneMinder alarms see the smart-zoneminder project and in particular alexa-smart-zoneminder.