-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
[iOS] Fix #1256 #1311
[iOS] Fix #1256 #1311
Conversation
Apologies for the long wait, I know this is a somewhat simple fix but so was #1219 and that didn't entirely fix the issue. There are a few edge cases for me to consider, mainly with transcoded streams + external subtitles, that I remember being wacky that may contribute to this issue that I will need to test with. |
Hey all! I just had a chance to test this and unfortunately this does not appear to fully resolve the issue. On DirectPlay, external subtitles work correctly. When transcoding, this the issue is still persistent for external subtitles. |
I've been screwing around with this for a bit. Does Jellyfin/Swiftfin downsample audio? I think our Transcode Subtitle Index is getting thrown off because the audio index is unreliable. It looks like the Audio selection also gets screwed up by being transcoded but it seems to be more likely to get screwed up with multiple audio/subtitle sources. From testing, this PR seems to work very consistently with non-transcoded content. IMO, maybe we pas in the StreamType as a parameter then have this run for DirectPlay. Figuring out transcoded should still be part of the solution but this would be my take on this:
As an FYI, for testing you can force transcoding by going to |
Through code review and some testing, I think this issue might be related to VLCKit. |
…rdering in VLC player ref: jellyfin#1311 Signed-off-by: ddrccw <[email protected]>
I spent a lot of time today working and reworking this. I've gotten to the point where I have something that works for External subtitles for transcodes and nothing else. It's definitely just an index issue since I get each of the tracks I am testing with to show up and be visible but I cannot for the life of be figure out the pattern to how they're shown. Basing on this current PR, this is the current lay of the land:
This being said, the existence of any external tracks breaks both audio and subtitles. Even internal tracks. If you have enough tracks, you will see they're not 'broken' but more offset. So, I can select an earlier track in the list and get something further down the list. Something I found is that external audio are also experiencing this same issue. Also, even in this current PR version, transcoding is throwing off the audio tracks as well if there is an external track. So, while the direct play external subtitles are working all of the internal audio tracks are offset by 1 from my testing. My guess is that's going to be a big part of our issue. Looking at the offset logic for audio I'm having trouble trusting it's doing the correct thing?
So, if there are 5 external subtitles my audio track would move from 1 to -4? I'm almost positive the solution needs to be an update to how both subtitles and audio track offsets are handled but in all my testing I wasn't able to land anything. I'm back on the road for work coming up here so I wont have a chance to look at this again for a bit but if no one else has cracked it by the 8th I can keep testing. |
Okay, I lied @Gondnat. I ended up looking at this a lot more. I've gotten to the following state on my branch:
On Transcode, the default/first audio track is selected by default but changing it to any other track will fallback to Fixing Audio Tracks on Transcodes is a much bigger ask and would interfere a lot with #1203 since we need to switch URLs for streams. Next StepsI would greatly appreciate additional testers. I don't personally like to use external tracks for either audio or subtitles so I had to manually create my test scenarios. I don't know if these accurately reflect what the average Jellyfin uses is doing. Any assistance testing would be greatly appreciated to ensure I am not dropping anything. I cannot guarantee that I caught every edge case so please let me know if you found any issues / scenarios where this does not work along with details about the file(s) that you tested with. The code can either be pulled directly from my branch here: https://github.com/JPKribs/Swiftfin/tree/trackSelection or can be pulled by updating this PR's branch with the Logic & Changes provided below. Eventually, I want to figure out the Transcoded Audio Tracks but I'm going to be busy for the next couple weeks with work so if anyone else has any insights, it would be greatly appreciated! Logic & ChangesI can't seem to submit a PR to this branch so please find my code below. It's way over-commented while I try to wrap my head around this. Hopefully those help explain my thinking but I think they're fine to be pulled from a final version. All of my changes can be found on my branch here: https://github.com/JPKribs/Swiftfin/tree/trackSelection Alternatively, the code that varies from this PR can be found below: MediaStream.swiftThe following code should replace
MediaStream.swiftThe following code should replace the
|
Hey @Gondnat! Sorry for pestering. I just wanted to follow up on the solution I proposed above. I'm hoping we can get this issue resolved for our 1.3 release. If you're busy with other priorities, I'd be happy to take ownership of this issue and move it forward. Otherwise, if you want to carry forward, I'd be happy to assist with what I've found. Let me know what works best for you! |
Out of urgency for getting this fixed as well as getting 1.3 out, I'm okay with contributing to this branch with the proper fixes and not worried about overriding. Proper accreditation will still happen. |
Sounds good. I have opened this here: #1445. |
Sorry for delay. I'm quite busy lately, but I'd be happy if someone could take over. @LePips @JPKribs |
This PR is used to fix "Can't select subtitles, it jumps back to none #1256"
There are two parts to fix it:
The broken URL lost the extension name ".vtt" after Stream.
Borken URL
Normal URL