Ffmpeg live stream not work

Hi, I have a Yi Dome camera (1080p PTZ) and I’m trying to use it with live stream.
Live stream work prefect with all applications like vlc and others but NOT work on home assistant.
The stream window remain blank and not see any image in streaming.
My configuration is:

In configuration.yaml:

  javascript_version: latest

  ffmpeg_bin: /usr/bin/ffmpeg
  - platform: ffmpeg
    name: camera
    input: rtsp://

in lovelace card:

camera_view: live
entity: camera.camera
type: picture-entity

Two suggestions:
include the username and password items

  - platform: ffmpeg
    name: Sunroom
    username: your_username
    password: your_password
    authentication: digest

and include appropriate ffmpeg options in your input: line

input: -x -y -z rtsp://

It’s been a while since I used ffmpeg for cameras, so I don’t recall the actual command line options. :frowning: One last option may be to include the username:password in the rtsp: URL

input: rtsp://username:[email protected]/ch0_1.h264


input: -x -y -z rtsp://

What the value to insert in -x -y -z ???

However the problem not is in login and password elements.

These are ffmpeg command-line arguments. They are whatever arguments you would need if using ffmpeg on your desktop to view the stream. Here is an example config from github:

- platform: ffmpeg
  name: IP camera oprit
  input: !secret ip_camera_oprit_stream
  extra_arguments: '-q:v 1 -r 25 -vf "scale=640:360"'

hope this helps! just in case it doesn’t, check out the FFMPEG troubleshooting page.


I tried with:

- platform: ffmpeg
  name: camera
  input: rtsp://
  extra_arguments: '-q:v 1 -r 25 -vf "scale=640:360"'

Unfortunately it doesn’t work on my yi dome camera
I tried to lunch:

time ffmpeg rtsp:// -an -frames:v 1 -y -c:v mjpeg -loglevel verbose test.jpg

and the result is:

libavutil      56. 22.100 / 56. 22.100
libavcodec     58. 35.100 / 58. 35.100
libavformat    58. 20.100 / 58. 20.100
libavdevice    58.  5.100 / 58.  5.100
libavfilter     7. 40.101 /  7. 40.101
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100
libpostproc    55.  3.100 / 55.  3.100

Output #0, h264, to ‘rtsp://’:
Output file #0 does not contain any stream

Do not work till now? It must be ok now