PS4 disconnecting every 20 minutes

Discuss media renderers like Xbox 360, TVs, smartphones, etc.
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: PS4 disconnecting every 20 minutes

Post by SubJunk »

Hi Kruksten, I'm also using Windows 10 and PS4, and I can't reproduce it. If you would be willing to do testing for us that could help. Can you please attach TRACE logs and let us know what time the disconnection happened?
Kruksten
Posts: 9
Joined: Sat Dec 19, 2020 3:37 am

Re: PS4 disconnecting every 20 minutes

Post by Kruksten »

SubJunk wrote: Mon Dec 21, 2020 1:12 pm Hi Kruksten, I'm also using Windows 10 and PS4, and I can't reproduce it. If you would be willing to do testing for us that could help. Can you please attach TRACE logs and let us know what time the disconnection happened?
where can I send the zip file to?
User avatar
mik_s
Moderator
Posts: 1104
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: PS4 disconnecting every 20 minutes

Post by mik_s »

Just attach them to a post on the forum. See the link in the above red section on how to make the logs
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Kruksten
Posts: 9
Joined: Sat Dec 19, 2020 3:37 am

Re: PS4 disconnecting every 20 minutes

Post by Kruksten »

Kruksten wrote: Fri Dec 25, 2020 10:06 am
SubJunk wrote: Mon Dec 21, 2020 1:12 pm Hi Kruksten, I'm also using Windows 10 and PS4, and I can't reproduce it. If you would be willing to do testing for us that could help. Can you please attach TRACE logs and let us know what time the disconnection happened?
where can I send the zip file to?
log attached

File stopped playing after 29 minutes and 33 seconds. I have to stop and restart PS4 media player for it to recognize UMS.
Attachments
ums_dbg_2020-12-24-16-58.zip
(154.83 KiB) Downloaded 533 times
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: PS4 disconnecting every 20 minutes

Post by SubJunk »

Ok so what I can see from the logs is:

Code: Select all

16:28:11.838 video starts transcoding
one possible problem is that we are sending a wrong MIME type to the PS4, we send [code]video/mpeg
when it should be

Code: Select all

video/vnd.dlna.mpeg-tts
. I doubt that is related but we should test it anyway.
16:29:20.715 we start receiving M-SEARCH from Brave Browser, which continues to happen throughout
16:57:57.654 we receive a thumbnail request from the PS4
16:58:00.143 we stop transcoding the video

DEBUG 2020-12-24 16:58:00.143 [Thread-21] net.pms.io.WindowsNamedPipe Windows named pipe interrupted after writing 0 bytes, shutting down...
TRACE 2020-12-24 16:58:00.145 [Thread-21] net.pms.io.WindowsNamedPipe
java.io.InterruptedIOException: null
at java.base/java.io.PipedInputStream.awaitSpace(Unknown Source)
at java.base/java.io.PipedInputStream.receive(Unknown Source)
at java.base/java.io.PipedOutputStream.write(Unknown Source)
at java.base/java.io.OutputStream.write(Unknown Source)
at net.pms.io.WindowsNamedPipe.run(WindowsNamedPipe.java:269)[/code]

I had an idea that might give us a clue, can you try going to the "Transcoding Settings" tab and setting the "Maximum transcode buffer" to 50, and play the same video? Does it stop in the same place as before or does it stop sooner? It could be a clue if that changes it.

Also please replace your renderer config with the one I have attached
Sony-PlayStation4.conf
(1.76 KiB) Downloaded 547 times
Kruksten
Posts: 9
Joined: Sat Dec 19, 2020 3:37 am

Re: PS4 disconnecting every 20 minutes

Post by Kruksten »

SubJunk wrote: Sun Jan 03, 2021 4:55 pm

I had an idea that might give us a clue, can you try going to the "Transcoding Settings" tab and setting the "Maximum transcode buffer" to 50, and play the same video? Does it stop in the same place as before or does it stop sooner? It could be a clue if that changes it.

Also please replace your renderer config with the one I have attached
Sony-PlayStation4.conf
config replaced

After changing the Transcoding setting, the video stopped after 30 minutes(29 min. 47 sec. to be precise)

on another video, it stopped after 7 minutes and 6 seconds
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: PS4 disconnecting every 20 minutes

Post by SubJunk »

Ok thanks for testing, so changing that setting didn't change the results?

Can you try changing the line in renderer/Sony-PlayStation4.conf:

Code: Select all

