Zosi camera snapshot JPG files into ZM

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
VidDude
Posts: 10
Joined: Sat Mar 19, 2022 4:26 am

Zosi camera snapshot JPG files into ZM

Post by VidDude »

I'm trying to setup a Zosi camera (I know - it's trash) to stream snapshot JPG files into ZoneMinder.
If I go to this URL using Edge, it downloads a snapshot.jpg file:http://zm:zm@192.168.1.55/snapshot.jpg? ... =zm&strm=0

However, I have set this up in ZM using Remote source, and following:
firefox_np8fpErvd6.png
firefox_np8fpErvd6.png (19.46 KiB) Viewed 2418 times
BUT - it doesn't work. A packet capture shows the HTTP interaction seems to work, but then just breaks down with ZM sending a TCP reset:
Wireshark_QdIgykmh2G.png
Wireshark_QdIgykmh2G.png (54.9 KiB) Viewed 2418 times
A similar packet capture from my connection with EDGE looks really similar, but with more data:
12fGomTub3.png
12fGomTub3.png (203.28 KiB) Viewed 2418 times
How do I get ZM to download this JPG file and use it as frames?
VidDude
Posts: 10
Joined: Sat Mar 19, 2022 4:26 am

Re: Zosi camera snapshot JPG files into ZM

Post by VidDude »

if it helps, the log for this camera in the /var/log/zoneminder/ directory states:
10/21/23 22:26:27.829859 zmc_m12[272229].ERR-zm_remote_camera_http.cpp/827 [Unrecognised content type 'application/octet-stream']
10/21/23 22:26:27.829967 zmc_m12[272229].ERR-zm_remote_camera_http.cpp/1087 [Unable to get response, disconnecting]
10/21/23 22:26:27.830427 zmc_m12[272229].ERR-zmc.cpp/305 [Failed to capture image from monitor 12 Front Door (1/1)]


Looks like it doesn't like the type application/octet-stream.
dougmccrary
Posts: 1254
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Zosi camera snapshot JPG files into ZM

Post by dougmccrary »

Uhm, why? I don't think zm can do that - it wants a stream, as you can see.
BTW, usually it's better to leave colorspace at 32, as counterintuitive as that is.
VidDude
Posts: 10
Joined: Sat Mar 19, 2022 4:26 am

Re: Zosi camera snapshot JPG files into ZM

Post by VidDude »

I don't disagree, the cameras probably need replacement. However, I was able to get FFMPEG to form a stream from the JPG files using the following command:
ffmpeg -stream_loop -1 -framerate 5 -i "http://zm:zm@192.168.1.55/snapshot.jpg? ... =zm&strm=0" output.mp4

If I run that command, it does make an MP4 video using the JPG files, which it grabs 5/second. However, I can't figure out how to give the FFMPEG source in ZM the '-stream_loop -1' and '-framerate 5'. I have tried putting them as options using FFMPEG source type, but in the log it says it cannot parse the options. :(
dougmccrary
Posts: 1254
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Zosi camera snapshot JPG files into ZM

Post by dougmccrary »

Any clues in the ffmpeg log?
If not you can try upping debug output. It does require a restart for the debug to start.
User avatar
iconnor
Posts: 2931
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zosi camera snapshot JPG files into ZM

Post by iconnor »

Are you sure this camera doesn't support rtsp?

Anyways... I could add support for application/octet-stream.... but we would just be assuming that it is a jpeg.. could be anything...
User avatar
iconnor
Posts: 2931
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zosi camera snapshot JPG files into ZM

Post by iconnor »

Please update to 1.37 latest build and give it a try. I added support for application/octet-stream
Post Reply