-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Update device profile - direct play, transcoding, and codec profiles #1299
Conversation
…hecking a codec for ts container
mpeg2 seems to be broken at line 486 of deviceCapabilities.brs, I'd fix it but I don't have the time atm: mpeg2Levels = []
for each container in profileSupport
for each level in profileSupport[container]["mpeg2"]
if mpeg2Levels[level] = invalid
mpeg2Levels.push(level)
end if
end for
end for It seems as though you're treating profiles as levels for mpeg2, additionally mpeg2 profiles/levels are not numerical, see https://en.wikipedia.org/wiki/H.262/MPEG-2_Part_2#Video_profiles_and_levels I'm not sure what Roku's names for them are to test compatibility however. Not a huge issue as this format is basically dead and is more just here for completeness. As a side note, audio transcoding with eac3 has been finnicky in my testing with a Roku Ultra. Codec support contradicts: https://developer.roku.com/docs/specs/media/streaming-specifications.md. TS/MP4 did not support E-AC3 or DTS (Even though the containers themselves support it, possibly something with the Jellyfin Server logic). Currently testing your changes with the if condition removed, transcoding DTS:X to a device that does not support it, but supports eac3 is still playing back in aac with your changes. My setup supports multichannel AAC however I find Jellyfin to do an extremely poor job converting it. DD/DD+ offer far better results to my ears (even though the codecs are extremely similar) |
Further testing writing out the profiles manually on the Roku Ultra, disabling all codecs on the playback device besides AAC, DD, and DD+. Assuming Jellyfin server prioritizes lists from first element being the most significant. TS:
MP4
MKV:
|
@dotModded Thank you for all the feedback!
That's strange. So the device profile told the server it could play the file but audio didn't play? Did AC3 work?
Which if statement do you mean? Did the device profile correctly put eac3 first in the list of supported codecs (the device profile is printed when debugging)?
Yea, from my understanding, the Jellyfin server prioritizes the transcoding codecs from left to right but your results seem to indicate that's not the case. You were modifying the transcoding profile right? It seems like the solution would be to pick a preferred codec and remove the other multichannel codecs from the device profile. Would you agree? PS: Are you on matrix? Would you mind if I PM you to chat about the codec stuff when I get around to working on it? I'm not an expert with codecs and you seem to know your stuff 😄 |
@dotModded I believe I fixed the bug with mpeg2 but I don't have a file to test with. Mpeg2 is the only codec that has supported levels you can test for but no specific profiles according to the docs here. I'm using an associative array called |
@cewert No Matrix account, same handle on discord though. @dotModded I'd love to chat more about this |
It's ready for testing now. The main thing I need help testing is multichannel audio:
|
I figured out how to restrict playback resolution for only transcoded files 🎉 I've added a user setting that allows the user to restrict resolution for all files or just transcoded files. Defaults to just transcoded files. NOTE: The transcoding reason "The videos' resolution is not supported" will only show up when the mode is set to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
- I tested DTS 5.1 on a non DTS system and things transcoded as expected. Then I played the same video on a DTS capable system and it directed played.
- I also tested the Max Res setting. Transcoded to the max resolution when the setting was on. Then direct played when it was off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, I only have stereo audio, so not specifically able to to test the DTS stuff etc, but used the version over the weekend and certainly didn't hit any problems, and everything appeared to work as expected. And code all looks good.
Update the code to test each codec for each container instead of making assumptions. Updates maxAudioChannels logic - this should enable direct play support for 8 channel audio. Updates preferred audio codec if user supports surround sound. Adds a couple things from web profile i.e.
Property: "IsAnamorphic"
.Still a WIP. Adding as draftThe main thing I still need to test is multichannel audio and I don't have hardware to test so I'm removing the draft tag. Do the codecs direct play if the device supports it? When transcoding a multichannel audio that the device can't support, which codec is used? Is the DTS user setting working? Does 8 channel audio direct play?
Changes
maxAudioChannels
as stringmaxAudioChannels
logic to test for 8 channel supportDolby Vision: dvav.09
is supported but I have no file to test withMaximum Allowed Video Transcoding Resolution
wasn't available using the API so I made a client side settingsession.user.settings.Save()
to stop trying to auto convert to int. This was causing a bug where strings were being converted to ints.web client admin dashboard before
![roku-session-dashboard](https://private-user-images.githubusercontent.com/16514652/265476193-dd1b8fba-679d-4100-8581-a5a5d52e5431.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3NDgyODcsIm5iZiI6MTcyMDc0Nzk4NywicGF0aCI6Ii8xNjUxNDY1Mi8yNjU0NzYxOTMtZGQxYjhmYmEtNjc5ZC00MTAwLTg1ODEtYTVhNWQ1MmU1NDMxLlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEyVDAxMzMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU1NTExNzMxMWMzN2M5NDc1YWQyM2NmZjk2Zjc2ZjM1YWRjNWU3OWQ2NDM0MTFhYTc2ZDExYWU3Njg5ZmE3MGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._HwlhRH0tf_heNuiwMu5VF-kX40PrwkXKgKAIEvTbBk)
web client admin dashboard after
![roku-session-dashboard-after](https://private-user-images.githubusercontent.com/16514652/265476295-fcddbac9-0f21-4030-bcbb-8ed735dd7156.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3NDgyODcsIm5iZiI6MTcyMDc0Nzk4NywicGF0aCI6Ii8xNjUxNDY1Mi8yNjU0NzYyOTUtZmNkZGJhYzktMGYyMS00MDMwLWJjYmItOGVkNzM1ZGQ3MTU2LlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEyVDAxMzMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4Y2Q1YzA4NjAzYTM4MzAyMzZkNjlkNGZjNDIzNjc3OTVlMzMyYjIwYzA2NTU1YTllZDMyZWY1M2UwZjBmYjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hBPJCrMySqJHufoNCJaK8PKHodwfu3emn9lytgjbOhM)
Built on top of PR #1287 (merge that one first)Fixes #1307
Fixes #944
Fixes #1348
Addresses #904