Unexpected end of stream

Hey there,

I enjoy Yatse since a few years now and really appreciate your work!

I use a Nvidia Shield with Plex Server installed which fetches my files from a Synology Nas, all connected via ethernet. Most of the time, I use Yatse to play music from the PlexServer via my Denon AVR 1200, which was working pretty fine.

Lately, I get some hiccups when playing music: either tracks are skipped or the music stops.
In order to isolate the problem, I tried playing music using only Yatse on my phone and I get the same problems, sometimes music just stops (the phone isn’t loosing wifi connection btw).
To reproduce the issue I was intentionally skipping some tracks until the music stopped.

If you need further information let me know! Have a nice weekend!

Yatse: 10.9.0-71108194 Android: 5.0.2 - 21 [armeabi-v7a,armeabi] Device: htc - HTC One [htc_europe - m7]

debug-20210626_102537.zip (52.7 KB)

Hum I can see an error from Exoplayer but it’s strange as seems related to your phone lacking memory to allocate a buffer so would have no impact when streaming to the denon.

Can you send me the file
{“MediaContainer”:{“size”:1,“allowSync”:“1”,“directPlayDecisionCode”:1000,“directPlayDecisionText”:“Direct play OK.”,“generalDecisionCode”:1000,“generalDecisionText”:“Direct play OK.”,“identifier”:“com.plexapp.plugins.library”,“librarySectionID”:“13”,“librarySectionTitle”:“Musik”,“librarySectionUUID”:“af18574b-458d-4b04-a25a-173accbd137d”,“mediaTagPrefix”:"/system/bundle/media/flags/",“mediaTagVersion”:“1624305607”,“Metadata”:[{“addedAt”:“1623943036”,“art”:"/library/metadata/35343/art/1598998733",“duration”:“391467”,“grandparentArt”:"/library/metadata/35343/art/1598998733",“grandparentGuid”:“plex://artist/5d07be5a403c640290683cf6”,“grandparentKey”:"/library/metadata/35343",“grandparentRatingKey”:“35343”,“grandparentThumb”:"/library/metadata/35343/thumb/1598998733",“grandparentTitle”:“Robin Schulz”,“guid”:“plex://track/5d07eb6c403c640290cd48a8”,“index”:“16”,“key”:"/library/metadata/50151",“lastViewedAt”:“1624053023”,“librarySectionID”:“13”,“librarySectionKey”:"/library/sections/13",“librarySectionTitle”:“Musik”,“originalTitle”:“Tom Thaler & Basil & Robin Schulz”,“parentGuid”:“plex://album/5d07c8fe403c640290c4b70d”,“parentIndex”:“1”,“parentKey”:"/library/metadata/38796",“parentRatingKey”:“38796”,“parentStudio”:“Tonspiel”,“parentThumb”:"/library/metadata/38796/thumb/1623943063",“parentTitle”:“Extended Prayer”,“parentYear”:“2014”,“ratingCount”:“74”,“ratingKey”:“50151”,“summary”:"",“thumb”:"/library/metadata/38796/thumb/1623943063",“title”:“Hier mit dir (Robin Schulz remix)”,“type”:“track”,“updatedAt”:“1623943063”,“Media”:[{“audioChannels”:“2”,“audioCodec”:“flac”,“bitrate”:“5286”,“container”:“flac”,“duration”:“391467”,“id”:“59661”,“selected”:true,“Part”:[{“container”:“flac”,“duration”:“391467”,“file”:"/storage/DS215J/Musik 2/HiFi/Robin Schulz - Extended Prayer - 2014/16 - Hier Mit Dir (Robin Schulz Remix).flac",“id”:“59987”,“key”:"/library/parts/59987/1623935986/file.flac",“size”:“258653128”,“decision”:“directplay”,“selected”:true,“Stream”:[{“audioChannelLayout”:“stereo”,“bitDepth”:“24”,“bitrate”:“5286”,“channels”:“2”,“codec”:“flac”,“displayTitle”:“FLAC (Stereo)”,“extendedDisplayTitle”:“FLAC (Stereo)”,“id”:“102983”,“index”:“0”,“samplingRate”:“192000”,“selected”:“1”,“streamType”:“2”,“location”:“direct”}]}]}]}]}}

So I can see if it’s related to that file ?

Can you check Plex server when the errors occurs to see if there’s no issues there too ?

Here is the the link to the file: https://filehorst.de/d/doEmuBEb

When checking the Plex Server I can’t see no issue.

And another debug when using Yatse and the Denon to play music. I hope it helps!
debug-20210626_114534.zip (87.7 KB)

Thanks so yes it helps a lot.

This file is 32b 192Khz so it’s probably not supported by your old Android 5 device as it requires very large buffers to decode. It’s mostly expected and hard to detect :frowning:

But it’s also probably not supported by your receiver that is limited to 24b according to it’s documentation.

Unfortunately when requested your device says that it support flac without limits:

2021-06-26 11:37:34.733 Verbose/UPnPRenderer: Supported media type: http-get:*:audio/flac:*
2021-06-26 11:37:34.734 Verbose/UPnPRenderer: Supported media type: http-get:*:audio/x-flac:*

So there’s no automatic transcoding in that case as it’s supposed to work.

While I can easily hardcode the 24b limit for your Denon I’ll need to think about something more global for the future.

Thank you for taking the time and investigating!!

Just some other observations:

  • When playing the 32b 192 khz tracks directly from the Denon (using DNLA probably) there is no issue.

  • And the skipping and stopping of tracks using Yatse and the AVR happens on 16bit 44,1khz tracks as well.

Pretty weird :slight_smile:

EDIT: The same behaviour occurs when using the HTC One M 10 with slightly newer software

I’ve asked on ExoPlayer how to gather easily more logs about the issue as it’s not returned by default for the on device playback.

For the skipping on the Denon does it happens in the middle of tracks?
Can you check that Yatse is excluded from the battery optimization on your devices?

The skipping happens usually in the first few seconds when a new track is playing, maybe 5 to 10 seconds into the track.

Concerning the battery options, all optimizations are turned off.

To not mix things:

  1. On the HTC one does the local player have issues?

  2. Can you provide logs again only containing basic files streaming to the Denon reproducing the skip after a few seconds + let the next song play + give me the name of the songs that skipped and the one that played just after to see.

  1. Using Yatse on the phone, yes.

  2. Yeah, of course! I’ll be happy to upload a new log, but I probably won’t get to it until the evening.

So I played some tracks from 2Pac “All Eyez on Me” which are all 16bit 44,1khz. I chose “play all” under playback action:

  • The first song (Ambitionz az a Ridah) played without any problems
  • The second song (All about U) was immediately skipped
  • The third track (Skandalouz) played again without any problem

Have a nice evening!

debug-20210626_194343.zip (85.7 KB)

Ok so in this case the 2nd song was not even started at all. You confirm?

I can see some kind of race that triggers 2 next calls generating the issue.

It would really help if you were able to provide logs and songs title when reproducing the case when the song plays a few seconds before skipping. This may contains more details about the second stop I received to better see from where it could comes.

Exactly! I can confirm that the second song was not even started.

As soon as I was able to reproduce the issue that a song plays for a few seconds before skipping, I will come back at you with another log!

Okay, so to keep things comparable I have chosen the same album as yesterday and here is what happend (please note that I intentionally jumped to the end of a song each time I noticed that it was playing without any problems):

  • The first song (Ambitionz az a Ridah) was not even played at all
  • The second (All Bout U), third (Skandalouz) and fourth (Got My Mind Made Up) played without issues
  • The fifth track (How Do U Want It) was skipped after a few seconds
  • The sixth song (2 of Americas Most Wanted) played again without problems

So I think it’s safe to assume that not individual songs are causing the problems, right? From memory, I would also claim that the problems usually occurred at different points, although playing the same album.

Here you go:
debug-20210627_082847.zip (58.1 KB)

Well this one is even more strange.
It’s the receiver that tells Yatse that it have stopped playing the media after a few seconds.

<s:Envelope
		xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
		s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	<s:Body>
		<u:GetTransportInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
			<CurrentTransportState>STOPPED</CurrentTransportState>
			<CurrentTransportStatus>OK</CurrentTransportStatus>
			<CurrentSpeed>1</CurrentSpeed>
		</u:GetTransportInfoResponse>
	</s:Body>
</s:Envelope>

Can you check / provide Plex logs when playing that album directly from the receiver, maybe there’s some transcoding occurring that prevent that sort of bugs on the receiver?

Hmm, when playing music directly from the receiver there is actually no activity shown on the plex web interface and no logs are generated as far as i can tell (unless I’m missing something :slight_smile: )

Just as a side note: I think the Denon 1200 has a 32 bit DSP

Edit: What amazes me is that it worked for a pretty long time without any problems. I’ve been using the same setup for a few years now (though I used to use the Kodi web server).

From where the data is played then ?

About the Denon from all the French site like Denon AVR-X1200W - Amplis home-cinéma sur Son-Vidéo.com it’s 24b DSP and HD FLAC, WAV, ALAC, AIFF up to 24 bits / 192 kHz

Edit but this is not the issue here probably there’s just something strange as the stopped status is not caused by Yatse :frowning:

Yes, you’re right, I think i misread something → AVR-X1200W | Upgrade your Home Cinema setup - Denon It says:
Featuring an advanced quad-core 32-bit DSP processor, the AVR-X1200W easily handles multi-thread processing tasks, including Dolby Atmos and DTS:X decoding, Audyssey room acoustic correction, bass management and DSP surround simulation. The processor features tremendous processing power, with 4 300-MHz DSP cores that deliver over 1 billion computations per second.

But looking at the user manual there are no bitrates given playing music from a NAS.

From where the data is played then ? (Exemplaray) Denon Online Music → Media Server → Selecting my plex server name → music → music → all artist → 2Pac

That’s a mystery if there’s nothing in the Plex logs. Maybe there’s some settings in Plex to log upnp part or it’s another log file?
Never used Plex as an upnp server so no idea :frowning:

I cleared the log folder before playing music and there is not a single file produced. I think I activated all related settings and downloaded even the protocols, but there is just nothing added.

I will go over to the plex forum and ask the guys there if it is possible to produce a log using plex as server and denon as a player at all.

Nevertheless, I think the support you’re providing is really superb! Keep up the good work!

I tried a few things today. Using the Denon App and BubbleUpnp, there are no problems playing music on the AVR using Plex Server.

Then, I configured Kodi as server and played some music. As far as I can tell it is working better. But jumping to the next track skips some tracks sometimes:

  • First song (Ambitionz az a Ridah) works → skip to the next track
  • Second song (All Bout U) works → skip to the next track
  • Third track (Skandalouz) works → skip to the next track
  • Fourth (Got My Mind Made Up) and fifth track (How Do U Want It) are skipped
  • Sixth track (2 of Amerikaz Most Wanted) is played again

I think I switch back to Kodi as Server using PlexKodiConnect and Plex as BackEnd :sweat_smile:

debug-20210628_212931.zip (45.6 KB)