Closed milmber closed 5 years ago
Would be interesting which devices you are running. Also seems to be the same issue as in #50
Would be interesting which devices you are running. Also seems to be the same issue as in #50
Devices below:
I suspect the issue is that that the ffmpeg command arguments need to change to support newer iOS devices. Currently reviewing the homebridge-camera-ffmpeg code (where streaming works) to see what is missing.
I was more interested what iDevices you are running, since it seems to only affect newer devices.
homebridge-camera-ffmpeg works for you?
I was more interested what iDevices you are running, since it seems to only affect newer devices.
iPhone X (iOS 12.2), Apple Watch (WatchOS 5.2), iPad Pro (iOS 12.2)
homebridge-camera-ffmpeg works for you?
Yes.
Below is the equivalent logs when streaming is successful.
Apr 15 19:59:19 raspberrypi3b homebridge[355]: [2019-4-15 19:59:19] [Camera-ffmpeg] Start streaming video from Pi 3B Camera with 1280x720@299kBit Apr 15 19:59:19 raspberrypi3b homebridge[355]: ffmpeg -re -r 30 -i http://raspberrypi3b.local:8081 -map 0:0 -vcodec h264_omx -pix_fmt yuv420p -r 30 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -payload_type 99 -ssrc 10091340 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params /Phf3DZDORLnTKc0VnfAuzH9gY6Ua41gtZsGeRVW srtp://10.0.1.18:49806?rtcpport=49806&localrtcpport=49806&pkt_size=1316 Apr 15 19:59:20 raspberrypi3b homebridge[355]: ffmpeg version 3.2.12-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg developers Apr 15 19:59:20 raspberrypi3b homebridge[355]: built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 Apr 15 19:59:20 raspberrypi3b homebridge[355]: configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared Apr 15 19:59:20 raspberrypi3b homebridge[355]: libavutil 55. 34.101 / 55. 34.101 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libavcodec 57. 64.101 / 57. 64.101 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libavformat 57. 56.101 / 57. 56.101 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libavdevice 57. 1.100 / 57. 1.100 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libavfilter 6. 65.100 / 6. 65.100 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libavresample 3. 1. 0 / 3. 1. 0 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libswscale 4. 2.100 / 4. 2.100 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libswresample 2. 3.100 / 2. 3.100 Apr 15 19:59:20 raspberrypi3b homebridge[355]: libpostproc 54. 1.100 / 54. 1.100 Apr 15 19:59:21 raspberrypi3b homebridge[355]: Input #0, mpjpeg, from 'http://raspberrypi3b.local:8081': Apr 15 19:59:21 raspberrypi3b homebridge[355]: Duration: N/A, bitrate: N/A Apr 15 19:59:21 raspberrypi3b homebridge[355]: Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1024x768 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc Apr 15 19:59:21 raspberrypi3b homebridge[355]: Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (srtp://10.0.1.18:49806?rtcpport=49806&localrtcpport=49806&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. Apr 15 19:59:21 raspberrypi3b homebridge[355]: [swscaler @ 0x1ea81c0] deprecated pixel format used, make sure you did set range correctly Apr 15 19:59:21 raspberrypi3b homebridge[355]: [h264_omx @ 0x1e7a6f0] Using OMX.broadcom.video_encode Apr 15 19:59:21 raspberrypi3b homebridge[355]: Output #0, rtp, to 'srtp://10.0.1.18:49806?rtcpport=49806&localrtcpport=49806&pkt_size=1316': Apr 15 19:59:21 raspberrypi3b homebridge[355]: Metadata: Apr 15 19:59:21 raspberrypi3b homebridge[355]: encoder : Lavf57.56.101 Apr 15 19:59:21 raspberrypi3b homebridge[355]: Stream #0:0: Video: h264 (h264_omx), yuv420p, 1280x720 [SAR 3:4 DAR 4:3], q=2-31, 299 kb/s, 30 fps, 90k tbn, 30 tbc Apr 15 19:59:21 raspberrypi3b homebridge[355]: Metadata: Apr 15 19:59:21 raspberrypi3b homebridge[355]: encoder : Lavc57.64.101 h264_omx Apr 15 19:59:21 raspberrypi3b homebridge[355]: Stream mapping: Apr 15 19:59:21 raspberrypi3b homebridge[355]: Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (h264_omx)) Apr 15 19:59:21 raspberrypi3b homebridge[355]: Press [q] to stop, [?] for help Apr 15 19:59:22 raspberrypi3b homebridge[355]: frame= 4 fps=0.0 q=-0.0 size= 5kB time=00:00:00.06 bitrate= 575.2kbits/s speed=0.0987x Apr 15 19:59:23 raspberrypi3b homebridge[355]: frame= 7 fps=5.3 q=-0.0 size= 7kB time=00:00:00.16 bitrate= 330.6kbits/s speed=0.126x Apr 15 19:59:23 raspberrypi3b homebridge[355]: frame= 10 fps=5.2 q=-0.0 size= 9kB time=00:00:00.26 bitrate= 264.2kbits/s speed=0.138x Apr 15 19:59:24 raspberrypi3b homebridge[355]: frame= 13 fps=5.1 q=-0.0 size= 9kB time=00:00:00.36 bitrate= 202.8kbits/s speed=0.144x Apr 15 19:59:24 raspberrypi3b homebridge[355]: frame= 16 fps=5.0 q=-0.0 size= 16kB time=00:00:00.46 bitrate= 278.8kbits/s speed=0.147x
please use #50 for further discussion about streaming issues introduced by iOS 12.2
Streaming works intermittently on Mac OS Home App, but not on iOS (iPhone) and Apple Watch.
iOS (not streaming at all):
OS X Home App (streaming works intermittently):
Apple Watch (streaming with a green tinted screen):