ffmpeg -rtsp_transport tcp -i rtsp://192.168.1.245:6554/av0_0 -an -f null -
ffmpeg version 3.4.1-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.5) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/i386-linux-gnu --incdir=/usr/include/i386-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, rtsp, from 'rtsp://192.168.1.245:6554/av0_0':
Metadata:
title : streamed by the RTSP server
Duration: N/A, start: 1.400333, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x960, 15 fps, 15 tbr, 90k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
title : streamed by the RTSP server
encoder : Lavf57.83.100
Stream #0:0: Video: wrapped_avframe, yuv420p, 1280x960, q=2-31, 200 kb/s, 15 fps, 15 tbn, 15 tbc
Metadata:
encoder : Lavc57.107.100 wrapped_avframe
[null @ 0x815122c0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 380 >= 380
frame= 441 fps= 16 q=-0.0 Lsize=N/A time=00:00:29.06 bitrate=N/A speed=1.05x
video:169kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.
ffmpeg -rtsp_transport tcp -i rtsp://192.168.1.245:6554/av0_0 -an -f null -这个命令直接测试ffmpeg应该是没问题的。那么就是HASS本身路径有问题了。但是我不知道哪里定义了ffmpeg的默认路径。
配置文件这样设置的:
camera:
- platform: ffmpeg
input: -rtsp_transport tcp -i rtsp://192.168.1.245:6554/av0_0
# ffmpeg_bin: /usr/bin/avconv
ffmpeg_bin: '/usr/bin/ffmpeg'
extra_arguments: -pred 1 -q:v 2 -s 1280x720
name: haisi_ipc1
|