Ffmpeg error with Dafang camera [haffmpeg.tools] Timeout reading image

trying to add a dafang camera in HA. here is the configuration

  - platform: ffmpeg
    name: DaFang3
    input: '-rtsp_transport tcp -i rtsp://'
    extra_arguments: '-q:v 2 -r 15 -vf "scale=1280:720"'

I also tried without quote

      - platform: ffmpeg
        name: DaFang3
        input: -rtsp_transport tcp -i rtsp://
        extra_arguments: -q:v 2 -r 15 -vf scale=1280:720

HA gives me the following error

2018-09-20 20:32:37 WARNING (MainThread) [haffmpeg.tools] Timeout reading image.

Nothing shows up for the camera.
Looks like ffmpeg is not running in my HA 0.78.
I can vlc rtsp:// just fine.
also try to find the ffmpeg bin path in HA but no luck…did not know how to run ffmpeg with hassio :frowning:

Any help would be appreciated!

have you tried removing the -rtsp_transport tcp? When I add -rtsp_transport tcp, I get a timeout and I’ve actually crashed my dry a couple times trying to use tcp.

thanks, man. Just tried that, but no luck.
Do you know how to execute ffmpeg in hassio command line?

It’s already preinstalled.

Do you know how to execute ffmpeg in hassio command line then? I am trying to debug the issue however cannot get started…:frowning:

Same issue for me… I’m using the latest hassio and HA 0.73.2 - the camera randomly works if I keep refreshing the page, but most of the time I get timeout error and the HA page shows ‘image unavailable’ for the camera.

At the same time I can connect via VLC to the RTSP stream just fine, I don’t think it’s a load issue as my Hassio is running on a Xeon server and CPU is barely touched.

I’m looking into just using auto refreshing snapshots to avoid ffmpeg all together.

I also can’t get it to work

same here, just says “image not available”

same here … works sometimes but mostly does not logs shows
2018-11-12 16:29:16 WARNING (MainThread) [haffmpeg.tools] Timeout reading image.
while accessing the same stream with vlc always works fine

Same here, stream works fine in VLC

@lolouk44 Can you please have a look at this?

I have the same problem and is directly linked to turning MQTT support on in the camera.
I have no idea why, since the RTSP stream looks identical regardsless of MQTT on/off.

See this thread for more information:

Sorry no idea. I’ve not updated the firmware on either of my DaFang in months and I have no issues with mqtt and video. I don’t use motion detecting though as I do this via motion and the stream in HA is also from motion, not direct from RTSP…