blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.05k stars 1.74k forks source link

[Support]: Birdseye doesn't cast to chromecast #5038

Closed atv2016 closed 1 year ago

atv2016 commented 1 year ago

Describe the problem you are having

So birdseye works fine in VLC. I get regular 1080P rtsp streams fine on chromecast (first gen) so i know that works.

But somehow birdseye RTSP fails to display on chromecast. It just sits there with the Dashcast logo and does not continue.

Is there anyway to resolve this ? I tried adjusting the quality from 1-30, changing the resolution, no go. Maybe reencode it to another format in restream: section ?

Any help would be most appreciated, i would love to have this display on my tv.

Version

Beta-12

Frigate config file

N/A

Relevant log output

N/A

FFprobe output from your camera

N/A

Frigate stats

N/A

Operating system

HassOS

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Dahua

Any other information that may be helpful

N/A

NickM-27 commented 1 year ago

This isn't really related to frigate directly. Have you tried other cameras? Have you tried other chrome casts?

I'd think this would be an issue posted on the WebRTC integration if it's not working for you because the birdseye stream itself is working as expected.

blakeblackshear commented 1 year ago

I'm guessing this is due to a missing audio stream. I believe for chromecast, you have to have at least an empty aac audio stream.

blakeblackshear commented 1 year ago

https://github.com/blakeblackshear/frigate/issues/3175#issuecomment-1114888000

atv2016 commented 1 year ago

I don't necessarily agree it doesn't have to do with frigate, frigate creates the RTSP stream, and yes it works on VLC but not on Chromecast, whereas other RTSP streams do. Must have something to do with encoding.

I'd rather not buy new chrome casts for all my TV's, especially since i had good results with Gen 1 and not with Gen3 (which is expensive!))

atv2016 commented 1 year ago

@blakeblackshear Where would i put this missing audio stream, can i configure it just for birdseye or would i need to add it to all RTSP streams?

NickM-27 commented 1 year ago

So to confirm, other cameras from Frigate do stream as expected?

atv2016 commented 1 year ago

In frigate i see all the cameras. I haven't actually played around with restream yet, but if i put in a normal RTSP url in Dashcast it displays it fine on the chromecast.

NickM-27 commented 1 year ago

In frigate i see all the cameras. I haven't actually played around with restream yet, but if i put in a normal RTSP url in Dashcast it displays it fine on the chromecast.

Okay, well as soon as you can confirm that other frigate restream cameras work with dashcast then that will be helpful to understand, otherwise the issue could be upstream

NickM-27 commented 1 year ago

I think the webrtc integration casts a webpage so it can show webrtc (as opposed to casting the stream directly), so audio may not be the issue here. If it is though we can add an empty audio track to the birdseye stream.

atv2016 commented 1 year ago

I guess if i use:

output_args:
  record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
  rtmp: -c:v copy -c:a aac -f flv

For birdseye i need to apply to every ffmpeg process ? Or is there a global output_args i can set ?

NickM-27 commented 1 year ago

RTMP has nothing to do with this, RTMP is deprecated and not recommended anymore. There is 0 ability for you as a user to add audio to the birdseye stream as it is today. Like I said previously you need to confirm whether casting a restreamed normal camera in frigate works, then we can proceed.

NickM-27 commented 1 year ago

I just tried loading a normal camera with dashcast and it did not work. Also can confirm that dashcast works by casting an html page so audio shouldn't be an issue.

This seems like a webRTC integration issue and not a frigate issue

20230112_073619.jpg

atv2016 commented 1 year ago

Interesting.

Apart from me figuring out the casting thing, can i not bypass webrtc and just RTSP the stream to chromecast without using Dashcast? I just use Dashcast/Webcast because it allows me to RTSP, but probably there is a different integration to use ?

NickM-27 commented 1 year ago

If you are using the frigate integration (4.0 beta) then you can try casting the camera entity directly using the built in HA media player to see if that works.

atv2016 commented 1 year ago

I'll try that, but i believe using the camera entity previously was very slow. Like a minute delay or so. Only direct RTSP i got near realtime.

Maybe this is why birdseye is also not happening. I remember yesterday actually, i did cast it up to the birdseye screen showing, but it was just not moving at all (like a static image almost).

NickM-27 commented 1 year ago

I'll try that, but i believe using the camera entity previously was very slow. Like a minute delay or so. Only direct RTSP i got near realtime.

Maybe this is why birdseye is also not happening. I remember yesterday actually, i did cast it up to the birdseye screen showing, but it was just not moving at all (like a static image almost).

That's a reason to use webrtc, because the default casting uses HLS which is very slow. There is nothing we can do about that.

atv2016 commented 1 year ago

If i setup restreams for RTSP in frigate, would that change things? and use Webrtc ?

atv2016 commented 1 year ago

Maybe i should just try with a newer Chromecast again.

NickM-27 commented 1 year ago

hold on, if you have not setup restreams for rtsp in frigate then there is absolutely 0 chance the birdseye can be streamed and that makes this whole conversation very confusing

atv2016 commented 1 year ago

Ah. My bad, i didn't know that was a requirement.

NickM-27 commented 1 year ago

In the future you should always include your config so it's easy to spot problems like that.

atv2016 commented 1 year ago

Yes you are right, i will do. I didn't see it documented anywhere as a requirement for birdseye rtsp viewing, so i didn't configure it.

Anyway, this seems to have fixed everything - It's all working now.

If i use the frigate camera entities to stream or record, i think you mentioned they don't use restream natively and use HLS ? I guess in the future that would be nice if somehow they would, but not sure if possible.

NickM-27 commented 1 year ago

If i use the frigate camera entities to stream or record, i think you mentioned they don't use restream natively and use HLS ? I guess in the future that would be nice if somehow they would, but not sure if possible.

Recording is not HLS, streaming is

Tell that to HomeAssistant devs, nothing we can do about it.

NickM-27 commented 1 year ago

Also to be clear all of this is documented as needing RTSP restream

Screen Shot 2023-01-12 at 15 04 25 PM