Have someone managed to get mjpeg cameras working in the amazing Frigate add-on?
I have four D’link dcs-932L with urls/configs like below, but only get a green screen. The urls works in the chrome browser… and in Agent DVR as mjpeg cameras.
My hikvision cameras with rtsp work like a charm.
Is there maybe a way to pass codec info or something to ffmpeg? Or any other ideas?
Did anyone get this working? I get this in the log:
ffmpeg.back_garden.detect ERROR : [flv @ 0x55a96500a140] Video codec mjpeg not compatible with flv
ffmpeg.back_garden.detect ERROR : Could not write header for output file #1 (incorrect codec parameters ?): Function not implemented
ffmpeg.back_garden.detect ERROR :
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x564d95a8b140] moov atom not found
/tmp/cache/back_garden-20210516164700.mp4: Invalid data found when processing input
frigate.events INFO : bad file: back_garden-20210516164700.mp4
Old topic, I know, but if you’re in the search, like me when I saw this post, here is my working config of a 13 year old Wanscam (can work on any Foscam compatible cameras) mjpeg camera:
This is just configured for detection, if you wanna record clips or serve RTMP you need to config the output arguments to do conversion to h264. All work, but you need to consider that your CPU will be doing a lot of work converting mjpeg to h264.
Have you tried your own path on a VLC player to assure your path is ok? Most problems I saw on this come from not assure that the path provided to Frigate is a working mjpeg video path and/or not knowing how the camera brand exposes mjpeg paths (this may vary per brand).
Because to stream RTMP, Frigate need output parameters to know how to encode the MJPEG stream into h264 video and then work with that output. Unless you need to serve an h264 converted stream or use it for capturing things, I suggest to avoid this step and keep just the detection role for just alarm use purposes. But, if this conversion is a real need for you instead my advice, try to add this to your camera config on frigate.yml (please, be aware this will take significant power from your CPU, and can be an overkill for a small CPU):
I tried the output_args only for clips as you suggested and when I try to play the video in Frigate within the browser, I receive an error that video can not be played because it is corrupt.
I spoke too soon! When I enable record for these cameras, the stream stops.
Is there a way to tweak the frigate config file to enable recording of the stream? It is just the video that doesn’t work, so when an event takes place, I get the snapshot but not the clip.