zoneminder
zoneminder copied to clipboard
Feature request: ability to force FFMPEG format
Describe Your Environment
- Version of ZoneMinder: 1.36.26
- How you installed ZoneMinder: NixOS packaging, with manual override to use the latest version instead.
- Full name and version of OS: NixOS 22.05
- Browser name and version (if this is an issue with the web interface): Firefox 104.0 on Ubuntu 20.04
If the issue concerns a camera
- Make and Model: D-Link DCS-5020L
- frame rate: 5
- resolution: 640 x 480
- ZoneMinder Source Type: FFMPEG
Describe the bug
So, I has a camera which seems to forget to produce multipart/x-mixed-replace
's first boundary, which errors FFMPEG's mpjpeg
demuxer with Invalid data found when processing input
.
This happens on ffplay
as well, so it's obviously not ZM's problem. However, if I specify -f mjpeg
to ffplay
, it will play the stream just fine.
From looking at the UI and reading the code, it seems like it's impossible for ZM to specify the format used by FFMPEG. So, it would be nice to be able to specify the format used by FFMPEG, so that I can workaround FFMPEG issue like this.
To Reproduce Set up a monitor with:
- Type: FFMPEG
- Source Path:
http://<user, pass, IP>/mjpeg.cgi
- Capture Resolution: match the camera settings.
Expected behavior I can config ZoneMinder to play the MJPEG stream from DCS-5020L.
Debug Logs
Sep 26 02:18:56 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:18:57 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:18:57 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:18:59 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:18:59 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:02 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:19:02 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:07 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:19:07 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:12 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:19:12 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:18 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:19:18 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:25 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:19:25 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:33 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:19:33 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:43 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Invalid data found when processing input]
Sep 26 02:19:43 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
Sep 26 02:19:44 peat-rpi4-nixos zmwatch[219327]: WAR [Restarting capture daemon for Hatyai, no image since startup. Startup time was 1664133535 - now 1664133584 > 45]
Sep 26 02:19:45 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Unable to open input http://192.168.162.202/mjpeg.cgi due to: Immediate exit requested]
Sep 26 02:19:45 peat-rpi4-nixos zmc_m1[219531]: ERR [zmc_m1] [Failed to prime capture of initial monitor]
(Rinse and repeat)
Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template!
I wonder if format= or f= in the options would work.
This camera historically works fine with the Remote monitor type too.