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

Optimize nginx & recordings #4688

Merged
merged 18 commits into from
Dec 17, 2022

Conversation

NickM-27
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 commented Dec 12, 2022

• Use faststart for recordings segments
• Use threading in nginx
• Reload video on first error while viewing recordings

@netlify
Copy link

netlify bot commented Dec 12, 2022

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 244fcfa
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/639e32c598f04a0008408d28

@blakeblackshear
Copy link
Owner

A couple tings we should look into:

  • providing keyFrameDurations for the clips from the database (would need to add a field to the db)
  • using the concat clip type

@blakeblackshear
Copy link
Owner

I don't think keyFrameDurations looks useful. Maybe setting discontinuity to false could be helpful.

@NickM-27
Copy link
Sponsor Collaborator Author

I don't think keyFrameDurations looks useful. Maybe setting discontinuity to false could be helpful.

Isn't it already false? https://github.com/blakeblackshear/frigate/blob/dev/frigate/http.py#L1139 or do you mean setting that somewhere else too?

@NickM-27
Copy link
Sponsor Collaborator Author

Tried out concat but it doesn't seem to make a difference, also found this: kaltura/nginx-vod-module#264 (comment)

Concat filter is very similar to using multiple clips with discontinuity set to false, the added value it provides is that the duration of the mp4s can be different across different sequences.

So seems it may not be relevant since we only have one sequence

@NickM-27 NickM-27 marked this pull request as ready for review December 13, 2022 21:56
@NickM-27 NickM-27 changed the title Optimize nginx & recordings Optimize nginx & recordings, use DASH instead of HLS Dec 13, 2022
@NickM-27 NickM-27 changed the title Optimize nginx & recordings, use DASH instead of HLS Optimize nginx & recordings Dec 15, 2022
@NickM-27
Copy link
Sponsor Collaborator Author

Can't move forward with DASH as it is not supported on iOS

@NickM-27 NickM-27 force-pushed the improve-recordings branch 2 times, most recently from acefa85 to 87131c2 Compare December 15, 2022 14:47
Copy link
Owner

@blakeblackshear blakeblackshear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other thing we could do is prefetch the next hour's playlist ahead of time so VOD will populate the metadata cache. That may get rid of the loading when going to the next hour during playback.

frigate/record.py Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docker/rootfs/usr/local/nginx/conf/nginx.conf Outdated Show resolved Hide resolved
@blakeblackshear blakeblackshear merged commit 3692993 into blakeblackshear:dev Dec 17, 2022
@NickM-27 NickM-27 deleted the improve-recordings branch December 18, 2022 00:36
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.

None yet

2 participants