FFmpeg error "ERROR:haffmpeg.core:FFmpeg isn't running!"

Hi i can’t figure out how to get ha-ffmpeg to work. I builded it succesfuly on rpi2b and my config is as follows

    camera:
     - platform: ffmpeg
        input: rtsp://admin:[email protected]/stream2
        name: FFmpeg
        extra_arguments: -rtsp_transport tcp -analyzeduration 15

I tested it using this command and it works just fine.

ffmpeg -rtsp_transport tcp -analyzeduration 15 -i rtsp://admin:[email protected]/stream2 -an -f null -

Althoght it some times give an error like this:

[null @ 0x2f57b10] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6174 >= 6174
    Last message repeated 1 times

On my ha log i see following messages

INFO:homeassistant.loader:Loaded camera.ffmpeg from homeassistant.components.camera.ffmpeg
INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: new_state=<state camera.ffmpeg=idle; entity_picture=/api/camera_proxy/camera.ffmpeg?to                                                                                         ken=1894426928, friendly_name=FFmpeg, access_token=1894426928 @ 2016-09-06T05:24:19.531882+02:00>, entity_id=camera.ffmpeg, old_state=None>
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=camera>

INFO:homeassistant.components.http:Serving /api/camera_proxy/camera.ffmpeg to 192.168.1.188 (auth: True)
ERROR:haffmpeg.core:FFmpeg isn't running!

What has gone wrong i think i’ve done everything right?

Hi, @Wiktor_Grochal

Did you ever find a solution to this? I am running into the same problem.

if u ask did i got it to work then yes, but its not working as i would wish it to and the library owner says that it is problem with home assistant, more about that on this thread:
https://github.com/pvizeli/ha-ffmpeg/issues/2

my code at the moment:

camera:
  - platform: ffmpeg
    input: -rtsp_transport tcp -i rstp_streram_adress
    name: Tyl
    ffmpeg_bin: /usr/local/bin/ffmpeg
    extra_arguments: -q:v 2
  - platform: ffmpeg
    input: -rtsp_transport tcp -i rstp_streram_adress
    name: Front
    ffmpeg_bin: /usr/local/bin/ffmpeg
    extra_arguments: -q:v 2

it works but the video plays for only about 10 s and then freezes, let me know if thats the same with you

1 Like

@Wiktor_Grochal Well, i’m getting a different error now that I am using your string for input.

16-09-16 18:20:07 haffmpeg.tools: Timeout reading image.

And here is the line in my config currently. I am using D-Link DCS-935L cameras.

  - platform: ffmpeg
    input: -rtsp_transport tcp -i rtsp://xxxx:[email protected]/play1.sdp
    name: FFmpeg
    ffmpeg_bin: /usr/bin/ffmpeg
    extra_arguments: -q:v
1 Like

try with this config, it worked for me

camera 1:
  - platform: ffmpeg
    ffmpeg_bin: /usr/bin/avconv
    name: Camera
    input: -rtsp_transport tcp -i rtsp://user:[email protected]:554/Streaming/channels/102
    extra_arguments: -pred 1 -q:v 2

I have a camera just like the one you have and I like to know how you got it into HA … I can only use it using the apps or through the browser… I notice when I type in the IP address into the browser it asking for a user and a password. I tried my app password but that does not work… IS there a default password other than the app password?

maybe you can tell me your steps so I can try to get my D-Link DCS-935L wifi camera into ha

https://home-assistant.io/components/binary_sensor.ffmpeg_noise/ this is confusing to me so maybe you can dum it down a bit for me on how to install the FFmpeg and adding the wifi cam

hi @Roystervi

The username by default is admin and the password is blank if trying to log in to the web interface via your browser. You can chance the password once you are logged in.

I just tried to sign in using 192.168.0.104 and its not letting me in anymore I waited and reserch this info now I got it its not bringing up the login info anymore shocks

  • platform: ffmpeg
    input: -rtsp_transport tcp -i rtsp://xxxx:[email protected]/play1.sdp
    name: FFmpeg
    ffmpeg_bin: /usr/bin/ffmpeg
    extra_arguments: -q:v
  1. the xxxxxxxxx mean the password?
  2. when i go into the /usr/bin/ffmpeg directory… I don’t see ffmpeg why is that you know
  3. when I try to install this, I get an error…I use the sudo su and I think I was able to install but get this error
    pi@Music_server:~ $ sudo echo “deb http://ftp.debian.org/debian jessie-backports main” >> /etc/apt/sources.list
    -bash: /etc/apt/sources.list: Permission denied

any idea what I am doing wrong ?