I have already checked the TRACE log, but for the snapshot I do not see any further information. If I request the mjpeg, I see a lot of information about ffmpeg, see:
2023-11-30 09:25:38.049 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.mjpeg, received from 192.168.xx.xx
2023-11-30 09:25:38.052 [DEBUG] [amera.internal.servlet.CameraServlet] - First stream requested, opening up stream from camera
2023-11-30 09:25:38.067 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-rtsp_transport tcp -hide_banner -i rtsp://<user>:<password>@192.168.xx.xx:554/live/ch0 -q:v 5 -r 2 -vf scale=640:-2 -update 1 -vf transpose=2 http://127.0.0.1:8080/ipcamera/f7b653e0f0/ipcamera.jpg
2023-11-30 09:25:42.267 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Guessed Channel Layout for Input Stream #0.1 : mono
2023-11-30 09:25:42.272 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Input #0, rtsp, from 'rtsp://<user>:<password>@192.168.xx.xx:554/live/ch0':
2023-11-30 09:25:42.273 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Metadata:
2023-11-30 09:25:42.275 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - title : hysxrtpsion
2023-11-30 09:25:42.276 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Duration: N/A, start: 0.436000, bitrate: N/A
2023-11-30 09:25:42.277 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 25 fps, 25.42 tbr, 90k tbn, 50 tbc
2023-11-30 09:25:42.279 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
2023-11-30 09:25:42.282 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Multiple -filter, -af or -vf options specified for stream 0, only the last option '-filter:v transpose=2' will be used.
2023-11-30 09:25:42.284 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Stream mapping:
2023-11-30 09:25:42.286 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
2023-11-30 09:25:42.288 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Press [q] to stop, [?] for help
2023-11-30 09:25:42.592 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Output #0, image2, to 'http://127.0.0.1:8080/ipcamera/f7b653e0f0/ipcamera.jpg':
2023-11-30 09:25:42.597 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Metadata:
2023-11-30 09:25:42.629 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - title : hysxrtpsion
2023-11-30 09:25:42.652 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - encoder : Lavf58.45.100
2023-11-30 09:25:42.654 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Stream #0:0: Video: mjpeg, yuvj420p(pc), 1080x1920, q=2-31, 200 kb/s, 2 fps, 2 tbn, 2 tbc
2023-11-30 09:25:42.670 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Metadata:
2023-11-30 09:25:42.672 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - encoder : Lavc58.91.100 mjpeg
2023-11-30 09:25:42.686 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - Side data:
2023-11-30 09:25:42.708 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
2023-11-30 09:25:42.881 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - frame= 2 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A dup=0 drop=4 speed= 0x
2023-11-30 09:25:43.681 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - frame= 4 fps=2.9 q=5.0 size=N/A time=00:00:00.50 bitrate=N/A dup=0 drop=24 speed=0.361x
2023-11-30 09:25:44.176 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - frame= 5 fps=2.6 q=5.0 size=N/A time=00:00:01.00 bitrate=N/A dup=0 drop=45 speed=0.528x
2023-11-30 09:25:44.715 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - frame= 7 fps=2.9 q=5.0 size=N/A time=00:00:02.00 bitrate=N/A dup=0 drop=61 speed=0.832x
2023-11-30 09:25:45.226 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - frame= 8 fps=2.7 q=5.0 size=N/A time=00:00:02.50 bitrate=N/A dup=0 drop=78 speed=0.855x
2023-11-30 09:25:45.820 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - frame= 10 fps=2.8 q=5.0 size=N/A time=00:00:03.50 bitrate=N/A dup=0 drop=97 speed=0.992x
2023-11-30 09:25:46.320 [TRACE] [hab.binding.ipcamera.internal.Ffmpeg] - frame= 12 fps=3.0 q=5.0 size=N/A time=00:00:04.50 bitrate=N/A dup=0 drop=116 speed=1.11x
But if I use the jpg url I do only see the following lines in the log:
2023-11-30 09:23:38.810 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.jpg, received from 192.168.xx.xx
2023-11-30 09:23:38.825 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.178.xx.xx/mjpeg/snap.cgi?chn=0
It looks like the snapshotOptions are ignored and only the snapshot image from the camera directly is used.
Thats why I asked if I do it the right way with the snapshotOptions and using the jpg url?!
I tested the following command via terminal:
ffmpeg -rtsp_transport tcp -hide_banner -i rtsp://<user>:<password>@192.168.xx.xx:554/live/ch0 -q:v 5 -r 2 -vf scale=640:-2 -update 1 -vf transpose=2 /mnt/c/tmp/file5.jpg
as well as:
ffmpeg -i http://<user>:<password>@192.168.xx.xx/mjpeg/stream.cgi?chn=0 -an -vsync vfr -q:v 2 -update 1 -vf "transpose=2" /mnt/c/tmp/file4.jpg
They both work fine.
Do you see any problems, or did I missconfigured the thing somehow?
The complete configuration of the Thing is:
UID: ipcamera:onvif:xxxxxxx
label: Frontdoor Camera - ONVIF IP Camera
thingTypeUID: ipcamera:onvif
configuration:
mjpegOptions: -q:v 5 -r 2 -vf scale=640:-2 -update 1 -vf transpose=2
ipAddress: 192.168.xx.xx
updateImageWhen: "0"
gifPreroll: 0
onvifPort: 80
ffmpegLocation: /usr/bin/ffmpeg
ipWhitelist: DISABLE
mp4OutOptions: -c:v copy -c:a copy
pollTime: 2000
password: "<password>"
port: 80
snapshotOptions: -an -vsync vfr -q:v 2 -update 1
ptzContinuous: false
onvifMediaProfile: 0
gifOutOptions: -r 2 -filter_complex
scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse
hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy
-hls_flags delete_segments -hls_time 2 -hls_list_size 4
username: <user>
location: Frontdoor