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

Clean transcoding when htsp based transcoding is used #1391

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Flole998
Copy link
Member

@Flole998 Flole998 commented Mar 1, 2021

@perexg There was an issue when HTSP clients like kodi used a transcoding profile (especially nvidia based profiles) so the transcoder was never cleaned up which caused more and more GPU memory to be used. This fixes it for me but I have absolutely no idea if this is a proper fix or if run should evaluate to true in this case and the cleanup code from above should be used instead. There is no profile sharer thread started in this case if I saw that correctly, so it should be correct that run evaluates to 0 but it could be that a profile sharer thread should be started in this case. Really not sure about this and I would appreciate if you could look over this and approve this or reject this is this is not a proper fix (and I believe that this is not a proper fix).

@Flole998 Flole998 requested a review from perexg March 1, 2021 02:36
@pinkflozd
Copy link

pinkflozd commented Mar 1, 2021

Helps with growing memory with vaapi encoding too, but tvheadend segfaults when a second user that watches the same channel stops playback

@Flole998
Copy link
Member Author

Flole998 commented Mar 1, 2021

Then this is not the correct implementation as I already assumed....

@Saentist
Copy link
Contributor

May be, because no one monitor session usage.
Session process must be keep alive until there is active client/s/ exist,
and terminated 2-5 sec after last leave.

@Flole998
Copy link
Member Author

A fix was provided at the Forum and I have updated this PR now to use that fix. Please check if this fix is better.

@pinkflozd
Copy link

Confirming it fixed, no memory buildup with htsp+vaapi

@susadmin
Copy link

I would just like to add +1 vote for adding this fix to the master branch as this (expanding GPU memory usage) is still happening for me. I have to use the fix-htsp-transcode branch until it is included.

@Flole998
Copy link
Member Author

This fix is not correct yet though. There's a potential race condition in it, so that needs fixing first.

@susadmin
Copy link

Ok thanks for the update and for all your hard work on this project.

@susadmin
Copy link

Hi. Just wondered if this fix can be added to the master branch yet? It would be really great as the master branch has some important fixes since the fix-htsp-transcode branch I am currently using . Thanks

@woooow1
Copy link

woooow1 commented Feb 1, 2024

@Flole998 changes that you made, works without any problems. If you decide, close this PR!

@Flole998
Copy link
Member Author

Flole998 commented Feb 1, 2024

What changes? I'm not aware of fixing this yet (or I forgot).

@woooow1
Copy link

woooow1 commented Feb 1, 2024

fc3759a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants