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

Throttle Transcode doesnt work #2919

Closed
RandomDelta6 opened this issue Apr 19, 2020 · 28 comments
Closed

Throttle Transcode doesnt work #2919

RandomDelta6 opened this issue Apr 19, 2020 · 28 comments
Labels
bug Something isn't working

Comments

@RandomDelta6
Copy link

RandomDelta6 commented Apr 19, 2020

Describe the bug
Throttle transcode isn't working. Transcoding stops only after the entire media has been transcoded. [Orange bar way ahead of blue].Throttle transcode box is checked and am using quicksync acceleration.

System (please complete the following information):

  • OS: Windows 10
  • Virtualization:no
  • Clients: android 9
  • Browser: [e.g. Firefox 72, Chrome 80, Safari 13]
  • Jellyfin Version: 10.5.4 stable
  • Playback:Transcode
  • Installed Plugins:none
  • Reverse Proxy: none
  • Base URL:none
  • Networking: none
  • Storage: local

To Reproduce
playback any hevc video on web browser like chrome

Expected behavior
transcode should stop after a little while,instead it is continuing putting unwanted strain on system

Logs
n/a

Screenshots
Annotation 2020-04-19 171921

@RandomDelta6 RandomDelta6 added the bug Something isn't working label Apr 19, 2020
@Artiume
Copy link
Contributor

Artiume commented Apr 19, 2020

The throttler is only with Software Transcoding, not Hardware Transcoding.

@RandomDelta6
Copy link
Author

RandomDelta6 commented Apr 19, 2020

it used to work fine in version 10.4.
so. I think throttle transcode throttles it whether harware acceleration is on or not

@Artiume
Copy link
Contributor

Artiume commented Apr 19, 2020

It didn't exist in 10.4. Please see #2258 and it is specifically disabled for HWA.

@RandomDelta6
Copy link
Author

ok. Thanks.
Maybe consider enabling throttle transcode for hwa playback?

@Artiume
Copy link
Contributor

Artiume commented Apr 19, 2020

It was disabled because it caused abnormal behavior. The throttler now is a hack and needs to be reworked. It will probably stay the way it is for a while, it is not a high priority feature.

@RandomDelta6
Copy link
Author

ok. Thanks!

@RandomDelta6
Copy link
Author

Since you mentioned it caused it caused abnormal behaviour, I think the code to enable it for hwa exists. Can you tell how to enable it.
Also, how about giving a new checkbox for hwa throttle transcodes and marking it as experimental?

@Artiume
Copy link
Contributor

Artiume commented Apr 19, 2020

To enable it for HWA, you'll need to build Jellyfin yourself.

if (encodingOptions.HardwareAccelerationType == string.Empty)

In this section, remove the If statement so it will always return true.

@stale
Copy link

stale bot commented Aug 17, 2020

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale stale bot added the stale Stale and will be closed if no activity occurs label Aug 17, 2020
@bingzhangdai
Copy link

The throttler now is a hack and needs to be reworked. It will probably stay the way it is for a while, it is not a high priority feature.

From my understanding, this feature will not be available for a long period of time?

@stale stale bot removed the stale Stale and will be closed if no activity occurs label Aug 18, 2020
@stale
Copy link

stale bot commented Dec 17, 2020

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale stale bot added the stale Stale and will be closed if no activity occurs label Dec 17, 2020
@RandomDelta6
Copy link
Author

just commenting to remove the stale label. Throttle transcode still does not work with Gpu acceleration.
Would be great if it could be added as an experimental toggle

@stale stale bot closed this as completed Jan 9, 2021
@bingzhangdai
Copy link

just comment to keep this issue open

@Artiume Artiume reopened this Jan 10, 2021
@stale stale bot removed the stale Stale and will be closed if no activity occurs label Jan 10, 2021
@stale
Copy link

stale bot commented Jun 3, 2021

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale stale bot added the stale Stale and will be closed if no activity occurs label Jun 3, 2021
@bingzhangdai
Copy link

just comment to keep this issue open

@stale stale bot removed the stale Stale and will be closed if no activity occurs label Jun 4, 2021
@tinect
Copy link

tinect commented Jul 4, 2021

Sadly, this feature still doesn't work at all :-(

@ragingsonar
Copy link

I really hope this issue is addressed. I can't have jellyfin writing 20gb+ files when the user only watches 10 minutes of a 2 hour video

@RandomDelta6
Copy link
Author

I agree. It uselessly puts strain on the system and especially wears down the ssd. It's a huge waste in terms of power and drive life, IK it works with Software Transcoding but I require HW transcoding as my system won't be able to handle the streams I require otherwise.

@ragingsonar
Copy link

I agree. It uselessly puts strain on the system and especially wears down the ssd. It's a huge waste in terms of power and drive life, IK it works with Software Transcoding but I require HW transcoding as my system won't be able to handle the streams I require otherwise.

I'm pretty sure software transcoding limit is broken now too

@cvium
Copy link
Member

cvium commented Jul 23, 2021

It's unfortunately a very broken feature (and ill conceived). To have proper support we'd need to make changes to ffmpeg itself.

@ragingsonar
Copy link

It's unfortunately a very broken feature (and ill conceived). To have proper support we'd need to make changes to ffmpeg itself.

I haven't any experience with this sort of program, so I apologise if this is naive or stupid, but could some sort of cpu limiting solution like https://github.com/opsengine/cpulimit work for when jellyfin launches ffmpeg? As in to implement some sort of non-ideal workaround which limits usage without modifying the programs source?

@Artiume
Copy link
Contributor

Artiume commented Jul 24, 2021

It would have to be a cross platform solution, ideally from within ffmpeg itself. adding additional processes isn't the best manner for long-term solutions.

@vgarleanu
Copy link

It would have to be a cross platform solution, ideally from within ffmpeg itself. adding additional processes isn't the best manner for long-term solutions.

cpulimit works by using SIGSTOP and SIGCONT to pause and unpause a process. These two signals are available on all unix platforms. As for Windows there are the NtSuspendProcess and NtResumeProcess APIs which have the same effect.

Im sure throttling could be implemented with this.

@barolo
Copy link

barolo commented Jan 7, 2022

This needs to be adressed. I keep transcode cache in 8GB of RAM, gets fillled up on occasion and has to be purged manually. Otherwise nothing that needs remuxing or transcoding will play.

@cvium
Copy link
Member

cvium commented Jan 7, 2022

Need is a strong word. It's nice to have, but without proper ffmpeg throttle support it's just not feasible.

@shaino
Copy link

shaino commented Feb 28, 2022

Recent ffmpeg development updates quickly. Unfortunately, the 'Throttle Transcodes' option is not highly prioritized.
Eager to start as soon as possible.

@felix920506
Copy link
Member

I have just tested this on my Jellyfin instance (10.8.11, jellyfin-ffmpeg6)
This feature is working so it is likely it was fixed but not closed.

ffmpeg logs:
throddle.txt

@Shadowghost
Copy link
Contributor

The fix was backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests