Add Motion JPEG Video (MJPG) [ANSWERED]
-
My IP camera uses MJPG codec, is it posible to add this feature?
-
Unfortunately not. Amazon/Alexa only supports RTSP and WebRTC connections to IP cameras.
https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-camerastreamcontroller.htmlThanks, Robert
-
What is wrong with MJPEG-over-RTSP ? But not sure whether or not Amazon Alexa supports MJPEG (as opposed to H264, MPEG etc).
-
Do you have a camera that supports MJPEG over RTSP? I have never been able to test it to see if it works. My IP cameras that support a MJPEG stream don’t support it via RTSP only via a HTTP stream.
Amazon does claim support for MJPEG but only via a RTSP connection.
Supported video codecs:
You can use the following supported video codec values: H264, MPEG2, MJPEG, JPG.It would be interesting to learn if this works. I’m not sure I would get my hopes up however :-)
Thanks, Robert
-
All mine are 264 (or H264/265); I was just clarifying the diference between (network) protocols and codecs. I remember the times when MJPEG was preferred by the security industry because of fear that a court case could fail due to a defence that an MPEG picture was not “real” but could be a P frame and, therefore “not real”.
-
So I typically answer this question about MJPEG support with a NO because I’ve not come across a camera that supports MJPEG streams over RTSP and thus have never been able to test and verify it. All IP cameras that I have seen that support MJPEG only support it via HTTP/HTTPS streaming. So the easy answer is NO, but I’m sure there is some older camera out there that may support MJPEG over RTSP … maybe some high end Axis camera :-)
-
@Monocle it should be possible to use HTTP and stream to RTSP, I tried to do it via VLC but you don’t support MJPEG Codec.
-
I don’t believe that Amazon/Alexa will support HTTP/S streaming. They only document support for RTSP and WebRTC.
I agree with you that Amazon should support HTTP/S MJPEG streaming, but last time I tested it, Alexa refused to stream it.
The Monocle gateway and servers do not touch the audio and video data, we do not re-encode or transcode anything as that would add too much latency.
PS: VLC will render HTTP/S streams because VLC supports HTTP streaming.
Thanks, Robert
-
@Monocle I’m using raspberry to stream my camera via RTSP buy it won’t work becase the lack of MJPEG Codec
raspivid -n - | cvlc -vvv http://192.168.68.152:8080/?action=stream:chroma=mjpg:width=640:height=480 --sout ‘#rtp{sdp=rtsp://raspberrypi.local:8554/}’
I have a RTSP stream with MJPEG but won’t work in echo, I dont know if it has something to do with your codec support or alexa.
-
Ok, tomorrow I’ll try to add the MJPEG option in the Web UI and you can test it. Apart from adding it to the camera configuration there is not much else we can do on our end. Alexa is a black box with respect to accepting and playing streams.
Thanks, Robert
-
@Monocle Thanks! I let you know if it works, Regards.
-
I’ll post here once I get it in place. Thanks, Robert
-
Will be interested to see if this works or not.
-
The MJPEG option is now available. After updating your camera feed and making the Alexa request, make sure to check your camera feed history in the Monocle web portals and make sure “
MJPEG
” is listed in the request data for the “videoCodec
”:Example:
"timestamp": "2020-06-05T19:21:24.826Z", "request": "InitializeCameraStreams", "response": [ { "uri": "...", "proxy": "...", "resolution": { "width": "320", "height": "240" }, "authorizationType": "DIGEST", ------> "videoCodec": "MJPEG", "audioCodec": "NONE", "protocol": "RTSP" } ] },
Thanks, Robert
-
@Monocle I couldn’t get it to work, I think they better try converting the stream to H264, thanks a lot for the help anyway. regards.
-
Hello Robert @Monocle
is MJPG still possible? Tried to add my Loxone Intercom but cant see the MJPG Option:
Cheers,
Jan