Open vraicovi opened 7 years ago
Please run:
ffmpeg -re -i rtsp://admin:password@192.168.1.32/Streaming/Channels/1 test.mp4
Than try to open test.mp4 on your iPhone/iPad device.
It was choppy, but it's a video from the camera. There were a lot of max delay reached and missed packets.
Here's the output from a three-second grab:
C:\Users\Administrator\Desktop>ffmpeg -re -i rtsp://admin:pass@192.168.1.36/Streaming/Channels/1 test.mp4 ffmpeg version N-87867-g0655810072 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx libavutil 55. 79.100 / 55. 79.100 libavcodec 57.108.100 / 57.108.100 libavformat 57. 84.100 / 57. 84.100 libavdevice 57. 11.100 / 57. 11.100 libavfilter 6.108.100 / 6.108.100 libswscale 4. 9.100 / 4. 9.100 libswresample 2. 10.100 / 2. 10.100 libpostproc 54. 8.100 / 54. 8.100 [udp @ 00000277f1b08ce0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required) [udp @ 00000277f1b098a0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required) Input #0, rtsp, from 'rtsp://admin:pass@192.168.1.36/Streaming/Channels/1': Metadata: title : Media Presentation Duration: N/A, start: 0.413067, bitrate: N/A Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1280x720, 15 fps, 15 tbr, 90k tbn, 30 tbc Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 00000277f382f500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 00000277f382f500] profile High, level 3.1 [libx264 @ 00000277f382f500] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'test.mp4': Metadata: title : Media Presentation encoder : Lavf57.84.100 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720, q=-1--1, 15 fps, 15360 tbn, 15 tbc Metadata: encoder : Lavc57.108.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Past duration 0.999992 too large 0kB time=00:00:00.00 bitrate=N/A dup=0 drop=4 speed= 0x Past duration 0.997658 too large Past duration 0.999657 too large Past duration 0.999321 too large 0kB time=00:00:00.00 bitrate=N/A dup=0 drop=5 speed= 0x Past duration 0.999657 too large [rtsp @ 00000277f1b06420] max delay reached. need to consume packetN/A dup=0 drop=5 speed= 0x [rtsp @ 00000277f1b06420] RTP: missed 439 packets [rtsp @ 00000277f1b06420] max delay reached. need to consume packet [rtsp @ 00000277f1b06420] RTP: missed 72 packets [h264 @ 00000277f3ff80c0] concealing 102 DC, 102 AC, 102 MV errors in P frame [rtsp @ 00000277f1b06420] max delay reached. need to consume packetN/A dup=0 drop=5 speed= 0x [rtsp @ 00000277f1b06420] RTP: missed 427 packets [h264 @ 00000277f32ebd20] error while decoding MB 67 39, bytestream -7 [h264 @ 00000277f32ebd20] concealing 462 DC, 462 AC, 462 MV errors in P frame [rtsp @ 00000277f1b06420] max delay reached. need to consume packetN/A dup=0 drop=5 speed= 0x [rtsp @ 00000277f1b06420] RTP: missed 531 packets [h264 @ 00000277f3ff80c0] error while decoding MB 27 23, bytestream -6 dup=0 drop=5 speed= 0x [h264 @ 00000277f3ff80c0] concealing 1782 DC, 1782 AC, 1782 MV errors in I frame [rtsp @ 00000277f1b06420] max delay reached. need to consume packetN/A dup=0 drop=5 speed= 0x [rtsp @ 00000277f1b06420] RTP: missed 528 packets [h264 @ 00000277f32ebd20] error while decoding MB 63 38, bytestream -13 [h264 @ 00000277f32ebd20] concealing 546 DC, 546 AC, 546 MV errors in P frame frame= 73 fps=8.7 q=-1.0 Lsize= 1754kB time=00:00:04.66 bitrate=3079.2kbits/s dup=45 drop=5 speed=0.559x video:1752kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098636% [libx264 @ 00000277f382f500] frame I:1 Avg QP:24.98 size:152152 [libx264 @ 00000277f382f500] frame P:18 Avg QP:19.66 size: 51653 [libx264 @ 00000277f382f500] frame B:54 Avg QP:25.59 size: 13183 [libx264 @ 00000277f382f500] consecutive B-frames: 1.4% 0.0% 0.0% 98.6% [libx264 @ 00000277f382f500] mb I I16..4: 58.1% 4.2% 37.7% [libx264 @ 00000277f382f500] mb P I16..4: 1.7% 5.5% 6.5% P16..4: 15.2% 8.4% 7.5% 0.0% 0.0% skip:55.2% [libx264 @ 00000277f382f500] mb B I16..4: 0.7% 0.1% 0.2% B16..8: 18.1% 5.3% 4.3% direct: 3.4% skip:67.9% L0:53.6% L1:36.8% BI: 9.6% [libx264 @ 00000277f382f500] 8x8 transform intra:26.5% inter:11.0% [libx264 @ 00000277f382f500] coded y,uvDC,uvAC intra: 99.6% 0.0% 0.0% inter: 17.1% 0.0% 0.0% [libx264 @ 00000277f382f500] i16 v,h,dc,p: 1% 2% 81% 16% [libx264 @ 00000277f382f500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 11% 27% 8% 8% 7% 9% 8% 13% [libx264 @ 00000277f382f500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 12% 24% 9% 8% 8% 8% 7% 10% [libx264 @ 00000277f382f500] i8c dc,h,v,p: 100% 0% 0% 0% [libx264 @ 00000277f382f500] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 00000277f382f500] ref P L0: 73.4% 9.3% 14.5% 2.8% [libx264 @ 00000277f382f500] ref B L0: 97.5% 2.4% 0.2% [libx264 @ 00000277f382f500] ref B L1: 96.7% 3.3% [libx264 @ 00000277f382f500] kb/s:2948.69 Exiting normally, received signal 2.
I have a Windows home media server that also doubles as my homebridge server. When I try to add the camera as an accessory, I get 'Couldn't add FrontWalkway', which is the name of the camera.
My config.json:
The camera loads:
I even allowed port 62676 through the Windows firewall as part of my Homebridge rule.
Edit: I noticed that the port changed every time I restarted Homebridge. Just to eliminate the firewall completely, I shut it down and restarted homebridge. Adding the camera still fails.
Running ffmpeg from the command prompt yields:
The stream plays fine in VLC.
Any ideas?