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

lavc/videotoolbox: allow software fallback for all codecs #454

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Sep 8, 2024

Apple disabled hardware decoding for some h264 files with certain condition and now ffmpeg will error out for such inputs because the software fallback is disabled. Allow software fallback for all codecs instead of only for HEVC to workaround this as the error handling outside ffmpeg would be harder. Allowing software fallback has no measurable performance impact when the hardware decoder is not overloaded.

Refer: macOS 14.6 release note: https://developer.apple.com/documentation/macos-release-notes/macos-14_6-release-notes#Video-Toolbox

The impacted videos are rare but still exist.

Changes

Issues

@gnattu gnattu requested a review from a team September 8, 2024 17:44
Copy link
Member

@nyanmisaka nyanmisaka left a comment

Choose a reason for hiding this comment

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

echo 0071-allow-vt-sw-decoder-for-every-codec.patch >> debian/patches/series

@nyanmisaka
Copy link
Member

In this case, which one is faster, the software fallback provided by Apple or the built-in decoder in ffmpeg?

Apple disabled hardware decoding for some h264 files with certain
condition and now ffmpeg will error out for such inputs because the
software fallback is disabled. Allow software fallback for all codecs
instead of only for HEVC to workaround this as the error handling
outside ffmpeg would be harder. Allowing software fallback has no
measurable performance impact when the hardware decoder is not
overloaded.
@gnattu gnattu force-pushed the allow-vt-sw-decoder-fallback branch from 7188b99 to 4c8485a Compare September 8, 2024 18:01
@gnattu
Copy link
Member Author

gnattu commented Sep 8, 2024

echo 0071-allow-vt-sw-decoder-for-every-codec.patch >> debian/patches/series

Forget add that to the commit, re-pushed

@gnattu
Copy link
Member Author

gnattu commented Sep 8, 2024

In this case, which one is faster, the software fallback provided by Apple or the built-in decoder in ffmpeg?

FFmpeg native is (much) faster in benchmark but there should not have impact on real world scenario because the VT sw decoder seems to be throttled as only two P cores are in use and each only have around 50% usage, while FFmpeg native used up all cores.

@nyanmisaka nyanmisaka merged commit a46e174 into jellyfin Sep 8, 2024
27 checks passed
@nyanmisaka nyanmisaka deleted the allow-vt-sw-decoder-fallback branch September 8, 2024 20:43
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.

2 participants