-
Notifications
You must be signed in to change notification settings - Fork 205
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
Jellyfin Support #217
Comments
This sounds probably more like a question for jellyfin then ? |
Thanks for the fast response, and I apologize for the duplicate issue. I am not sure if this is a jellyfin or gmrender issue, I really dont know much about the behind the scenes, I am just a user. I have attached logs from the jellyfin side as well as the gmrender side. Exactly what I did while these logs were happening was: Add a playlist to the queue and start playing, skip to the next track, skip to the next track, stop playback, disconnect. What happened in real life was: the queue was added and started playing, the track was skipped in the user interface and showed the next track playing, but in reality gmrender just kept playing the same song. Same thing happened for the next song .... Side note: when skipping tracks and the same track keeps actually playing in real life, the UI shows that the new track is playing from the same time position that the last track was skipped at. Meaning if I skipped a track that was 12 seconds into progress, the user interface then showed the next track playing at 12...13...14 seconds. I am assuming that is because gmrender is still feeding back the playback progress of the previous song. |
These logs should be better, use them instead: I am not really seeing anything going on with the logs, except maybe in the jellyfin logs it looks like maybe some kind of error is occuring during the skips and then jellyfin quickly disconnects and reconnects to gmrender? but I am honestly not sure |
Based on the log from gmrender it looks like Jellyfin only changes the media URI, but does not issue a "play" command so gmrender does not play the new file. In comparison, my control point of choice stops playback, changes the uri, and then issues a play command.
I stand corrected. It may be our end. 2.4.1. SetAVTransportURI |
If you've got the time to debug, I've got a branch here: https://github.com/mill1000/gmrender-resurrect/tree/issues/217_jellyfin you could try. I've made a minor change to load the URI into the player if a SetAVTransportURI is received will the device is already playing. This might fix your issues with skipping tracks. |
Is there any progress on this? I use both Jellyfin and Emby, and always run into this problem. Makes it impossible to stream more than one song at once... |
@Larx could you give the branch I linked a try? It that fixes the issue I can submit a PR |
Thanks for the quick reply. |
If it turns out that Jellyfin does not use the protocol correctly, we
should probably upstream a fix there.
…On Tue, Mar 16, 2021, 07:38 Tucker Kern ***@***.***> wrote:
@Larx <https://github.com/Larx> could you give the branch I linked a try?
It that fixes the issue I can submit a PR
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#217 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABCNCNVKGKHTT23SSWIEI3TD5UN5ANCNFSM4SRPSNJQ>
.
|
I gave @mill1000's branch a try and it does solve the problem with skipping tracks. The real problem I'm having with it is that gmediarender doesn't seem to send status updates back to Jellyfin. So when Jellyfin sends a pause signal gmediarender will actually pause, but Jellyfin thinks the media is still playing. Seems like the same thing is causing weirdness when seeking through the media, I'll seek to say 50% in, the seek works but Jellyfin's progress continues from the beginning, but then I'll seek back to 25% in and it seeks correctly, but it seems gmediarender then sends a status update of the previous position as Jellyfin then shows progress from the 50% position of the previous seek. I'm not super confident in my C skills (Python dev normally) but this at least seems like it might be a simple fix which I'll try and take a look at once I figure out how this code is structured. UPDATE 2: I've done some digging around using Wireshark to watch the network traffic. I think the issue with seek updates not being reflected in Jellyfin is because Jellyfin is asking for an update quicker than gmediarender has actually updated the seeked time, so it's effectively:
Jellyfin also checks in asking for an update every 15-30 seconds or so, just to make sure everything is where it expects. That's why I'm seeing the seek update get to Jellyfin eventually. UPDATE 3: Found this in the code at the seek function in upnp_transport.c. Sounds like it's exactly what I've run into:
|
Hrmm, is the output_gstreamer_seek function supposed to return -1 on success, or failure? I believe that if statement is backwards as it's currently returning '-1' on success, and '0' on failure, which is the opposite of what I normally expect, and by the looks of things the opposite of what the seek function in upnp_transport seems to expect. Minor sidenote: Using gst_element_seek_simple would make that function a bit simpler, and easier to parse, given it's not making use of any of the extra things seek does which seek_simple doesn't anyway. UPDATE: And for a final touch, replacing the "PAUSED_PLAYBACK" string with "PausedPlayback" lets Jellyfin properly recognise when the media is paused (also worked as "PAUSEDPLAYBACK"). So either Jellyfin or gmrender is probably breaking the DLNA spec there, not sure which, my bet's on Jellyfin there though. I'll ask around in their IRC channel on Monday |
Thanks for making the Jellyfin issue, I was happy to do a PR for all the Jellyfin fixes, wanted to get 1 last thing solved first though. When Jellyfin tries to "Continue watching" a media file from half way through, gmrender doesn't seek to that half way mark. But if I press stop then start it again from the beginning, gmrender starts it back where it should have the first time. |
Oh well you're more than welcome to. I can close the one I just opened. Just let me know what you want to do. I wonder if Jellyfin might be sending the "seek" command first, and then the "play" command. Not sure exactly what order gstreamer needs. A review of this might be in order: https://gstreamer.freedesktop.org/documentation/application-development/advanced/queryevents.html?gi-language=c |
You're all good, stick with yours I'll do another if necessary. :) Yeah that was my thinking, haven't done any packet sniffing yet to confirm that though as I'm away for the weekend. This should be the last thing I need to get rid of my near decade old home made media system |
First issue is that the play() function is returning before gstreamer has actually started playing the stream. This is because gst_element_set_state(...) is triggering an async change and we're supposed to wait for a "GST_MESSAGE_STATE_CHANGED" message before reporting that we're in playback state. I can't reproduce the 2nd half of that anymore, so I guess my suspicion of it being 2 separate issues was probably incorrect. |
I've been using that messy patched version the past couple days and it's working well.
|
After many hours of trying to parse the XMl, I determined that a) I don't know what I'm doing, and b) It won't really work anyway because Jellyfin (at least) sends all subtitle streams in that metadata, and gives no indication of what should/shouldn't be enabled. Also ran into an entirely unrelated issue in Jellyfin's design that means this probably can't work for me the way I wanted it to anyway. So I probably won't be working on it much more |
Jellyfin is a FOSS fork of Emby/Plex Media Server... it can serve audio files over DLNA. For devices such as my samsung TV, when I send media files, it is able to fully control the TV including queuing tracks, change volume, skip tracks, seek through tracks, play/pause/stop etc. However, when I point it to one of my many raspberry pi's running gmrender-resurrect, I can only play songs, change volume, and play pause... but I cannot do anything else like seek through the tracks or skip the currently playing track to the next one in the queue.
I am not sure if this is a jellyfin or gmrender issue, but jellyfin does have an advanced config section for adding compatibility to DLNA devices via "profiles". It matches via a manufacturer id among other things which I was able to find. Can you tell me maybe what other things I can add to this advanced config to make these other features work? An example of possible options you can see in this samsung TV config: https://github.com/jellyfin/jellyfin/blob/master/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs. Things like extra headers
The text was updated successfully, but these errors were encountered: