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

Home Assistant Integration #50

Open
tunerooster opened this issue Sep 4, 2022 · 3 comments
Open

Home Assistant Integration #50

tunerooster opened this issue Sep 4, 2022 · 3 comments

Comments

@tunerooster
Copy link

tunerooster commented Sep 4, 2022

Is it possible to use this application to stream .mp4 files to Home Assistant?

I am currently using AlexIT/WebRTC to stream from a camera (rtsp feed) and it is fast and smooth.

To stream an mp4 I am using <video src="https://...file.mp4">. It works but is very slow and choppy.

I am looking for an mp4 alternative which is smooth and fast. I currently use javascript to build custom html to stream to the video element, so I am hopeful that I can just replace the https://file.mp4 with a connection to an RTSPtoWSMP4f server.

But I don't want to try if it is not possible. If is is doable, any tips would be greatly appreciated.

Can anyone please advise? Thanks!

@deepch
Copy link
Owner

deepch commented Sep 4, 2022

use mp4f and http server and write function

@tunerooster
Copy link
Author

tunerooster commented Sep 5, 2022

use mp4f and http server and write function

Is this what you mean by "use http server": (config.json)


  "server": {
    "http_port": ":8083"
  },
  "streams": {
    "H264_AAC": {
      "on_demand": false,
      "url": "https://mydomain.com/local/SampleVideo_1280x720_5mb.mp4"
    }
  }
}

When I run:
GO111MODULE=on go run *.go
I get the following:

[GIN-debug] Listening and serving HTTP on :8083
2022/09/04 18:23:47 dial tcp 174.10.17.169:554: i/o timeout
2022/09/04 18:23:48 H264_AAC Stream Try Connect
...Repeats indefinitely
  • The above IP address is not the real one.

NOTE: I have only HTTPS access to the server. Do I need something additional for HTTPS?

ALSO, I don't understand what you mean by: use "write function". Please elaborate a bit...

Thanks for your help!

P.S. If https is not supported, I am wondering if "file:" protocol is/could be supported? E.g.,

"url": "file:///home/homeassistant/SampleVideo_1280x720_5mb.mp4"

@tunerooster
Copy link
Author

Anyone?

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

2 participants