TranscodedVideoFileSize = -1
to:

Code: Select all

TranscodedVideoFileSize = 100000000000
it will likely make the length of videos appear wrong, because it is reporting a fake length, but it might also stop the video from stopping early.

Another longshot to try might be this build of UMS which has a different way of closing input streams: https://www.universalmediaserver.com/up ... 56b9a1.exe
Kruksten
Posts: 9
Joined: Sat Dec 19, 2020 3:37 am

Re: PS4 disconnecting every 20 minutes

Post by Kruksten »

SubJunk wrote: Fri Jan 08, 2021 3:39 pm Ok thanks for testing, so changing that setting didn't change the results?

Can you try changing the line in renderer/Sony-PlayStation4.conf:

Code: Select all

TranscodedVideoFileSize = -1
to:

Code: Select all

TranscodedVideoFileSize = 100000000000
it will likely make the length of videos appear wrong, because it is reporting a fake length, but it might also stop the video from stopping early.
no change, video stopped after 29 min. and 54 sec.
SubJunk wrote: Fri Jan 08, 2021 3:39 pm

Another longshot to try might be this build of UMS which has a different way of closing input streams: https://www.universalmediaserver.com/up ... 56b9a1.exe
no dice, stopped after 29 min. and 51 sec.
User avatar
mik_s
Moderator
Posts: 1104
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: PS4 disconnecting every 20 minutes

Post by mik_s »

I think that there is something in the data stream that is causing the player to fail and is not unique to the PS4.
I can't find the thread (may have been on GIT) but there was another TV that was prematurely stopping after a certain time (an LG I think?)

I have been having similar issues with Movian on the PS3, but as I only really noticed it after my computer problems I just dismissed it as something wrong with my system.

Maybe they all have something in common?

For me playing would fail usually around the 16 min mark the first time playing a file after booting up Movian, but resuming or playing anything after works flawlessly.
It's not usually an issue as I can just resume but is a PITA if the file was being transcoded as I can't seek to where it failed.

Movian also has a debug log and the error would always be "No buffer space available". I thought it was possibly a memory leak on the PS3 that gets fixed after it recovers.

Code: Select all

00:15:57.808: TCP             [INFO ]:Unable to set nonblock to 0
00:15:57.825: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:15:58.836: ASYNCIO         [ERROR]:getsockopt failed for STPP/eth/unicast 0x400000ed -- No buffer space available
00:15:58.836: ASYNCIO         [ERROR]:getsockopt failed for STPP Discovery input 0x400000ec -- No buffer space available
00:15:58.837: ASYNCIO         [ERROR]:getsockopt failed for SSDP/eth/unicast 0x400000eb -- No buffer space available
00:15:58.837: ASYNCIO         [ERROR]:getsockopt failed for SSDP/eth/multicast 0x400000ea -- No buffer space available
00:15:58.849: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:15:58.849: TCP             [INFO ]:Unable to set nonblock to 0
00:15:58.850: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:15:59.860: ASYNCIO         [ERROR]:getsockopt failed for nmb 0x400000e8 -- No buffer space available
00:15:59.861: ASYNCIO         [ERROR]:getsockopt failed for bittorrent udp tracker 0x400000e7 -- No buffer space available
00:15:59.861: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:15:59.862: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:15:59.862: TCP             [INFO ]:Unable to set nonblock to 0
00:15:59.863: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:00.874: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:00.875: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:00.875: TCP             [INFO ]:Unable to set nonblock to 0
00:16:00.875: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:01.886: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:01.886: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:01.887: TCP             [INFO ]:Unable to set nonblock to 0
00:16:01.887: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:02.898: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:02.898: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:02.899: TCP             [INFO ]:Unable to set nonblock to 0
00:16:02.899: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:03.910: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:03.910: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:03.911: TCP             [INFO ]:Unable to set nonblock to 0
00:16:03.911: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:04.922: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:04.922: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:04.923: TCP             [INFO ]:Unable to set nonblock to 0
00:16:04.923: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:05.933: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:05.934: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:05.934: TCP             [INFO ]:Unable to set nonblock to 0
00:16:05.935: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:06.945: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:06.946: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:06.946: TCP             [INFO ]:Unable to set nonblock to 0
00:16:06.947: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:07.957: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:07.958: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:07.958: TCP             [INFO ]:Unable to set nonblock to 0
00:16:07.958: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:08.969: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:08.969: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:08.970: TCP             [INFO ]:Unable to set nonblock to 0
00:16:08.970: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:09.981: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:09.981: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:09.982: TCP             [INFO ]:Unable to set nonblock to 0
00:16:09.982: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:10.993: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:10.993: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:10.996: TCP             [INFO ]:Unable to set nonblock to 0
00:16:10.996: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:12.007: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:12.007: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:12.008: TCP             [INFO ]:Unable to set nonblock to 0
00:16:12.009: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:13.019: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:13.020: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:13.020: TCP             [INFO ]:Unable to set nonblock to 0
00:16:13.021: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:14.031: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:14.032: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:14.032: TCP             [INFO ]:Unable to set nonblock to 0
00:16:14.032: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:15.043: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:15.043: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:15.044: TCP             [INFO ]:Unable to set nonblock to 0
00:16:15.044: TCP             [ERROR]:http-server: Accept error: No buffer space available
00:16:16.055: ASYNCIO         [ERROR]:getsockopt failed for Pipe 0x400000e1 -- No buffer space available
00:16:16.055: ASYNCIO         [ERROR]:getsockopt failed for http-server 0x400000e9 -- No buffer space available
00:16:16.056: TCP             [INFO ]:Unable to set nonblock to 0
00:16:16.056: TCP             [ERROR]:http-server: Accept error: No buffer space available
However after trying 10.0.0-a1 Movian behaved different. First thing that happened was when those errors appeared, the file still continued to play. But in the logs for UMS they showed that Movian had been disconnected and wasn't showing anything being streamed (I think it was transcoding that file) but that only happened once and didn't keep the logs.

