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

Add ability to restream birdseye #4761

Merged
merged 13 commits into from
Dec 31, 2022

Conversation

NickM-27
Copy link
Collaborator

No description provided.

@netlify
Copy link

netlify bot commented Dec 20, 2022

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 676986e
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/63af1c80470bf00008cd713d

@TestUser0000000001
Copy link

Yay! Excited for this feature to be baked in, had to do some voodoo magic before with puppeteer to have this done. keep up the good work.

@blakeblackshear
Copy link
Owner

I think we can use a named pipe to pass rawvideo data to go2rtc. This would avoid the extra encoding work to mpeg1.

I was able to get it to work in theory with the following:

Create a named pipe with mkfifo /tmp/birdseye. There is os.mkfifo in python as well.

go2rtc config:

streams:
  pipe: exec:ffmpeg -hide_banner -f rawvideo -pix_fmt yuv420p -s 1280x720 -i /tmp/birdseye -tune zerolatency -preset ultrafast -c:v libx264 -rtsp_transport tcp -f rtsp {output}

Use ffmpeg to write rawvideo frames to the named pipe with

ffmpeg -re -stream_loop -1 -i /workspace/airport.mp4 -pix_fmt yuv420p -f rawvideo pipe: > /tmp/birdseye

The ffmpeg process will block until go2rtc starts reading.

I think we should be able to write the same raw yuv frame data to the named pipe with python, but it may be tricky to figure out the blocking IO part while go2rtc isnt running.

This is another situation where zmq would probably be helpful for inter-process communication.

@blakeblackshear blakeblackshear merged commit ff56262 into blakeblackshear:dev Dec 31, 2022
@NickM-27 NickM-27 deleted the birdseye-restream branch January 11, 2023 21:58
@Majestic7979
Copy link

Majestic7979 commented Oct 4, 2023

I am trying to find a way to pull birdseye but I don't seem to do so. When I click the netlify log above, it says it failed... so was this even implemented? Not clear to me.

According to docs for 0.13:

https://deploy-preview-6262--frigate-docs.netlify.app/configuration/restream

It should work... but it doesn't. Birdseye actually shows up normally on my Frigate UI.
If I try to play back on VLC I get nothing. Using the same URL for my normal cameras, I do get the camera stream, so obviously something wrong with just Birdseye restream.

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

Successfully merging this pull request may close these issues.

Ability to restream birdseye view Expose Birdseye view as a "camera" in the api
4 participants