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

Add AV1 direct play support. #2392

Merged
merged 1 commit into from
Jan 24, 2023
Merged

Conversation

MWisBest
Copy link
Contributor

@MWisBest MWisBest commented Jan 8, 2023

Changes
This adds the ability for ExoPlayer to play AV1 without transcoding on API level 29 and up.

Issues
There's a few issues that reference AV1 support, but nothing really specific to ExoPlayer. LibVLC still appears to just black screen attempting to play AV1, but it doesn't appear to be related to the profiles stuff that was modified here.

There may be more/better ways of doing this, in theory ExoPlayer supports AV1 at even lower API levels, this might not correctly detect/advertise 10-bit support, but the only device I have available to test this on works correctly. This PR is bringing attention to this missing feature and to get the ball rolling on it.

Tested on: Chromecast with Google TV HD (which has hardware AV1 support; Chromecast with Google TV 4K does not do hardware AV1 but it might do software?).

@Kab1r
Copy link

Kab1r commented Jan 12, 2023

Many of my AV1 files now plays, but I am having issues paired with certain audio codecs. I haven't tested these files paired with H264 instead of AV1 yet, so it might not necessarily be AV1 related. I haven't had any trouble with audio codec incompatibility on any of my H264 files before.

This one gives up after a few tries (logs indicate incompatible audio codec?)

Audio
Title: Eng - AAC - 6 ch - Default
Language: eng
Codec: AAC
Codec tag: mp4a
Profile: LC
Channels: 6 ch
Bitrate: 384 kbps
Sample rate: 48000 Hz
Default: Yes
Forced: No
External: No

But this one plays fine

Audio
Title: Eng - AAC - 5.1 - Default
Language: eng
Codec: AAC
Codec tag: mp4a
Profile: LC
Layout: 5.1
Channels: 6 ch
Bitrate: 341 kbps
Sample rate: 96000 Hz
Default: Yes
Forced: No
External: No

DTS-HD fails differently: instead of the codec failing, it lags out (maybe because of the high bitrate?)

Audio
Title: DTS-HD MA 5.1 - Eng - Default
Language: eng
Codec: DTS
Profile: DTS-HD MA
Layout: 5.1
Channels: 6 ch
Bitrate: 2163 kbps
Sample rate: 48000 Hz
Bit depth: 16 bit
Default: Yes
Forced: No
External: No

My AC3 file appears to play fine too.

Audio
Title: Eng - Dolby Digital - 5.1 - Default
Language: eng
Codec: AC3
Layout: 5.1
Channels: 6 ch
Bitrate: 384 kbps
Sample rate: 48000 Hz
Default: Yes
Forced: No
External: No

If you can, see if you run into similar issues with a variety of audio codecs.

@MWisBest
Copy link
Contributor Author

I haven't had any issues with standard DTS, I will try a DTS HD-MA track when I get a chance. I can tell you that the Chromecasts really do not like high bitrate content, which is why I looked into this in the first place.

Couple things I noticed is your first AAC track lists 6 channels but doesn't have the 5.1 'layout' info the AAC track that works lists, and that DTS HD-MA track is higher bitrate than any of the ones I have in my collection.

I think I'd read a while back that when things were getting transcoded the Android TV build would have both video and audio transcoded when only one or the other was needed, so I'd go back to a build without the AV1 patch and see if that DTS-HD MA file was actually playing as DTS-HD MA or if it was getting dropped to AC3 or something.

@Kab1r
Copy link

Kab1r commented Jan 20, 2023

I noticed is your first AAC track lists 6 channels but doesn't have the 5.1 'layout' info the AAC track that works lists

I can confirm that this file fails to play in exactly the same way on the latest release.

I think I'd read a while back that when things were getting transcoded the Android TV build would have both video and audio transcoded when only one or the other was needed, so I'd go back to a build without the AV1 patch and see if that DTS-HD MA file was actually playing as DTS-HD MA or if it was getting dropped to AC3 or something.

I am unable to get the file to transcode. On the latest release, this files fails similarly to the AAC 6 channel file: it gives up after trying a couple of times.

@MWisBest MWisBest reopened this Jan 21, 2023
@MWisBest
Copy link
Contributor Author

Had a git oops there...

Hopefully I've addressed what you asked for @nielsvanvelzen

@nielsvanvelzen nielsvanvelzen added this to the v0.16.0 milestone Jan 22, 2023
@nielsvanvelzen nielsvanvelzen added enhancement New feature or request playback Issue related to media playback needs-testing labels Jan 22, 2023
@nielsvanvelzen nielsvanvelzen merged commit 848ff47 into jellyfin:master Jan 24, 2023
@nielsvanvelzen
Copy link
Member

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request playback Issue related to media playback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants