Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg not running in hassio #22

Open
marcgarciamarti opened this issue Aug 22, 2018 · 11 comments
Open

ffmpeg not running in hassio #22

marcgarciamarti opened this issue Aug 22, 2018 · 11 comments

Comments

@marcgarciamarti
Copy link

Hello @pvizeli ,

I'm posting the log here as per your request: https://pastebin.com/wpAG3SL0

Thanks a million,

@pvizeli
Copy link
Member

pvizeli commented Aug 30, 2018

Can you set the debug on in homeassistant configuraton for logger component? Thanks

@marcgarciamarti
Copy link
Author

marcgarciamarti commented Aug 30, 2018

Hello @pvizeli,

this is the configuration I just enabled in Hassio. I have two (but not the same model) Revotech onvif compatible cameras, but none of them work with Hassio. PIR camera 02 does work with Shinobi though, but the cpu load reaches 50% easily.

  - platform: ffmpeg 
    name: 'PIR camera 01'
    input: -rtsp_transport udp -i rtsp://guest:[email protected]:554/live0.264
    extra_arguments: -rtsp_transport udp
  - platform: onvif
    name: 'PIR camera 02'
    host: 192.168.1.33
    username: admin
    port: 80

and this is the logger configuration:

logger:
  default: debug
  logs:
    urllib3.connectionpool: fatal

This is what I see when I click on the cameras: https://pastebin.com/Muqm5jGf

@IIIdefconIII
Copy link

I experience the same:

i still having a fight to set this up correctly. Frontend give me a kitchen (image not available).
When i click on it there is no feed.

log:

2018-09-01 14:56:52 WARNING (MainThread) [haffmpeg.core] FFmpeg isn't running!

ffmpeg -an -i "rtsp://10.3.1.9:554/rtsp_live0" -f null -
in cmd works perfectly.
but in home assistant it doesnt.

cameras.yaml

- platform: ffmpeg
  input: -an -i "rtsp://10.3.1.9:554/rtsp_live0"-
  name: Kitchen
  authentication: true

configuration.yaml

ffmpeg:
  ffmpeg_bin: 'C:\ffmpeg\bin\ffmpeg.exe'

camera: !include cameras.yaml

@IIIdefconIII
Copy link

i had a typo:

#Cameras

  • platform: ffmpeg
    input: -an -i "rtsp://10.3.1.9:554/rtsp_live0"
    name: Kitchen
    authentication: true

@marcgarciamarti
Copy link
Author

@pvizeli any additional input that I may provide to further figure out what is going on? Many thanks

@pvizeli
Copy link
Member

pvizeli commented Sep 17, 2018

I don't see that the camera will call the open:
https://github.com/pvizeli/ha-ffmpeg/blob/master/haffmpeg/core.py#L107

@marcgarciamarti
Copy link
Author

@pvizeli de ffmpeg component is already in my configuration file and the configuration of my two cameras is written above. Sorry if your message suggest something very obvious, but I'm not sure how to continue figuring out what is going on. Care to be a bit more specific?

@marcgarciamarti
Copy link
Author

@pvizeli asking again for guidance. Not really sure what your indications was.

@techdoutdev
Copy link

I’m having a similar issue. Trying to get an ffmpeg binary noise sensor working in hassio. Worked without issue in hassbian. The sensor never fully loads, and I get an ffmpeg not running on occasion.

@fcollingwood
Copy link

Not working in Hassio 0.82:

2018-11-13 22:25:05 WARNING (MainThread) [haffmpeg.core] FFmpeg isn't running!

@gerardvd
Copy link

gerardvd commented Mar 9, 2023

bug in (at least) the camery.py code:
For my case, it needs an option to add something like "CONF_EXTRA_PRE_INPUT_ARGUMENTS",
since the "rtsp_transport" option needs to go before the "input source" argument.

On my local installation, I just did a quick-n-dirty, hard-coded fix in the camera.py file, adding my "rtsp_transport" argument before the "input sources":

return await ffmpeg.async_get_image(
     self.hass,
     "-rtsp_transport tcp -i " + self._stream_uri,
     extra_cmd=self.device.config_entry.options.get(CONF_EXTRA_ARGUMENTS),
     width=width,
     height=height,
)

Note that "haffmpeg" acts differently depending on the number of words in the "input" parameter; when it's:

  1. only stream_uri (one word): it will prepend with "-i", resulting in argument "-i <stream uri>"
  2. multiple words: it will take the string as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants