teddyx
(teddyx)
April 12, 2022, 10:45pm
1
Hi ,
I am using generic camera integration. I have a rtsp stream link this works in vlc player but when I tried to use with generic camera integration card. I don’t see the feed .I also added camera platform generic in configuration yml file still the same. What could be wrong with the configuration?
Does it require username & password? Currently those have to be encoded into the url.
teddyx
(teddyx)
April 13, 2022, 11:59am
3
No it doesn’t need password. It’s all in same network
Please could you view the log output when you try to view a stream and paste it here?
It looks like HA thinks the data is invalid. Just to be sure there are no typos, could you copy and paste the command below and provide the output text?
ffplay -loglevel verbose rtsp://127.0.0.8:8554/parkinggarage/subStream
You may need to install ffplay, and if you are running on windows it will be c:\path\to\executable\ffplay.exe
teddyx
(teddyx)
April 14, 2022, 7:36pm
7
The ip was wrong i corrected it but still the same error. Here is the log from ffplay
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=–static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220414
libavutil 57. 24.101 / 57. 24.101
libavcodec 59. 26.100 / 59. 26.100
libavformat 59. 22.100 / 59. 22.100
libavdevice 59. 6.100 / 59. 6.100
libavfilter 8. 31.100 / 8. 31.100
libswscale 6. 6.100 / 6. 6.100
libswresample 4. 6.100 / 4. 6.100
libpostproc 56. 5.100 / 56. 5.100
Initialized direct3d renderer.
[tcp @ 000001b01a2bb5c0] Starting connection attempt to 192.168.6.236 port 8554
[tcp @ 000001b01a2bb5c0] Successfully connected to 192.168.6.236 port 8554
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
Do you see any video with ffplay? Does it show any errors on the console?
teddyx
(teddyx)
April 14, 2022, 7:43pm
9
No i tried in the console and this is all message i get
teddyx
(teddyx)
April 14, 2022, 7:44pm
10
I am able to use the link in VLC player and able to stream it
teddyx
(teddyx)
April 14, 2022, 7:48pm
11
I think homeassistant is using the ffmpeg library underneath to handle streams. So if you can’t get your stream to play using ffplay, then I expect it is unlikely to work in homeassistant.
It could be that vlc is more tolerant of strange streams or more able to dynamically work out what to do than ffmpeg. My recommendation is to experiment with ffplay until you can see something, then move on to homeassistant.
Here is some example output from ffplay; it opens a window and I can see the live camera feed.
$ ffplay -loglevel verbose rtsp://xxxxx@xxxxx:192.168.0.11/play1.sdp
ffplay version 4.2.4-1ubuntu0.1 Copyright (c) 2003-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Initialized opengl renderer.
[tcp @ 0x7fcb4c002fc0] Starting connection attempt to 192.168.0.11 port 554
[tcp @ 0x7fcb4c002fc0] Successfully connected to 192.168.0.11 port 554
[rtsp @ 0x7fcb4c000bc0] SDP:aq= 0KB vq= 0KB sq= 0B f=0/0
v=0
o=CV-RTSPHandler 1123412 0 IN IP4 192.168.0.11
s=TV-IP572P
c=IN IP4 192.168.0.11
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 99
a=rtpmap:99 H264/90000
a=fmtp:99 profile-level-id=42A01E;packetization-mode=1;sprop-parameter-sets=Z0IAKOkAoAy1xIAG3dAAzf5gDYgQlA==,aM4xUg==
a=control:trackID=1
a=sendonly
m=audio 0 RTP/AVP 127
a=rtpmap:127 mpeg4-generic/8000/1
a=fmtp:127 streamtype=5; profile-level-id=15; mode=AAC-hbr; sizeLength=13; indexLength=3; indexDeltalength=3; config=1588; CTSDeltaLength=0; DTSDeltaLength=0;
a=control:trackID=2
[rtsp @ 0x7fcb4c000bc0] setting jitter buffer size to 5000B f=0/0
Last message repeated 1 times
[h264 @ 0x7fcb4c004980] Reinit context to 1280x800, pix_fmt: yuvj420p
Input #0, rtsp, from 'rtsp://xxxxx:[email protected] /play1.sdp':
Metadata:
title : TV-IP572P
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), 1 reference frame, yuvj420p(pc, progressive, left), 1280x800, 15 fps, 30 tbr, 90k tbn, 30 tbc
Stream #0:1: Audio: aac (LC), 8000 Hz, mono, fltp
[ffplay_abuffer @ 0x7fcb4c06a380] tb:1/8000 samplefmt:fltp samplerate:8000 chlayout:0x4
[ffplay_abuffersink @ 0x7fcb4c062c00] auto-inserting filter 'auto_resampler_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[auto_resampler_0 @ 0x7fcb4c480200] ch:1 chl:mono fmt:fltp r:8000Hz -> ch:1 chl:mono fmt:s16 r:8000Hz
[h264 @ 0x7fcb4c130bc0] Reinit context to 1280x800, pix_fmt: yuvj420p
[ffplay_abuffer @ 0x7fcb30004f40] tb:1/8000 samplefmt:fltp samplerate:8000 chlayout:0x4
[ffplay_abuffersink @ 0x7fcb30006400] auto-inserting filter 'auto_resampler_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[auto_resampler_0 @ 0x7fcb30007ac0] ch:1 chl:mono fmt:fltp r:8000Hz -> ch:1 chl:mono fmt:s16 r:8000Hz
[ffplay_buffer @ 0x7fcb244d0c00] w:1280 h:800 pixfmt:yuvj420p tb:1/90000 fr:15/1 sar:0/1 sws_param:
[auto_scaler_0 @ 0x7fcb244d5580] w:iw h:ih flags:'bicubic' interl:0
[ffplay_buffersink @ 0x7fcb244d42c0] auto-inserting filter 'auto_scaler_0' between the filter 'ffplay_buffer' and the filter 'ffplay_buffersink'
[swscaler @ 0x7fcb244d6980] deprecated pixel format used, make sure you did set range correctly
[auto_scaler_0 @ 0x7fcb244d5580] w:1280 h:800 fmt:yuvj420p sar:0/1 -> w:1280 h:800 fmt:yuv420p sar:0/1 flags:0x4
Created 1280x800 texture with SDL_PIXELFORMAT_IYUV.