I'm still having problems with this.
While I can connect to h264_v4l2_rtspserver like this, ZM loses the connection every 10-30 seconds during sunrise and sunset, even with exposure_dynamic_framerate=0. I get full length segments when the lighting conditions don't change.
Meanwhile I even bought a RPi2 to try out uv4l. But Zoneminders ffmpeg can't sucessfully connect to that software either.
I can once again connect to uv4l-server using mpv (
mpv http://[camera-ip]/stream/video.h264 ) - which also uses ffmpeg - or with vlc (
vlc http://[camera-ip]/stream/video.h264 --demux h264 ).
But Zoneminder throws an "swscale does not support the codec format" error.
I have set it to ffmpeg, TCP, with
http://[camera-ip]/stream/video.h264 as the url with uv4l-server running on port 80.
Here is a debug log from zmc:
Code: Select all
09/05/18 22:27:54.311939 zmc_m3[21138].DB3-zm_monitor.cpp/623 [Success connecting]
09/05/18 22:27:54.337082 zmc_m3[21138].DB1-zm_monitor.cpp/492 [Monitor Kuechenfenster has function 2]
09/05/18 22:27:54.337170 zmc_m3[21138].DB1-zm_monitor.cpp/493 [Monitor Kuechenfenster LBF = '%N - %d.%m.%y %H:%M:%S', LBX = 0, LBY = 0, LBS = 2]
09/05/18 22:27:54.337186 zmc_m3[21138].DB1-zm_monitor.cpp/494 [Monitor Kuechenfenster IBC = 20, WUC = 0, pEC = 0, PEC = 5, EAF = 1, FRI = 1000, RBP = 6, ARBP = 6, FM = 0]
09/05/18 22:27:54.337986 zmc_m3[21138].DB1-zm_zone.cpp/842 [Got 1 zones for monitor Kuechenfenster]
09/05/18 22:27:54.338058 zmc_m3[21138].DB3-zm_zone.cpp/717 [Parsing polygon string '0,0 639,0 639,479 0,479']
09/05/18 22:27:54.338074 zmc_m3[21138].DB3-zm_zone.cpp/749 [Got coordinate 0,0 from polygon string]
09/05/18 22:27:54.338088 zmc_m3[21138].DB3-zm_zone.cpp/749 [Got coordinate 639,0 from polygon string]
09/05/18 22:27:54.338101 zmc_m3[21138].DB3-zm_zone.cpp/749 [Got coordinate 639,479 from polygon string]
09/05/18 22:27:54.338113 zmc_m3[21138].DB3-zm_zone.cpp/749 [Got coordinate 0,479 from polygon string]
09/05/18 22:27:54.338129 zmc_m3[21138].DB3-zm_zone.cpp/769 [Successfully parsed polygon string]
09/05/18 22:27:54.341803 zmc_m3[21138].DB1-zm_monitor.cpp/2321 [Loaded monitor 3(Kuechenfenster), 1 zones]
09/05/18 22:27:54.341843 zmc_m3[21138].INF-zmc.cpp/223 [Starting Capture version 1.31.45]
09/05/18 22:27:54.348107 zmc_m3[21138].INF-zm_ffmpeg_camera.cpp/163 [Priming capture from http://[camera-ip]/stream/video.h264]
09/05/18 22:27:54.356611 zmc_m3[21138].DB1-zm_ffmpeg_camera.cpp/342 [Calling avformat_open_input for http://[camera-ip]/stream/video.h264]
09/05/18 22:27:54.778439 zmc_m3[21138].WAR-zm_ffmpeg_camera.cpp/370 [Option rtsp_transport not recognized by ffmpeg]
09/05/18 22:27:54.785110 zmc_m3[21138].DB1-zm_ffmpeg_camera.cpp/374 [Opened input]
09/05/18 22:27:54.785209 zmc_m3[21138].INF-zm_ffmpeg_camera.cpp/376 [Stream open http://[camera-ip]/stream/video.h264, parsing streams...]
09/05/18 22:27:54.793145 zmc_m3[21138].DB3-zm_ffmpeg_camera.cpp/434 [Unable to locate audio stream in http://[camera-ip]/stream/video.h264]
09/05/18 22:27:54.793228 zmc_m3[21138].DB3-zm_ffmpeg_camera.cpp/436 [Found video stream at index 0]
09/05/18 22:27:54.793243 zmc_m3[21138].DB3-zm_ffmpeg_camera.cpp/437 [Found audio stream at index -1]
09/05/18 22:27:54.793277 zmc_m3[21138].DB1-zm_ffmpeg_camera.cpp/512 [Video Found decoder mjpeg]
09/05/18 22:27:54.793292 zmc_m3[21138].DB1-zm_ffmpeg.cpp/266 [Dumping stream index i(0) index(0)]
09/05/18 22:27:54.793306 zmc_m3[21138].DB1-zm_ffmpeg.cpp/271 [ Stream #0:0]
09/05/18 22:27:54.793319 zmc_m3[21138].DB1-zm_ffmpeg.cpp/279 [, frames:0, timebase: 1/25]
09/05/18 22:27:54.793335 zmc_m3[21138].DB1-zm_ffmpeg.cpp/281 [: Video: mjpeg, none(bt470bg/unknown/unknown)]
09/05/18 22:27:54.793349 zmc_m3[21138].DB3-zm_ffmpeg.cpp/306 [
]
09/05/18 22:27:54.793363 zmc_m3[21138].DB1-zm_ffmpeg.cpp/227 [25 stream tb numerator , ]
09/05/18 22:27:54.793386 zmc_m3[21138].DB1-zm_ffmpeg.cpp/227 [25 codec time base:]
09/05/18 22:27:54.793401 zmc_m3[21138].DB1-zm_ffmpeg.cpp/336 [
]
09/05/18 22:27:54.793413 zmc_m3[21138].DB1-zm_ffmpeg_camera.cpp/519 [Calling avcodec_open2]
09/05/18 22:27:54.793533 zmc_m3[21138].DB1-zm_ffmpeg_camera.cpp/542 [HWACCEL not in use]
09/05/18 22:27:54.793552 zmc_m3[21138].DB3-zm_ffmpeg_camera.cpp/582 [Allocated frames]
09/05/18 22:27:54.793568 zmc_m3[21138].DB1-zm_ffmpeg_camera.cpp/598 [Calling sws_isSupportedInput]
09/05/18 22:27:54.793589 zmc_m3[21138].ERR-zm_ffmpeg_camera.cpp/600 [swscale does not support the codec format: ÿÿÿÿ]
09/05/18 22:27:54.799998 zmc_m3[21138].ERR-zmc.cpp/253 [Failed to prime capture of initial monitor]
It seems like ffmpeg interprets h264-over-http as mjpeg, which is wrong.
mathijss, can you please tell me how you set up Zoneminder to access uv4ls
/stream/video.h264 stream?
Zoneminders ffmpeg does work with the uv4l mjpeg stream (
http://[camera-ip]/stream/video.mjpeg ), but that murders my WiFi bandwidth at high resolutions.