In coreelec, when changing audio inside the movie, it bugs the player and starts the movie again. I also notice that when changing the audio, it recreates a video connection again instead of simply changing the audio like the official plex player. log-2024-07-29-19.50.00.zip (412.5 KB)
Yeah that’s not normal. I currently have no idea why that happens - the kodi player fails:
2024-07-29 16:48:34.887 T:1238 info <general>: script.plex: Player: Video window closed
2024-07-29 16:48:34.888 T:1235 info <general>: script.plex: Player - STOPPED: FAILED
Maybe someone else with CoreELEC can dive into this.
Are you on the latest nightly of Coreelec? Just tried changing audio tracks in the middle of a movie (high bitrate 4K mkv) and initially it restarted the movie, but I tried changing audio track a few more times and all worked as expected even in the middle of the movie. Also tried another movie and it switched audio tracks without restarting the movie as well.
Does it happen on every movie for you or certain files?
I’m able to reproduce the issue where switching audio streams restarts the video. It appears the restarting of the file is deliberate, probably because if it’s being transcoded you would have to restart the stream. When it restarts the video it also has to do a seek to get back to where the video was at when you switched audio streams. It appears that kodi is ignoring the seek request because we’re issuing it too soon after the movie starts. If I add a slight delay then it seems to work. Not exactly an ideal solution but maybe it’s good enough. I’ll upload a PR later with the change and see what @panni thinks.
It is deliberate, albeit as little unintuitive why this has to happen even in DirectPlay. It might be unnecessary, but I’ve simply kept the behaviour from the original script.plex. We restart the video to reassess whether the newly selected stream combinations are still DirectPlayable or need DirectStream/Transcoding.
For audio changes, I think we should try and avoid that. I’ll fiddle around.
Seems like restarting the video would be unnecessary if the user has already selected what codecs apply in the settings but I guess there’s scenarios where they’ve got it wrong even though I expect most people have it right. Avoiding a restart would be great!
Well no. You might have specific settings for AC3 for example. When you start a DP session with let’s say AAC audio and switch to AC3, we need to react accordingly and might need to reevaluate whether to Transcode or not.
Core: Dump all user settings into the DEBUG log if requested (private information masked)
Core/Settings: Add setting to System tab to dump all user settings
SeekDialog/Player: Don’t restart the video when changing audio or subtitles (possibly even video, not tested), if not necessary
SeekDialog: Re-evaluate MediaDecisionEngine decision when changing selected streams during playback; this allows switching between DirectPlay/DirectStream/Transcode, on the fly, based on the selected streams
SeekDialog/Player: Fix resume-on-start sometimes not working when an embedded subtitle stream was selected
Settings/Audio/AC3/DTS: Change setting options from 2.1+ and 5.1+ to >2.0, >2.1, >5.0, >5.1 to allow for more fine-grained control
SeekDialog: Allow ACTION_PAGE_DOWN and ACTION_PAGE_UP to bring up the OSD when Behave like official Plex clients is active
Core/Settings: Allow setting DEBUG on the fly, without restarting the addon
Core: Fix usage of collections.Iterable with Kodi python > 3.9
Latest beta appears to have broken something. I’m unable to play anything at the moment. An error message pops up in the top right saying “ERROR: none” and it hangs on the show/movie’s background.
Of course you can’t; just my luck Is there an easier way of sharing logs these days? The last time I tried I couldn’t find where my Nvidia Shield had saved the actual log so I was unable to share it anywhere.