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

ai/live: Cancel ffmpeg exec when segmenter exits. #3367

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Conversation

j0sh
Copy link
Collaborator

@j0sh j0sh commented Jan 23, 2025

This prevents ffmpeg from reading indefinitely when there is no segment handling attached. That in turn can lead to disk filling up since ffmpeg writes segments to disk without removing them.

Also use context logging for some segmenter error messages.

Couldn't quite reproduce the buggy behavior we see in prod in order to completely verify this fix locally but I think this should be close enough for some cases.

This prevents ffmpeg from reading indefinitely when there is no
segment handling attached. That in turn can lead to disk filling up
since ffmpeg writes segments to disk without removing them.

Also use context logging for some segmenter error messages.
@j0sh j0sh requested review from victorges, leszko and mjh1 January 23, 2025 06:57
@github-actions github-actions bot added the go Pull requests that update Go code label Jan 23, 2025
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 33.71714%. Comparing base (3e94431) to head (4fb7691).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
media/rtmp2segment.go 0.00000% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #3367         +/-   ##
===================================================
- Coverage   33.71894%   33.71714%   -0.00180%     
===================================================
  Files            141         141                 
  Lines          37430       37432          +2     
===================================================
  Hits           12621       12621                 
- Misses         24088       24090          +2     
  Partials         721         721                 
Files with missing lines Coverage Δ
media/rtmp2segment.go 0.00000% <0.00000%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e94431...4fb7691. Read the comment docs.

Files with missing lines Coverage Δ
media/rtmp2segment.go 0.00000% <0.00000%> (ø)

@mjh1 mjh1 merged commit a1800dc into master Jan 23, 2025
20 checks passed
@mjh1 mjh1 deleted the ja/cancel-ffmpeg branch January 23, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants