PlexConnect icon indicating copy to clipboard operation
PlexConnect copied to clipboard

Video playback stops after resuming from 1-2 minute pause

Open ghost opened this issue 10 years ago • 29 comments

Pausing and resuming works well unless the video has been paused for approx 1-2 minutes. The video will resume playing, but after a short period (30 seconds?) the video will stop and PlexConnect returns to the video menu page. At that point, playback of the video can be started again and resumed from where it stopped.

ghost avatar Apr 07 '16 13:04 ghost

Can confirm. Likely plexconnect fails to keep the connection to plex open long enough

rix1337 avatar Apr 07 '16 14:04 rix1337

Does this happen for transcoded as well as direct-played files? Did you check if PMS cancels the transcoder process? If you look at application.js, around line 355, it should keep PMS/transcoder working...

iBaa avatar Apr 07 '16 19:04 iBaa

So far I have only been playing files that require transcoding and haven't been paying attention to the PlexConnect console output on the server as I'm running it via systemd. I will test with a direct play file and also note the console output for when this happens with a transcoded file.

ghost avatar Apr 07 '16 19:04 ghost

I have the exact same problem.

I don't use direct play, everything is transcoded. If I pause for more then a few minutes, playback continues after pressing play for a little while and then just crashes back to the movie info screen.

I can continue where the movie crashed, so it's not a dealbreaker, but it's annoying at the least...

FreakNL avatar Apr 21 '16 10:04 FreakNL

I've been having the same issue. A minute or so after starting a movie or tv show the video playback will stop on its own and return to the previous screen - just like if I had hit the stop button on my remote. I can immediately resume play and it plays fine without interruption after that.

zachthinks avatar May 20 '16 03:05 zachthinks

+1 on this.

Either returns to the previous screen or stops as if it's buffering, but never buffers.

Will try forcing direct play either to see if it does the same, but it's been transcoding every time I've seen

xela1 avatar Jun 05 '16 18:06 xela1

I've also been having the same issue for a little while now. All of my files are transcoded. Unfortunately, I do not have any direct play files to test with.

You can find a PMS log below, filtered with all of the lines that contain the IP of my Apple TV. I started playing a file around 16:00 and paused it soon after. I resumed at 16:04 and it stopped sometime around 16:05. I can provide a more detailed PMS log and a PlexConnect log, if needed.

My PMS version is 0.9.17.2, PlexConnect is 0.5-dev-110516 and they're running on Debian 8.5.

pms_app_tv.txt

mcwoot avatar Jun 21 '16 20:06 mcwoot

Any update on this issue?

opswhisperer avatar Aug 27 '16 15:08 opswhisperer

I'm currently on PMS 1.1.4 and no longer seem to be having this issue. Can anyone else confirm?

mcwoot avatar Sep 18 '16 15:09 mcwoot

I'm on 1.1.4.2757 and it still happens.

ghost avatar Oct 17 '16 18:10 ghost

I am running PMS 1.2.4 and I see the same exact issues on direct play, direct stream, or transcoded content. I am also running the latest Plexconnect. I have had this issue for months now. This only happens with Plexconnect as I can have other Plex clients pause items for days and resume without issue. I would be willing to provide logs and test to see if we can get to the bottom of this rather annoying issue.

goku-son avatar Nov 01 '16 04:11 goku-son

Same issue persists on PMS 1.2.7.2987... Anything I can do to help bring about a fix for this issue?

ghost avatar Nov 20 '16 15:11 ghost

Still happening on 1.3.x version. I would also like to ask if there is anything that I can do to help bring about a fix for this issue?

goku-son avatar Nov 28 '16 04:11 goku-son

This is happening for me too, i've doubt it'l be resolved anytime soon seeing as iBaa hasn't responded to anyone on here or the plex forums since august.

Here's to hoping, iBaa if you come back I can provide logs as this happens nearly all of the time when I pause for a few minutes then resume.

adamswaine avatar Jan 23 '17 21:01 adamswaine

I can see the ping calls in the log that Ibaa describes in https://github.com/iBaa/PlexConnect/issues/437#issuecomment-207053248. However after 180 seconds Plex kills the transcode job: Shutting down idle session <id> (idle time is 180 seconds). PlexConnect keeps pinging after it has been killed.

What I noticed is that the ping calls get a 401 (Unauthorized) request status:

Request: [<ip>:<port> (Subnet)] GET /video/:/transcode/universal/ping?session=<id> (10 live) TLS GZIP Signed-in
Completed: [<ip>:<port>] 401 GET /video/:/transcode/universal/ping?session=<id> (10 live) TLS GZIP 0ms 338 bytes

This might be related to it. I'll look into it if I find some time.

jeroenj avatar Jan 30 '17 21:01 jeroenj

What I noticed is that the ping calls get a 401 (Unauthorized) request status:

That's because when the transcoder is pinged we forget to pass the plex token :( Thus the transcoder is never actually pinged and just dies after 180 seconds of inactivity.

Try the following application.js file:

application.txt

Just change the extension from txt to js

I don't have a working PlexConnect install to test on, so let me know how it goes.

roidy avatar Jan 31 '17 12:01 roidy

Indeed. Adding the token was what I was planning on doing. I was trying to find any API documation for those transcode API calls but I couldn't find any.

Do you know if there is any (API docs)?

I'll try to look into it this evening.

jeroenj avatar Jan 31 '17 12:01 jeroenj

No API doc that I know of, just try the application.txt file I added to my post, I've made the necessary changes to add the token, just remember to rename the file from txt to .js.

roidy avatar Jan 31 '17 13:01 roidy

@roidy it works as expected. I've also added it in the ping calls called from a timer. (see #460)

Tested it by pausing a video for ~10minutes. I could see in the Plex logs that it kept the transcoder alive. I've resumed playback for ~5minutes after pausing without any issues. (It used to stop after ~20seconds.)

Thanks a lot! :)

jeroenj avatar Jan 31 '17 21:01 jeroenj

Is that application.js you posted universal for everyone to try?

I dropped it in my PlexConnect-master/assets/js folder but i got the same result, i went to make some dinner for 20 minutes and left a program paused but after a few minutes after resuming it stop playing and requires me to resume playing like before.

adamswaine avatar Jan 31 '17 21:01 adamswaine