Another time Movian errored quickly before starting to play anything, so worked as normal straight away when I went to watch something. or sometimes the errors never happen which it has been like most of this week.

I have been trying older versions to help track down another problem when I saw this in the log for 9.7.2 which is similar to what @SubJunk posted above

Code: Select all

DEBUG 2021-01-08 05:18:21.445 [ffmpeg64.exe-3-Cleanup] Stopping process: ffmpeg64.exe-3
TRACE 2021-01-08 05:18:21.445 [ffmpeg64.exe-3-Cleanup] Destroying buffer
DEBUG 2021-01-08 05:18:21.445 [Thread-16] Windows named pipe interrupted after writing 0 bytes, shutting down...
TRACE 2021-01-08 05:18:21.445 [Thread-16] 
java.io.InterruptedIOException: null
	at java.base/java.io.PipedInputStream.awaitSpace(Unknown Source)
	at java.base/java.io.PipedInputStream.receive(Unknown Source)
	at java.base/java.io.PipedOutputStream.write(Unknown Source)
	at java.base/java.io.OutputStream.write(Unknown Source)
	at net.pms.io.WindowsNamedPipe.run(WindowsNamedPipe.java:276)
TRACE 2021-01-08 05:18:22.459 [ffmpeg64.exe-3] EOF
Does it seem likely to be related?
I've been using a log viewer program, and one of its tools is to merge logs together to drill down on what is causing errors. I could try wireshark and combine those logs with Movian and UMS and see if anything stands out.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: PS4 disconnecting every 20 minutes

Post by SubJunk »

Kruksten wrote: Fri Jan 08, 2021 5:18 pm
SubJunk wrote: Fri Jan 08, 2021 3:39 pm Ok thanks for testing, so changing that setting didn't change the results?

Can you try changing the line in renderer/Sony-PlayStation4.conf:

Code: Select all

TranscodedVideoFileSize = -1
to:

Code: Select all

TranscodedVideoFileSize = 100000000000
it will likely make the length of videos appear wrong, because it is reporting a fake length, but it might also stop the video from stopping early.
no change, video stopped after 29 min. and 54 sec.
SubJunk wrote: Fri Jan 08, 2021 3:39 pm

Another longshot to try might be this build of UMS which has a different way of closing input streams: https://www.universalmediaserver.com/up ... 56b9a1.exe
no dice, stopped after 29 min. and 51 sec.
Thanks for testing more. I think we need to see the whole network picture, because it may be something our logs aren't capturing that is triggering this to happen. Would you please install Wireshark from https://www.wireshark.org/ and capture the network traffic while playing and stop it after the video ends? Feel free to PM it to me if you don't want it on this public forum.
Let me know if there are any problems running Wireshark. It is an advanced program but the basic functionality of starting and stopping a recording should be straight forward, I hope.
Post Reply