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

Feature request: Force software decoding for hts streams #604

Closed
msxmine opened this issue Feb 7, 2023 · 2 comments
Closed

Feature request: Force software decoding for hts streams #604

msxmine opened this issue Feb 7, 2023 · 2 comments

Comments

@msxmine
Copy link

msxmine commented Feb 7, 2023

The AMD h264 decoder on my system handles (partially corrupted) TV streams very poorly (Video slowdowns/corruption/audio desync/kodi crashes etc.) FFMpeg on the other hand works fine.

Currently I have to use transcoding on the tvheadend server to sanitize the stream or disable HW decoding kodi-wide.

It would be nice if the addon exposed a toggle to force kodi to use software decoding for it's streams.

@ksooo
Copy link
Member

ksooo commented Feb 7, 2023

This is nothing that should or can be handled by the add-on. The add-on just delivers the stream data to Kodi, without modifying it nor can it control the Kodi video player.

@ksooo ksooo closed this as completed Feb 7, 2023
@msxmine
Copy link
Author

msxmine commented Feb 8, 2023

Are you sure? When looking at the docs it seems that PVR addons can specify some stream properties (PVRStreamProperties/InputstreamInfo) like video dimensions, fps, codec name etc. which seem to correspond directly to properties inside Kodi's VideoPlayer. (And CDVDStreamInfo also has a codecOptions field with a CODEC_FORCE_SOFTWARE flag).
The fact that a gettter/setter for it is missing seems to be an oversight.
Anyway, even without Kodi changes it still seems to be possible with the InputStream/Codec addon APIs.
I'm not sure if just setting PVR_STREAM_PROPERTY_INPUTSTREAM to PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG wouldn't suffice, but I'm guessing that it just uses ffmpeg for demuxing in that case and inputstream.adaptive only forces SW decoding when HWdec conflicts with DRM decryption.

Worst case, it's possible to just toggle SETTING_VIDEOPLAYER_USEAMCODEC kodi-wide when a video starts and toggle it back on playback stopped callback.

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

No branches or pull requests

2 participants