Jump to content


Photo

Music Playing Problem - Skipping Track Endings, Missing Player Controls

music player

  • Please log in to reply
32 replies to this topic

#21 TeamB ONLINE  

TeamB

    Advanced Member

  • Developers
  • 178 posts
  • Local time: 04:49 PM

Posted 03 November 2019 - 04:46 PM

Try native playback mode.

 

Try EmbyCon just to test if this addon has the same problem, this will further narrow down your issue to either an addon issue or a Kofi issue.



#22 Saviq OFFLINE  

Saviq

    Advanced Member

  • Members
  • 64 posts
  • Local time: 06:49 AM

Posted 04 November 2019 - 03:31 AM

I believe I already dug deep enough above in posts #9 and #10 - if the stream is interrupted for whatever reason, the Emby for Kodi plugin fails to resume because it can't get the requested byte range from Emby.



#23 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142356 posts
  • Local time: 12:49 AM

Posted 05 November 2019 - 11:53 AM

I think the problem is that the streaming url does not respect ranges:

curl --output file.flac --range 25000000-30000000 https://media.server.net:443/emby/Audio/203817/stream.flac\?api_key\={emby-token}
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 57.6M    0 57.6M    0     0  12.7M      0 --:--:--  0:00:04 --:--:-- 13.5M

> GET /emby/Audio/203817/stream.flac?api_key={emby-token} HTTP/1.1
> Host: media.server.net
> Range: bytes=25000000-30000000
> User-Agent: curl/7.64.0
> Accept: */*
>
{ [5 bytes data]
< HTTP/1.1 200 OK
< Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, Slug, Transfer-Encoding, Want-Digest, X-MediaBrowser-Token, X-Emby-Token, X-Emby-Authorization
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS
< Access-Control-Allow-Origin: *
< Server: UPnP/1.0 DLNADOC/1.50
< Content-Type: audio/flac
< Accept-Ranges: none
< Date: Thu, 12 Sep 2019 07:04:10 GMT
< Transfer-Encoding: Chunked
< Strict-Transport-Security: max-age=16000000; includeSubDomains; preload;
<
{ [14695 bytes data]
* Connection #0 to host media.server.net left intact

Even though I only requested 5miB, I got the full 57MB.

 

It doesn't happen if requesting the playback from Emby into Kodi, the stream URL is passed verbatim to Kodi's player, which seems to be more robust than proxying through the plugin-internal web service.

 

This is because it is requesting a transcoding url where byte range requests are not supported. You could try instead:

https://media.server.net:443/emby/Audio/203817/stream?api_key\={emby-token}&static=true

This get the original audio without any transcoding, and byte range requests will be supported.



#24 martinix OFFLINE  

martinix

    Member

  • Members
  • 18 posts
  • Local time: 05:49 AM

Posted 17 November 2019 - 10:14 AM

This is because it is requesting a transcoding url where byte range requests are not supported. You could try instead:

https://media.server.net:443/emby/Audio/203817/stream?api_key\={emby-token}&static=true

This get the original audio without any transcoding, and byte range requests will be supported.

 

does this suggestion provide the basis for a possible fix? if so, what would we need to do/change to test it out? Thanks.



#25 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142356 posts
  • Local time: 12:49 AM

Posted 17 November 2019 - 11:39 PM

I think the audio url will need to be adjusted. Is this EmbyCon or Emby for Kodi?



#26 martinix OFFLINE  

martinix

    Member

  • Members
  • 18 posts
  • Local time: 05:49 AM

Posted 18 November 2019 - 05:40 AM

The problem occurs with Emby for Kodi (4.1.15) . EmbyCon seems to work ok. The developer, Angelblue05, noted the likely cause of the problem (see above) but it seems uncertain whether a fix is possible or not.



#27 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12693 posts
  • Local time: 11:49 PM

Posted 18 November 2019 - 03:27 PM

You always have the option to not sync your music library. Then it should work the same as embycon.

 

Thanks for letting me know this is not resolved with 4.1.15. I don't see this myself nor does @sualfred. Can you provide an updated Kodi log? Enable Kodi debug. Take note the time the skip happens.


Edited by Angelblue05, 18 November 2019 - 03:27 PM.


#28 martinix OFFLINE  

martinix

    Member

  • Members
  • 18 posts
  • Local time: 05:49 AM

Posted 20 November 2019 - 01:49 PM

sorry for my delayed response. I checked again and everything seems ok now. I reset and re-synced the library and that seemed to fix the problem. I'm not getting any skips now.

 

You always have the option to not sync your music library. Then it should work the same as embycon.

 

Thanks for letting me know this is not resolved with 4.1.15. I don't see this myself nor does @sualfred. Can you provide an updated Kodi log? Enable Kodi debug. Take note the time the skip happens.

 

thanks for your help.



#29 Saviq OFFLINE  

Saviq

    Advanced Member

  • Members
  • 64 posts
  • Local time: 06:49 AM

Posted 20 November 2019 - 01:58 PM

Thanks for letting me know this is not resolved with 4.1.15. I don't see this myself nor does @sualfred. Can you provide an updated Kodi log? Enable Kodi debug. Take note the time the skip happens.

 

Hey @Angelblue05,

 

Does it have to be a transcoding stream, though? Could the plugin not just feed the file as-is? This way the ranged request would work according to Luke a couple replies above?



#30 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12693 posts
  • Local time: 11:49 PM

Posted 21 November 2019 - 12:28 PM

@Saviq

 

Can you test this build for me?

 

First install it and try to see if it still cuts at the end. I added static=true to the redirect for music.

If this works, let me know.

 

Otherwise second step, in the add-on settings > advanced > enable developer mode > Save. Restart Kodi, you should see a new patch applied. Resync your music library. Then try to play and let me know if it cuts short still. I have removed the file extension so that it reflects as Luke posted above.

 

Thanks.

Attached Files


Edited by Angelblue05, 21 November 2019 - 12:28 PM.


#31 Saviq OFFLINE  

Saviq

    Advanced Member

  • Members
  • 64 posts
  • Local time: 06:49 AM

Posted 22 November 2019 - 09:01 AM

Hey @Angelblue05,

 

Yes that seems to fix the issue for me, I've been playing random music most of the day and no cut offs.

 

That said, is that the correct fix? What if the file is in a format that Kodi doesn't support?


  • Angelblue05 likes this

#32 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12693 posts
  • Local time: 11:49 PM

Posted 23 November 2019 - 11:02 AM

Did you try it in two steps like I asked?

At which point did it work correctly, just with the build given or with developer mode enabled/kodi restarted?

Yeah if the format is not supported...

Edited by Angelblue05, 23 November 2019 - 11:04 AM.


#33 Saviq OFFLINE  

Saviq

    Advanced Member

  • Members
  • 64 posts
  • Local time: 06:49 AM

Posted 23 November 2019 - 11:43 AM

I just installed the plugin and started playing, didn't notice an interrupt since.
  • Angelblue05 likes this





Also tagged with one or more of these keywords: music, player

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users