It didn't work for me though; zms process just crashed. This is my attempt to improve the code to support this feature better.
Documentation:
URL for accessing zms:
Code: Select all
http://x.x.x.x/zm/cgi-bin/nph-zms?mode=mpeg&monitor=3&scale=100&maxfps=6&bitrate=75&format=mpegts/h264
(your url might also begin with)
http://x.x.x.x/cgi-bin/nph-zms?
Features:
- To choose codec, include it in the URL like "&format=mpegts/h264" for example.
- To choose quality instead of bitrate, include it in the URL like "&bitrate=75" (if bitrate <= 100 it's assumed to be a quality setting)
Note; which format/codec combos that work is pretty much up to what version of FFmpeg you're using. If something doesn't work I've found it really helpful to run...
Code: Select all
LOG_FLUSH=1 LOG_PRINT=1 QUERY_STRING="mode=mpeg&monitor=3&scale=100&bitrate=750000&maxfps=30&format=mpegts/h264" src/zms > /tmp/test.ts
If you give it a try, please post what combination of FFmpeg version and format/codec that worked for you.
Code is available at: https://github.com/Sune1337/ZoneMinder/tree/zms/ffmpeg